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)

nametyperequiredconstraints
connectionstringyesName of the connection instance

Action: SEND_EMAIL

nametyperequired
actionstringyes (SEND_EMAIL)
sendFromstringyes
sendTostringyes
subjectstringyes
messagestringyes
attachmentsarray[File]no

Attachment File (same shape as other integrations)

nametyperequired
sourcestringyes
namestringyes

Action: SEND_DYNAMIC_EMAIL

nametyperequired
actionstringyes (SEND_DYNAMIC_EMAIL)
templatestringyes
templateVariablesarray[{ key: string, value: string }]yes
sendFromstringyes
sendTostringyes
attachmentsarray[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"
    }
  ]
}