@gemini86/node-red-sendgrid 1.1.4

Sending e-mail node using SendGrid service

npm install @gemini86/node-red-sendgrid

@gemini86/node-red-sendgrid

Send e-mails using the SendGrid service from Node-RED. This node provides a reliable alternative to the default e-mail node, especially when using cloud or remote deployments.

Inputs

  • msg.from (string): Sender e-mail address
  • msg.to (string): Recipient e-mail address
  • msg.cc (string, optional): Carbon copy recipient(s)
  • msg.bcc (string, optional): Blind carbon copy recipient(s)
  • msg.topic or msg.subject (string): E-mail subject
  • msg.payload (string): E-mail body (plain text or HTML)
  • msg.attachments (Buffer | Array | Object): One or more attachments. Use a Buffer for a single attachment, or an array of Buffers/objects for multiple. Objects must match SendGrid's attachment format. Filenames are auto-generated unless provided.
  • msg.templateId (string, optional): SendGrid dynamic template ID
  • msg.templateData (object or string, optional): Data for dynamic template

Details

To use this node:

  1. Install via the Node-RED palette manager (@gemini86/node-red-sendgrid).
  2. Get an API key from SendGrid.
  3. Paste the API key into the node's configuration.
  4. Configure your flow to set the required message properties.

Attachments

To add attachments, set msg.attachments:

  • For a single attachment, use a Buffer.
  • For multiple attachments, use an array of Buffers or objects in SendGrid's format.
  • If using Buffers, filenames will be auto-generated unless you provide att.filename or msg.filenames (array of names in the same order as the Buffers).
  • msg.payload is always used as the e-mail body (string or HTML), never as an attachment.

SendGrid attachment object example:

{
  content: "<base64-encoded string>",
  filename: "document.pdf",
  type: "application/pdf", // optional
  disposition: "attachment", // optional
  content_id: "unique-id" // optional
}

Skip Bad Attachments

If enabled, attachments that cannot be normalized (invalid or unsupported) will be skipped and a warning will be logged instead of failing the node. If disabled, the node will error on the first bad attachment.

Note: Legacy usage of msg.payload as a Buffer for attachments is no longer supported. Always use msg.attachments for attachments.

References

Node Info

Version: 1.1.4
Updated 8 hours ago
License: Apache-2.0
Rating: not yet rated

Categories

Actions

Rate:

Downloads

0 in the last week

Nodes

  • gemini86-sendgrid

Keywords

  • node-red
  • sendgrid
  • mail
  • email
  • e-mail

Maintainers

Contributors

  • gemini86
  • zuhito