Send Email
SendGrid
SendGrid
Send Email
Send an email from the SendGrid API. Maps directly to the SendGrid v3 Mail Send request body.
ActionAI Tool
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
personalizations | array of object | Required | An array of messages and their metadata. Each object can be thought of as a mail envelope—it defines who should receive an individual message and how that message should be handled. Exactly one personalization is supported. |
to | array of object | Required | An array of recipients to whom the email will be sent. |
email | text | Required | An email address to which a message is sent. Email addresses specified in personalizations will override addresses set at the message level outside of the personalizations object. |
name | text | Optional | A name or title associated with the email address such as "Alex". |
cc | array of object | Optional | An array of recipients to whom a copy of the email will be sent. |
email | text | Required | An email address to which a message is sent. Email addresses specified in personalizations will override addresses set at the message level outside of the personalizations object. |
name | text | Optional | A name or title associated with the email address such as "Alex". |
bcc | array of object | Optional | An array of recipients to whom a blind carbon copy of the email will be sent. |
email | text | Required | An email address to which a message is sent. Email addresses specified in personalizations will override addresses set at the message level outside of the personalizations object. |
name | text | Optional | A name or title associated with the email address such as "Alex". |
subject | text | Optional | The subject of your email. Overrides the global subject for this personalization. |
headers | object | Optional | Key/value handling instructions for this message. Certain reserved headers (To, From, Subject, Reply-To, CC, BCC, Content-Type, etc.) may not be overridden. |
substitutions | object | Optional | Substitution tag/value pairs applied to the subject, reply-to and content of the message. Max 10,000 bytes per personalization. |
dynamic_template_data | object | Optional | Values substituted into a SendGrid Dynamic Template using Handlebars syntax (used with a d- template_id). |
custom_args | object | Optional | Custom argument key/values specific to this personalization, carried with the email's activity data. Max 10,000 bytes. |
send_at | number | Optional | A unix timestamp specifying when the email should be sent. Cannot be scheduled more than 72 hours in advance. |
from | object | Required | The email address from which messages are sent. This address should be a verified sender in your Twilio SendGrid account. |
email | text | Required | An email address to which a message is sent. Email addresses specified in personalizations will override addresses set at the message level outside of the personalizations object. |
name | text | Optional | A name or title associated with the email address such as "Alex". |
reply_to | object | Optional | Reply-to email object. Use either reply_to or reply_to_list, but not both. |
email | text | Required | An email address to which a message is sent. Email addresses specified in personalizations will override addresses set at the message level outside of the personalizations object. |
name | text | Optional | A name or title associated with the email address such as "Alex". |
reply_to_list | array of object | Optional | An array of recipients to whom replies will be sent. Use either reply_to or reply_to_list, but not both. |
email | text | Required | An email address to which a message is sent. Email addresses specified in personalizations will override addresses set at the message level outside of the personalizations object. |
name | text | Optional | A name or title associated with the email address such as "Alex". |
subject | text | Optional | The global or message level subject of your email. Subject lines set in personalizations override this. |
content | array of object | Optional | An array of objects, each containing a message body's content and MIME type. Specify at least one MIME type. |
type | select | Required | The MIME type of the content (e.g., text/plain or text/html). (options: text/plain, text/html) |
value | text | Required | The content of your message in the specified MIME type. |
attachments | attachments | Optional | Attachments to include with the message. Each attachment is sent to SendGrid with content (base64), filename, type (MIME), disposition (inline or attachment), and content_id. |
template_id | text | Optional | An email template ID. A template containing subject/content overrides values set elsewhere. IDs beginning with d- are dynamic templates and work with dynamic_template_data. |
headers | object | Optional | Global key/value handling instructions for the email. Certain reserved headers may not be overridden. |
categories | array of text | Optional | An array of category names assigned to this message, used to group messages in the SendGrid dashboard. |
custom_args | text | Optional | Send-wide custom arguments carried with the email's activity data. Overridden by custom_args set at the personalizations level. Max 10,000 bytes. |
send_at | number | Optional | A unix timestamp specifying when the email should be sent. Cannot be scheduled more than 72 hours in advance. May be overridden by send_at set at the personalizations level. |
batch_id | text | Optional | An ID representing a batch of emails sent at the same time, enabling you to cancel or pause delivery of that batch. |
asm | object | Optional | Specifies how to handle unsubscribes for this email. |
group_id | number | Required | The unsubscribe group to associate with this email. |
groups_to_display | array of number | Optional | Unsubscribe groups to display to the recipient on the unsubscribe preferences page. |
ip_pool_name | text | Optional | The IP Pool to send this email from, for more control over deliverability. |
mail_settings | object | Optional | Extra mail handling settings. Each is an object with an `enable` flag: bypass_list_management, bypass_spam_management, bypass_bounce_management, bypass_unsubscribe_management, footer (enable/text/html), and sandbox_mode. |
sandbox_mode | object | Optional | Send a test email to validate the request body without actually delivering it. |
enable | yes/no | Optional | Enable sandbox mode. |
footer | object | Optional | Inserts a custom footer at the bottom of the text and HTML bodies of your messages. |
enable | yes/no | Optional | Enable footer. |
text | text | Optional | The plain text content of your footer. |
html | text | Optional | The HTML content of your footer. |
tracking_settings | object | Optional | Settings controlling how recipient interaction is tracked. Includes click_tracking (enable/enable_text), open_tracking (enable/substitution_tag), subscription_tracking (enable/text/html/substitution_tag), and ganalytics (enable plus UTM source/medium/term/content/campaign). |
click_tracking | object | Optional | Track if a recipient clicked a link in your email. |
enable | yes/no | Optional | Enable click tracking. |
enable_text | yes/no | Optional | Enable text click tracking. |
open_tracking | object | Optional | Track if the email was opened via a transparent pixel. |
enable | yes/no | Optional | Enable open tracking. |
substitution_tag | text | Optional | The substitution tag for open tracking. |
Outputs
| Name | Type | Description |
|---|---|---|
statusCode | number | HTTP status code from SendGrid API response (202 for success). |