Sendgrid Step
Sends emails via SendGrid per session. Use this step to deliver transactional messages with optional attachments or render dynamic templates with variables.
Top-level (shared)
| name | type | required | constraints |
|---|---|---|---|
connection | string | yes | Name of the connection instance |
Action: SEND_EMAIL
SEND_EMAIL| name | type | required |
|---|---|---|
action | string | yes (SEND_EMAIL) |
sendFrom | string | yes |
sendTo | string | yes |
subject | string | yes |
message | string | yes |
attachments | array[File] | no |
Attachment File (same shape as other integrations)
| name | type | required |
|---|---|---|
source | string | yes |
name | string | yes |
Action: SEND_DYNAMIC_EMAIL
SEND_DYNAMIC_EMAIL| name | type | required |
|---|---|---|
action | string | yes (SEND_DYNAMIC_EMAIL) |
template | string | yes |
templateVariables | array[{ key: string, value: string }] | yes |
sendFrom | string | yes |
sendTo | string | yes |
attachments | array[File] | no |
Example (JSON) — SEND_EMAIL
{
"connection": "sendgrid-prod",
"action": "SEND_EMAIL",
"sendFrom": "[email protected]",
"sendTo": "[email protected]",
"subject": "Your receipt",
"message": "Thank you for your purchase.",
"attachments": [
{
"source": {
"id": "file-901",
"downloadUrl": "https://files.example.com/download/file-901"
},
"name": "receipt.pdf"
}
]
}Example (JSON) — SEND_DYNAMIC_EMAIL
{
"connection": "sendgrid-prod",
"action": "SEND_DYNAMIC_EMAIL",
"template": "d-1234567890abcdef1234567890abcdef",
"templateVariables": [
{ "key": "firstName", "value": "Marc-Andre" },
{ "key": "plan", "value": "Pro" }
],
"sendFrom": "[email protected]",
"sendTo": "[email protected]",
"attachments": [
{
"source": {
"name": "details.txt",
"metadata": { "contentType": "text/plain", "size": 64 }
},
"name": "details.txt"
}
]
}Updated 22 days ago
