sendgrid.email.send ​
Send a transactional email via SendGrid
Send a transactional email via the SendGrid Mail Send API v3.
Inputs:
- from_address: Verified sender address (required).
- from_name: Sender display name (optional).
- to_addresses: List of recipient email addresses (required).
- subject: Email subject line (required).
- html_content: HTML email body (optional but recommended).
- text_content: Plain-text email body (optional).
Outputs (terminal state_data):
- message_id: str | None — SendGrid X-Message-Id header value
Plugin required: context.get_plugin("sendgrid") must expose .api_key.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-sendgrid |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
from_address | string | Yes | — | Verified sender address |
from_name | string | No | — | Sender display name |
to_addresses | json | Yes | — | List of recipient email addresses |
subject | string | Yes | — | Email subject |
html_content | string | No | — | HTML body |
text_content | string | No | — | Plain-text body |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
from_address | string | No | — | — |
from_name | string | No | — | — |
to_addresses | json | No | — | — |
subject | string | No | — | — |
html_content | string | No | — | — |
text_content | string | No | — | — |
message_id | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "sendgrid.email.send",
"initial_data": {
"from_address": "value",
"to_addresses": "value",
"subject": "value"
}
}