SendGrid Component
Manage email delivery and contacts in SendGrid.
Component key: sendgrid
Description
SendGrid is a cloud-based email delivery platform owned by Twilio. This component allows you to send transactional and marketing emails, manage contacts, and track email analytics.
API Documentation
This component was built using the SendGrid API v3.
Connections
SendGrid API Key
key: apiKeyTo authenticate with SendGrid, an API key is required.
Setup Steps
To generate an API key:
- Log in to the SendGrid Console
- Navigate to Settings > API Keys
- Click Create API Key
- Enter a name for the API key
- Select the appropriate access level:
- Full Access - Grants all permissions (recommended for integration use)
- Restricted Access - Grants specific permissions based on requirements
- Click Create & View
- Copy the API key value (it will only be displayed once)
For more information about creating API keys, refer to the SendGrid API Keys documentation.
Configure the Connection
- Enter the API key into the API Key field in the connection configuration
The API key is only displayed once upon creation. Store it securely. If the key is lost, a new one must be generated.
| Input | Notes | Example |
|---|---|---|
| API Key | API Key from your SendGrid account. Generate one in Settings > API Keys. Learn more | SG.1a2b3c4d5e6f7g8h.9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w4x5y6z |
Triggers
Managed Webhook Events
Receive event webhook notifications from SendGrid. Automatically creates and manages a webhook subscription when the instance is deployed, and removes the subscription when the instance is deleted. | key: eventWebhook
| Input | Notes | Example |
|---|---|---|
| Events | The events to track. | delivered |
| Friendly Name | A friendly name to help differentiate between multiple webhooks. | My Event Webhook |
| Connection | The SendGrid connection to use. |
The Event Webhook trigger can manage SendGrid event webhook subscriptions for an instance. Unlike traditional webhook setups that require manual configuration in the SendGrid dashboard, this trigger handles the entire webhook lifecycle.
When the trigger is used in a flow:
- On Instance Deploy: The trigger automatically creates a webhook endpoint in the SendGrid account pointing to the instance's unique webhook URL. If a webhook with the same ID already exists in the stored state, it updates the existing webhook instead of creating a duplicate. The trigger also automatically enables signature verification and stores the public key for validating incoming requests.
- On Instance Deletion: The trigger automatically removes the webhook endpoint from the SendGrid account.
Event Types
Configure the trigger to receive notifications for the following email events:
Event Types
| Event | Description |
|---|---|
| Delivered | Message has been successfully delivered to the receiving server |
| Bounce | Receiving server could not or would not accept the message |
| Deferred | Receiving server temporarily rejected the message |
| Processed | Message has been received and is ready to be delivered |
| Dropped | Message has been dropped (e.g., invalid header, spam content) |
| Open | Recipient has opened the HTML message |
| Click | Recipient clicked on a link within the message |
| Spam Report | Recipient marked the message as spam |
| Unsubscribe | Recipient clicked the unsubscribe link |
| Group Unsubscribe | Recipient unsubscribed from a specific group |
| Group Resubscribe | Recipient resubscribed to a specific group |
Enable the specific events to monitor by configuring the corresponding inputs when setting up the trigger.
Signature Verification
The trigger automatically verifies the authenticity of incoming webhook requests using SendGrid's ECDSA signature verification. When the webhook is created during instance deployment, signature verification is enabled and the public key is stored in the instance state.
For each incoming request, the trigger:
- Extracts the signature and timestamp from the
X-Twilio-Email-Event-Webhook-SignatureandX-Twilio-Email-Event-Webhook-Timestampheaders - Converts the stored public key to ECDSA format
- Verifies the signature against the raw request body
- Rejects requests with invalid signatures to prevent spoofing
This ensures that only genuine requests from SendGrid are processed by the flow.
Configuration
When configuring the Event Webhook trigger, specify:
- SendGrid Connection: The authenticated SendGrid API connection
- Friendly Name: A descriptive name to help differentiate between multiple webhooks
- Event Type Toggles: Enable the specific events to monitor (Delivered, Bounce, Open, Click, etc.)
Returned Data
The trigger returns the webhook payload containing an array of email events:
Example Payload
{
"payload": {
"headers": {
"Content-Type": "application/json;charset=utf-8",
"X-Twilio-Email-Event-Webhook-Signature": "MEQCIExampleSignatureBase64...",
"X-Twilio-Email-Event-Webhook-Timestamp": "1700000000"
},
"body": {
"data": [
{
"email": "user@example.com",
"event": "delivered",
"timestamp": 1700000000,
"sg_event_id": "ZGVsaXZlcmVkLTAtMTIzNDU2NzgtRXhhbXBsZQ==",
"sg_message_id": "ExampleMessageId123.recvd-abc123",
"response": "250 2.0.0 OK DMARC:Pass",
"category": ["Marketing", "Newsletter"],
"tls": 1
}
]
}
}
}
For complete event payload schemas, see the SendGrid Event Webhook Reference.
{
"payload": {
"headers": {
"Accept-Encoding": "gzip",
"Content-Type": "application/json;charset=utf-8",
"Host": "hooks.example.com",
"User-Agent": "SendGrid Event API",
"X-Amz-Cf-Id": "exampleCloudFrontId123456789abcdef==",
"X-Amzn-Trace-Id": "Root=1-12345678-abcdef1234567890abcdef12",
"X-Forwarded-For": "192.0.2.1, 198.51.100.1",
"X-Twilio-Email-Event-Webhook-Signature": "MEQCIExampleSignatureBase64EncodedString1234567890abcdefghijklmnopqrstuvwxyz==",
"X-Twilio-Email-Event-Webhook-Timestamp": "1700000000"
},
"queryParameters": null,
"rawBody": {
"data": "<data (972 bytes)>"
},
"body": {
"data": [
{
"category": [
"Marketing",
"Newsletter",
"Retail",
"Promotional"
],
"email": "user@example.com",
"event": "delivered",
"ip": "192.0.2.100",
"mc_pod_id": "1",
"mc_stats": "singlesend",
"phase_id": "send",
"response": "250 2.0.0 OK DMARC:Pass 1700000000 example123-abc456def789ghi012jkl345.123 - gsmtp",
"send_at": "1700000000",
"sg_event_id": "ZGVsaXZlcmVkLTAtMTIzNDU2NzgtRXhhbXBsZUV2ZW50SWQxMjM0NTY3ODkw",
"sg_message_id": "ExampleMessageId123.recvd-abc123def456-ghi789-1-12345678-9.0",
"sg_template_id": "d-exampletemplateid1234567890abcdef",
"sg_template_name": "Example Template Version 2024-01-01T00:00:00.000Z",
"singlesend_id": "abc12345-def6-7890-ghij-klmnopqrstuv",
"singlesend_name": "Example Marketing Campaign",
"smtp-id": "<ExampleSmtpId123@example-server-01>",
"template_hash": "abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"template_id": "d-exampletemplateid1234567890abcdef",
"template_version_id": "12345678-90ab-cdef-1234-567890abcdef",
"timestamp": 1700000000,
"tls": 1
}
],
"contentType": "application/json;charset=utf-8"
},
"pathFragment": "",
"webhookUrls": {
"Flow 1": "https://hooks.example.com/trigger/SW5zdGFuY2VGbG93Q29uZmlnOmV4YW1wbGUxMjM0NTY3ODkwYWJjZGVmZ2hpams=",
"Receive": "https://hooks.example.com/trigger/SW5zdGFuY2VGbG93Q29uZmlnOmV4YW1wbGVSZWNlaXZlMTIzNDU2Nzg5MGFiY2Q=",
"Webhooks": "https://hooks.example.com/trigger/SW5zdGFuY2VGbG93Q29uZmlnOmV4YW1wbGVXZWJob29rczEyMzQ1Njc4OTBhYg==",
"Event Webhook": "https://hooks.example.com/trigger/SW5zdGFuY2VGbG93Q29uZmlnOmV4YW1wbGVFdmVudFdlYmhvb2sxMjM0NTY3OA==",
"Webhook Event": "https://hooks.example.com/trigger/SW5zdGFuY2VGbG93Q29uZmlnOmV4YW1wbGVXZWJob29rRXZlbnQxMjM0NTY3OA=="
},
"webhookApiKeys": {
"Flow 1": [],
"Receive": [],
"Webhooks": [],
"Event Webhook": [],
"Webhook Event": []
},
"invokeUrl": "https://hooks.example.com/trigger/SW5zdGFuY2VGbG93Q29uZmlnOmV4YW1wbGVJbnZva2VVcmwxMjM0NTY3ODkwYWI=",
"executionId": "SW5zdGFuY2VFeGVjdXRpb25SZXN1bHQ6ZXhhbXBsZUV4ZWN1dGlvbklkMTIzNDU2Nzg5MGFiY2RlZg==",
"customer": {
"id": "testCustomerId",
"name": "Test Customer",
"externalId": "testCustomerExternalId"
},
"instance": {
"id": "SW5zdGFuY2U6ZXhhbXBsZUluc3RhbmNlSWQxMjM0NTY3ODkwYWJjZGVmZ2hpams=",
"name": "SendGrid - Example - Webhook Event"
},
"user": {
"id": "testUserId",
"email": "testUserEmail@example.com",
"name": "Test User",
"externalId": "testUserExternalId"
},
"integration": {
"id": "SW50ZWdyYXRpb246ZXhhbXBsZUludGVncmF0aW9uSWQxMjM0NTY3ODkwYWJjZA==",
"name": "SendGrid - Example",
"versionSequenceId": "exampleIntegrationVersionSequenceId123",
"externalVersion": ""
},
"flow": {
"id": "SW50ZWdyYXRpb25GbG93OmV4YW1wbGVGbG93SWQxMjM0NTY3ODkwYWJjZGVmZ2g=",
"name": "Webhook Event"
},
"startedAt": "2025-12-24 20:04:23.776311+00",
"globalDebug": true
}
}
Manual Webhook
Receive and validate webhook requests from SendGrid for manually configured webhooks. | key: webhook
You can configure a SendGrid event webhook to send information to a flow's webhook URL when an email is received.
Data Sources
SendGrid Contact Lists
Fetch a picklist of contact lists from SendGrid | key: sendGridListsDataSource | type: picklist
| Input | Notes | Example |
|---|---|---|
| Connection | The SendGrid connection to use. |
{
"result": [
{
"label": "Summer Newsletter (1020 contacts)",
"key": "abc-123"
},
{
"label": "Product Updates (50 contacts)",
"key": "def-456"
}
]
}
Actions
Add or Update Contact
Add or update a contact. This can also be used to add contacts to a list. | key: addOrUpdateContact
| Input | Notes | Example |
|---|---|---|
| Contacts | An array of contact objects to add or update. See SendGrid docs for contact object structure. | |
| List IDs | Comma-separated IDs of the lists to add the contact to. These lists must already exist. | ca3f4b4f-13a5-4321-9876-a1b2c3d4e5f6,d7e8f9a0-b1c2-d3e4-f5a6-b7c8d9e0f1a2 |
| Connection | The SendGrid connection to use. |
{
"data": {
"job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"_metadata": {
"self": "https://api.sendgrid.com/v3/marketing/contacts/imports/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}
}
Create List
Create a new contact list | key: createList
| Input | Notes | Example |
|---|---|---|
| List Name | The name of the list to create. | My New Contact List |
| Connection | The SendGrid connection to use. |
{
"data": {
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "My New Contact List",
"contact_count": 0,
"_metadata": {
"self": "https://api.sendgrid.com/v3/marketing/lists/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}
}
Create Webhook
Create a new Event Webhook configuration to receive email event data. | key: createWebhook
| Input | Notes | Example |
|---|---|---|
| Enabled | When true, enables the Event Webhook. | true |
| Events | The events to track. | delivered |
| Friendly Name | A friendly name to help differentiate between multiple webhooks. | My Event Webhook |
| Connection | The SendGrid connection to use. | |
| Webhook URL | The URL where SendGrid will send event data. | https://example.com/webhook |
{
"data": {
"enabled": true,
"url": "https://example.com/webhook-endpoint",
"group_resubscribe": true,
"delivered": false,
"group_unsubscribe": true,
"spam_report": true,
"bounce": true,
"deferred": true,
"unsubscribe": true,
"processed": false,
"open": true,
"click": true,
"dropped": true,
"friendly_name": "Engagement Webhook",
"oauth_client_id": "a835e7210bbb47edbfa71bdfc909b2d7",
"oauth_token_url": "https://oauthservice.example.com",
"id": "77d4a5da-7015-11ed-a1eb-0242ac120002",
"created_date": "2023-01-01T12:00:00Z",
"updated_date": "2023-02-15T10:00:00Z"
}
}
Delete Webhook
Delete an Event Webhook configuration. | key: deleteWebhook
| Input | Notes | Example |
|---|---|---|
| Connection | The SendGrid connection to use. | |
| Webhook ID | The ID of the webhook. | 77d4a5da-7015-11ed-a1eb-0242ac120002 |
{
"data": {
"success": true,
"message": "Webhook deleted successfully"
}
}
Get All Field Definitions
Retrieve all custom field definitions with pagination support | key: getAllFieldDefinitions
| Input | Notes | Example |
|---|---|---|
| Fetch All | When true, fetches all pages of results using pagination. | false |
| Page Size | Number of results to return per page (max 100). | 10 |
| Page Token | Token for fetching the next or previous page of results. | |
| Connection | The SendGrid connection to use. |
{
"data": {
"custom_fields": [
{
"id": "w1",
"name": "pet",
"field_type": "Text",
"_metadata": {
"self": "https://api.sendgrid.com/v3/marketing/field_definitions/w1"
}
}
],
"reserved_fields": [
{
"id": "_rf1",
"name": "first_name",
"field_type": "Text",
"_metadata": {
"self": "https://api.sendgrid.com/v3/marketing/field_definitions/_rf1"
}
}
],
"_metadata": {
"count": 2,
"self": "https://api.sendgrid.com/v3/marketing/field_definitions"
},
"pagination": {
"nextPageToken": "next_page_token",
"previousPageToken": "previous_page_token",
"totalCount": 100
}
}
}
Get All Lists
Retrieve all contact lists with pagination support | key: getAllLists
| Input | Notes | Example |
|---|---|---|
| Fetch All | When true, fetches all pages of results using pagination. | false |
| Page Size | Number of results to return per page (max 100). | 10 |
| Page Token | Token for fetching the next or previous page of results. | |
| Connection | The SendGrid connection to use. |
{
"data": {
"result": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "My Contact List",
"contact_count": 1000,
"_metadata": {
"self": "https://api.sendgrid.com/v3/marketing/lists/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}
],
"_metadata": {
"count": 1,
"self": "https://api.sendgrid.com/v3/marketing/lists"
},
"pagination": {
"nextPageToken": "next_page_token",
"previousPageToken": "previous_page_token",
"totalCount": 100
}
}
}
Get Contacts by Emails
Retrieve contacts by their email addresses. | key: getContactsByEmails
| Input | Notes | Example |
|---|---|---|
| Emails | Comma-separated email addresses to search for. | john.doe@example.com,jane.smith@example.com |
| Connection | The SendGrid connection to use. |
{
"data": {
"result": {
"test1@example.com": {
"contact": {
"address_line_1": "123 Main St",
"address_line_2": " Apt 4B",
"alternate_emails": [
"testalt@example.com"
],
"city": "Anytown",
"country": "US",
"email": "test1@example.com",
"first_name": "Test",
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"last_name": "User",
"list_ids": [
"yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy"
],
"postal_code": "12345",
"state_province_region": "CA",
"phone_number": "555-123-4567",
"whatsapp": "15551234567",
"line": "testuserline",
"facebook": "testuserfb",
"unique_name": "testuserunique",
"custom_fields": {
"field1": "value1"
},
"created_at": "2023-01-01T12:00:00Z",
"updated_at": "2023-01-01T12:00:00Z",
"_metadata": {
"self": "url"
}
}
}
}
}
}
Get Import Status
Check the status of a contact import job | key: getImportStatus
| Input | Notes | Example |
|---|---|---|
| Job ID | The job ID returned from Import Contacts, Add/Update Contact, or Delete Contacts operations. | f8a7b6c5-d4e3-f2a1-b0c9-d8e7f6a5b4c3 |
| Connection | The SendGrid connection to use. |
{
"data": {
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "completed",
"job_type": "upsert",
"results": {
"requested_count": 100,
"created_count": 80,
"updated_count": 20,
"deleted_count": 0,
"errored_count": 0,
"errors_url": "https://api.sendgrid.com/v3/marketing/contacts/imports/errors/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"started_at": "2024-01-01T00:00:00Z",
"finished_at": "2024-01-01T00:01:00Z"
}
}
}
Get List by ID
Retrieve a specific contact list by its ID | key: getListById
| Input | Notes | Example |
|---|---|---|
| Include Sample Contacts | When true, includes a sample of contacts in the response. | false |
| List ID | The ID of the list to retrieve. | ca3f4b4f-13a5-4321-9876-a1b2c3d4e5f6 |
| Connection | The SendGrid connection to use. |
{
"data": {
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "My Contact List",
"contact_count": 42,
"contact_sample": [
{
"id": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
"email": "example@email.com",
"first_name": "John",
"last_name": "Doe",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
],
"_metadata": {
"self": "https://api.sendgrid.com/v3/marketing/lists/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}
}
Get Webhook
Retrieve an Event Webhook configuration by ID. | key: getWebhook
| Input | Notes | Example |
|---|---|---|
| Connection | The SendGrid connection to use. | |
| Webhook ID | The ID of the webhook. | 77d4a5da-7015-11ed-a1eb-0242ac120002 |
{
"data": {
"enabled": true,
"url": "https://emaildelivery.example.com",
"group_resubscribe": false,
"delivered": true,
"group_unsubscribe": false,
"spam_report": true,
"bounce": true,
"deferred": true,
"unsubscribe": true,
"processed": true,
"open": true,
"click": true,
"dropped": true,
"friendly_name": "Delivery Webhook",
"id": "77d4a5da-7015-11ed-a1eb-0242ac120002",
"oauth_client_id": "a835e7210bbb47edbfa71bdfc909b2d7",
"oauth_token_url": "https://oauthservice.example.com",
"public_key": "123publickeyabc",
"created_at": "2023-01-01T12:00:00Z",
"updated_at": "2023-02-15T10:00:00Z"
}
}
Initiate Contacts Import
Initiates a CSV contact import. Returns a URL and headers for uploading the CSV file. | key: initiateContactsImport
| Input | Notes | Example |
|---|---|---|
| Field Mappings | An array of field definition IDs to map the uploaded CSV columns. Use null to skip a column. Get IDs from 'Get All Field Definitions' action. | |
| Is Compressed | When true, indicates that the CSV file will be gzip-compressed. | false |
| List IDs | Comma-separated IDs of the lists to add the contact to. These lists must already exist. | ca3f4b4f-13a5-4321-9876-a1b2c3d4e5f6,d7e8f9a0-b1c2-d3e4-f5a6-b7c8d9e0f1a2 |
| Connection | The SendGrid connection to use. |
{
"data": {
"job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"upload_uri": "https://s3.amazonaws.com/path/to/your/upload_location",
"upload_headers": [
{
"header": "Content-Type",
"value": "text/csv"
},
{
"header": "x-amz-meta-job_id",
"value": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
],
"_metadata": {
"self": "https://api.sendgrid.com/v3/marketing/contacts/imports/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}
}
List Webhooks
List all Event Webhook configurations. | key: listWebhooks
| Input | Notes | Example |
|---|---|---|
| Connection | The SendGrid connection to use. |
{
"data": {
"max_allowed": 5,
"webhooks": [
{
"enabled": true,
"url": "https://emailengagment.example.com",
"group_resubscribe": true,
"delivered": true,
"group_unsubscribe": true,
"spam_report": true,
"bounce": true,
"deferred": true,
"unsubscribe": true,
"processed": false,
"open": true,
"click": true,
"dropped": true,
"friendly_name": "Engagment Webhook",
"id": "77d4a5da-7015-11ed-a1eb-0242ac120002",
"oauth_client_id": "a835e7210bbb47edbfa71bdfc909b2d7",
"oauth_token_url": "https://oauthservice.example.com",
"public_key": "123publickeyabc",
"created_date": "2023-01-01T12:00:00Z",
"updated_date": "2023-02-15T10:00:00Z"
}
]
}
}
Raw Request
Send raw HTTP request to SendGrid | key: rawRequest
| Input | Notes | Example |
|---|---|---|
| Connection | The SendGrid connection to use. | |
| Data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} |
| File Data | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] |
| File Data File Names | File names to apply to the file data inputs. Keys must match the file data keys above. | |
| Form Data | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] |
| Header | A list of headers to send with the request. | User-Agent: curl/7.64.1 |
| Max Retry Count | The maximum number of retries to attempt. Specify 0 for no retries. | 0 |
| Method | The HTTP method to use. | |
| Query Parameter | A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2. | |
| Response Type | The type of data you expect in the response. You can request json, text, or binary data. | json |
| Retry On All Errors | If true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors. | false |
| Retry Delay (ms) | The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled. | 0 |
| Timeout | The maximum time that a client will await a response to its request | 2000 |
| URL | Input the path only (/templates), The base URL is already included (https://api.sendgrid.com/v3). For example, to connect to https://api.sendgrid.com/v3/templates, only /templates is entered in this field. | /templates |
| Use Exponential Backoff | Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored. | false |
Send Email
Send a single email to one or more recipients | key: sendEmail
| Input | Notes | Example |
|---|---|---|
| BCC | The recipient's email address, or a comma-separated list of recipient email addresses to BCC. | john.doe@example.com,jane.smith@example.com |
| CC | The recipient's email address, or a comma-separated list of recipient email addresses to CC. | john.doe@example.com,jane.smith@example.com |
| Attachment Content | Provide attachment data to send with the email. The 'File Name' field is required when using this input and should reference the data output from a previous action. | |
| Content Id | Provide the content Id of the attachment. This value is only required when you select 'inline'. | 12345 |
| Disposition | Specifies how you would like the attachment to be displayed. | inline |
| File Name | Provide a name for the file to attach. The 'Attachment Content' field is required when using this input. | reports.csv |
| File Type | The MIME type of the content you are attaching. | text/plain |
| From Email | The sender's email address. | sender@example.com |
| From Name | The sender's name. | John Doe |
| HTML | The optional HTML body of the email. | Hello from <b>Acme!</b> |
| Multiple Attachments | Provide an array of attachments to send with the email. See https://www.twilio.com/docs/sendgrid/api-reference/mail-send/mail-send#request-body for more information. | |
| Personalizations | You can use this field to overwrite multiple properties of the email. For examples of which properties to use, checkout the SendGrid docs: https://docs.sendgrid.com/for-developers/sending-email/personalizations | |
| Reply To Email | Email To Reply To. | support@example.com |
| Reply To Name | Name to reply to. This field is only required when you provide a value for Reply To Email. | John Doe |
| Connection | The SendGrid connection to use. | |
| Subject | The email subject line. | Hello from Acme! |
| Subscription Tracking | When true, inserts a subscription management link at the bottom of the text and HTML bodies of your email. | false |
| Text | The text body of the email. | Here's the body of a notification. |
| To | The recipient's email address, or a comma-separated list of recipient email addresses. | john.doe@example.com,jane.smith@example.com |
{
"data": [
{
"body": {
"message": "Example"
},
"statusCode": 200,
"headers": {}
},
{}
]
}
Send Email with Dynamic Template
Send an email using a SendGrid dynamic template with complex nested JSON data | key: sendEmailWithDynamicTemplate
| Input | Notes | Example |
|---|---|---|
| BCC | The recipient's email address, or a comma-separated list of recipient email addresses to BCC. Will be ignored if 'Personalizations' is provided. | john.doe@example.com,jane.smith@example.com |
| CC | The recipient's email address, or a comma-separated list of recipient email addresses to CC. Will be ignored if 'Personalizations' is provided. | john.doe@example.com,jane.smith@example.com |
| Dynamic Template Data | The data to be used for the dynamic template. Supports complex nested JSON structures including arrays and objects for order confirmations, customer data, and more. | |
| From Email | The sender's email address. | sender@example.com |
| From Name | The sender's name. | John Doe |
| Personalizations | Advanced: Provide a personalizations array to send different variations to different recipients. When provided, this will override 'To', 'CC', and 'BCC' inputs. Each personalization will automatically include the dynamic template data. | |
| Reply To Email | Email To Reply To. | support@example.com |
| Reply To Name | Name to reply to. This field is only required when you provide a value for Reply To Email. | John Doe |
| Connection | The SendGrid connection to use. | |
| Template ID | The ID of the dynamic template to use. | 1234567890 |
| To | The recipient's email address, or a comma-separated list of recipient email addresses. Required if 'Personalizations' is not provided. Will be ignored if 'Personalizations' is provided. | john.doe@example.com,jane.smith@example.com |
{
"data": [
{
"body": {
"message": "Email sent successfully"
},
"statusCode": 202,
"headers": {}
},
{}
]
}
Send Multiple Emails
Send a separate email to each recipient | key: sendMultipleEmails
| Input | Notes | Example |
|---|---|---|
| BCC | The recipient's email address, or a comma-separated list of recipient email addresses to BCC. | john.doe@example.com,jane.smith@example.com |
| CC | The recipient's email address, or a comma-separated list of recipient email addresses to CC. | john.doe@example.com,jane.smith@example.com |
| Attachment Content | Provide attachment data to send with the email. The 'File Name' field is required when using this input and should reference the data output from a previous action. | |
| Content Id | Provide the content Id of the attachment. This value is only required when you select 'inline'. | 12345 |
| Disposition | Specifies how you would like the attachment to be displayed. | inline |
| File Name | Provide a name for the file to attach. The 'Attachment Content' field is required when using this input. | reports.csv |
| File Type | The MIME type of the content you are attaching. | text/plain |
| From Email | The sender's email address. | sender@example.com |
| From Name | The sender's name. | John Doe |
| HTML | The optional HTML body of the email. | Hello from <b>Acme!</b> |
| Multiple Attachments | Provide an array of attachments to send with the email. See https://www.twilio.com/docs/sendgrid/api-reference/mail-send/mail-send#request-body for more information. | |
| Personalizations | You can use this field to overwrite multiple properties of the email. For examples of which properties to use, checkout the SendGrid docs: https://docs.sendgrid.com/for-developers/sending-email/personalizations | |
| Reply To Email | Email To Reply To. | support@example.com |
| Reply To Name | Name to reply to. This field is only required when you provide a value for Reply To Email. | John Doe |
| Connection | The SendGrid connection to use. | |
| Subject | The email subject line. | Hello from Acme! |
| Text | The text body of the email. | Here's the body of a notification. |
| To | The recipient's email address, or a comma-separated list of recipient email addresses. | john.doe@example.com,jane.smith@example.com |
{
"data": [
{
"body": {
"message": "Example"
},
"statusCode": 200,
"headers": {}
},
{}
]
}
Test Webhook
Test an Event Webhook by sending a fake event notification. | key: testWebhook
| Input | Notes | Example |
|---|---|---|
| Connection | The SendGrid connection to use. | |
| Test URL | The URL where the test event will be sent. | https://example.com/test-webhook |
{
"data": {
"success": true,
"message": "Test event sent successfully"
}
}
Toggle Signature Verification
Enable or disable signature verification for an Event Webhook. | key: toggleSignatureVerification
| Input | Notes | Example |
|---|---|---|
| Enable Signature Verification | When true, enables signature verification for webhook requests. | true |
| Connection | The SendGrid connection to use. | |
| Webhook ID | The ID of the webhook. | 77d4a5da-7015-11ed-a1eb-0242ac120002 |
{
"data": {
"id": "77d4a5da-7015-11ed-a1eb-0242ac120002",
"public_key": "123publickeyabc"
}
}
Update Webhook
Update an existing Event Webhook configuration. | key: updateWebhook
| Input | Notes | Example |
|---|---|---|
| Enabled | When true, enables the Event Webhook. | true |
| Events | The events to track. | delivered |
| Friendly Name | A friendly name to help differentiate between multiple webhooks. | My Event Webhook |
| Connection | The SendGrid connection to use. | |
| Webhook URL | The URL where SendGrid will send event data. | https://example.com/webhook |
| Webhook ID | The ID of the webhook. | 77d4a5da-7015-11ed-a1eb-0242ac120002 |
{
"data": {
"enabled": true,
"url": "https://emaildelivery.example.com",
"group_resubscribe": false,
"delivered": true,
"group_unsubscribe": false,
"spam_report": true,
"bounce": true,
"deferred": true,
"unsubscribe": true,
"processed": true,
"open": true,
"click": true,
"dropped": true,
"friendly_name": "Delivery Webhook",
"id": "77d4a5da-7015-11ed-a1eb-0242ac120002",
"oauth_client_id": "a835e7210bbb47edbfa71bdfc909b2d7",
"oauth_token_url": "https://oauthservice.example.com",
"created_date": "2023-01-01T12:00:00Z",
"updated_date": "2023-02-15T10:00:00Z"
}
}
Changelog
2026-01-27
Added the Managed Webhook Events trigger to receive event webhook notifications from SendGrid. It will automatically create and manage a webhook subscription when an instance is deployed, and removes the subscription when the instance is deleted.
2025-06-18
Added an inline data source for Contacts and Lists to enhance list selection capabilities
2025-05-27
Added list management and contact import support for improved email campaign management