Email Action
Send email notifications automatically after a webhook delivery succeeds, fails, or on every attempt. Templates support Handlebars interpolation with full access to the event payload and delivery response.
Overview
The Email Action node is a post-delivery action that fires after an webhook processes an incoming webhook event. It renders an email from a configurable template and sends it to one or more recipients. The node appears on the canvas with a rose/pink color.
Configuration
The following fields configure an Email Action node.
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Friendly label for the email action |
| to | string | Yes | Recipient email address. Supports template strings. |
| subject | string | Yes | Email subject line. Supports Handlebars templates. |
| body | string | Yes | Email body (HTML). Supports {{payload.*}}, {{response.status}}, {{response.body.*}}. |
| triggerOn | string | No | success, failure, or always. Default: success. |
| inputNodes | { nodeType, nodeId }[] | Yes | Upstream nodes that feed this one |
| isActive | boolean | No | Enable or disable without deleting. Default: true. |
Create an Email Action
Send a POST request to create a new email action.
curl -X POST /api/email-actions \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Order Confirmation Email",
"to": "{{payload.customer.email}}",
"subject": "Order #{{payload.order.id}} confirmed",
"body": "<h1>Thank you, {{payload.customer.name}}!</h1><p>Your order #{{payload.order.id}} totaling {{payload.order.total}} USD has been confirmed.</p><p>Delivery status: {{response.status}}</p>",
"triggerOn": "success",
"inputNodes": [{ "nodeType": "webhook", "nodeId": "6642f1a2c3b4d5e6f7890123" }],
"isActive": true
}'Response
{
"_id": "6642f2b3d4e5f6a7b8901234",
"name": "Order Confirmation Email",
"to": "{{payload.customer.email}}",
"subject": "Order #{{payload.order.id}} confirmed",
"body": "<h1>Thank you, {{payload.customer.name}}!</h1>...",
"triggerOn": "success",
"inputNodes": [{ "nodeType": "webhook", "nodeId": "6642f1a2c3b4d5e6f7890123" }],
"isActive": true,
"organizationId": "6640a1b2c3d4e5f6a7890001",
"createdAt": "2025-05-14T10:30:00.000Z",
"updatedAt": "2025-05-14T10:30:00.000Z"
}Update an Email Action
Use PATCH to update specific fields without replacing the entire resource.
curl -X PATCH /api/email-actions/6642f2b3d4e5f6a7b8901234 \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"triggerOn": "always",
"subject": "[{{response.status}}] Order #{{payload.order.id}}"
}'Response
{
"_id": "6642f2b3d4e5f6a7b8901234",
"name": "Order Confirmation Email",
"to": "{{payload.customer.email}}",
"subject": "[{{response.status}}] Order #{{payload.order.id}}",
"body": "<h1>Thank you, {{payload.customer.name}}!</h1>...",
"triggerOn": "always",
"inputNodes": [{ "nodeType": "webhook", "nodeId": "6642f1a2c3b4d5e6f7890123" }],
"isActive": true,
"organizationId": "6640a1b2c3d4e5f6a7890001",
"createdAt": "2025-05-14T10:30:00.000Z",
"updatedAt": "2025-05-14T11:00:00.000Z"
}Looking for Gmail?
Gmail used to live here as a provider setting. It is now its own node, with seventeen operations, its own Google credential and the AI toolkit: see Gmail. Existing nodes moved over automatically, keeping their credential and configuration.
Email Action sends through Resend and does one thing: render a template and deliver it. No mailbox, no threads, no labels — and no credential to connect.
Canvas Integration
On the visual canvas, the Email Action node uses the type email-action and is rendered with a rose/pink color scheme. Connect it to any webhook node to trigger emails after deliveries.
The node displays the action name, the recipient address, and the current trigger mode. Edges from webhooks flow into the email action node, indicating the post-delivery relationship.
Payload Examples
Incoming Webhook Payload
{
"type": "order.completed",
"customer": {
"name": "Jane Doe",
"email": "[email protected]"
},
"order": {
"id": "ORD-9821",
"total": 149.99,
"items": [
{ "sku": "WIDGET-01", "qty": 3 },
{ "sku": "GADGET-05", "qty": 1 }
]
}
}Rendered Email
Subject: Order #ORD-9821 confirmed
<h1>Thank you, Jane Doe!</h1>
<p>Your order #ORD-9821 totaling 149.99 USD has been confirmed.</p>
<p>Delivery status: 200</p>Template Variables Available
| Variable | Description |
|---|---|
| {{payload.*}} | Any field from the original webhook event payload |
| {{response.status}} | HTTP status code from the webhook delivery |
| {{response.body.*}} | Parsed JSON body from the webhook response |
Use Cases
Order Confirmation Emails
Attach an email action to your payment processing webhook. When a payment webhook is delivered successfully, send the customer an order confirmation with their order details pulled from the payload.
Failure Notifications to Engineering
Set triggerOn to failure and send an alert to your engineering team whenever a delivery fails. Include the response status and body for debugging context.
Audit Trail Emails
Use triggerOn: always to send an email on every delivery attempt, creating a simple email-based audit trail of all webhook activity for compliance purposes.
triggerOn: always, the email is sent at most once per event. Delivery retries do not re-send.API Reference
| Method | Webhook | Description |
|---|---|---|
| GET | /api/email-actions | List all email actions for your organization |
| POST | /api/email-actions | Create a new email action |
| GET | /api/email-actions/:id | Get a single email action by ID |
| PATCH | /api/email-actions/:id | Update an email action |
| DELETE | /api/email-actions/:id | Delete an email action |