Skip to content

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
personalizationsarray of objectRequiredAn 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.
toarray of objectRequiredAn array of recipients to whom the email will be sent.
emailtextRequiredAn 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.
nametextOptionalA name or title associated with the email address such as "Alex".
ccarray of objectOptionalAn array of recipients to whom a copy of the email will be sent.
emailtextRequiredAn 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.
nametextOptionalA name or title associated with the email address such as "Alex".
bccarray of objectOptionalAn array of recipients to whom a blind carbon copy of the email will be sent.
emailtextRequiredAn 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.
nametextOptionalA name or title associated with the email address such as "Alex".
subjecttextOptionalThe subject of your email. Overrides the global subject for this personalization.
headersobjectOptionalKey/value handling instructions for this message. Certain reserved headers (To, From, Subject, Reply-To, CC, BCC, Content-Type, etc.) may not be overridden.
substitutionsobjectOptionalSubstitution tag/value pairs applied to the subject, reply-to and content of the message. Max 10,000 bytes per personalization.
dynamic_template_dataobjectOptionalValues substituted into a SendGrid Dynamic Template using Handlebars syntax (used with a d- template_id).
custom_argsobjectOptionalCustom argument key/values specific to this personalization, carried with the email's activity data. Max 10,000 bytes.
send_atnumberOptionalA unix timestamp specifying when the email should be sent. Cannot be scheduled more than 72 hours in advance.
fromobjectRequiredThe email address from which messages are sent. This address should be a verified sender in your Twilio SendGrid account.
emailtextRequiredAn 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.
nametextOptionalA name or title associated with the email address such as "Alex".
reply_toobjectOptionalReply-to email object. Use either reply_to or reply_to_list, but not both.
emailtextRequiredAn 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.
nametextOptionalA name or title associated with the email address such as "Alex".
reply_to_listarray of objectOptionalAn array of recipients to whom replies will be sent. Use either reply_to or reply_to_list, but not both.
emailtextRequiredAn 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.
nametextOptionalA name or title associated with the email address such as "Alex".
subjecttextOptionalThe global or message level subject of your email. Subject lines set in personalizations override this.
contentarray of objectOptionalAn array of objects, each containing a message body's content and MIME type. Specify at least one MIME type.
typeselectRequiredThe MIME type of the content (e.g., text/plain or text/html). (options: text/plain, text/html)
valuetextRequiredThe content of your message in the specified MIME type.
attachmentsattachmentsOptionalAttachments 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_idtextOptionalAn 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.
headersobjectOptionalGlobal key/value handling instructions for the email. Certain reserved headers may not be overridden.
categoriesarray of textOptionalAn array of category names assigned to this message, used to group messages in the SendGrid dashboard.
custom_argstextOptionalSend-wide custom arguments carried with the email's activity data. Overridden by custom_args set at the personalizations level. Max 10,000 bytes.
send_atnumberOptionalA 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_idtextOptionalAn ID representing a batch of emails sent at the same time, enabling you to cancel or pause delivery of that batch.
asmobjectOptionalSpecifies how to handle unsubscribes for this email.
group_idnumberRequiredThe unsubscribe group to associate with this email.
groups_to_displayarray of numberOptionalUnsubscribe groups to display to the recipient on the unsubscribe preferences page.
ip_pool_nametextOptionalThe IP Pool to send this email from, for more control over deliverability.
mail_settingsobjectOptionalExtra 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_modeobjectOptionalSend a test email to validate the request body without actually delivering it.
enableyes/noOptionalEnable sandbox mode.
footerobjectOptionalInserts a custom footer at the bottom of the text and HTML bodies of your messages.
enableyes/noOptionalEnable footer.
texttextOptionalThe plain text content of your footer.
htmltextOptionalThe HTML content of your footer.
tracking_settingsobjectOptionalSettings 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_trackingobjectOptionalTrack if a recipient clicked a link in your email.
enableyes/noOptionalEnable click tracking.
enable_textyes/noOptionalEnable text click tracking.
open_trackingobjectOptionalTrack if the email was opened via a transparent pixel.
enableyes/noOptionalEnable open tracking.
substitution_tagtextOptionalThe substitution tag for open tracking.

Outputs

Name Type Description
statusCodenumberHTTP status code from SendGrid API response (202 for success).