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.

Event received--▶Webhook delivery--▶Email Action fires

Configuration

The following fields configure an Email Action node.

FieldTypeRequiredDescription
namestringYesFriendly label for the email action
tostringYesRecipient email address. Supports template strings.
subjectstringYesEmail subject line. Supports Handlebars templates.
bodystringYesEmail body (HTML). Supports {{payload.*}}, {{response.status}}, {{response.body.*}}.
triggerOnstringNosuccess, failure, or always. Default: success.
inputNodes{ nodeType, nodeId }[]YesUpstream nodes that feed this one
isActivebooleanNoEnable or disable without deleting. Default: true.

Create an Email Action

Send a POST request to create a new email action.

bashCreate 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

json201 Created
{
  "_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.

bashUpdate Email Action
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

json200 OK
{
  "_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.

You can attach multiple Email Action nodes to a single webhook to send different emails based on different trigger modes (e.g., one for success, another for failure).

Payload Examples

Incoming Webhook Payload

jsonEvent 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

htmlRendered output
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

VariableDescription
{{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.

Email actions are idempotent per event — even with triggerOn: always, the email is sent at most once per event. Delivery retries do not re-send.

API Reference

MethodWebhookDescription
GET/api/email-actionsList all email actions for your organization
POST/api/email-actionsCreate a new email action
GET/api/email-actions/:idGet a single email action by ID
PATCH/api/email-actions/:idUpdate an email action
DELETE/api/email-actions/:idDelete an email action
Email actions count toward your plan limits. Free plans are limited to 2 email actions per organization. Upgrade to Pro for unlimited.