Skip to content

Workflow Send Email Actions

List of valid attributes:

Attribute Description Specifics
subject Email subject Required, supports liquid templates
body Plain-text email body Required, supports liquid templates
fixed_emails List of fixed recipient email addresses Optional, validated with the standard email format; can be combined with user_ids
user_ids List of account user IDs Optional; only active users should be newly selected; can be combined with fixed_emails
previous_action_id ID of the previous workflow action in the sequence Optional

At least one recipient must be configured via fixed_emails and/or user_ids.

Example request:

{
"data": {
"type": "workflow_send_email_action",
"attributes": {
"subject": "Payroll for {{ user.name }}",
"body": "Please process payroll for {{ user.name }}.",
"fixed_emails": ["payroll@example.com"],
"user_ids": ["6d9b9b37-c047-4bc9-a2ed-e22d1a443fe6"],
"previous_action_id": "9ee58efe-7ce5-4143-99d3-954303b188f3"
}
}
}

Example response:

{
"data": {
"id": "85579c3b-22ea-43b8-ab79-d60d05680be5",
"type": "workflow_send_email_action",
"attributes": {
...
}
}
}

This endpoint adds a new send-email action to a workflow.

POST /api/v1/workflows/:workflow_id/send_email_actions

Parameter Description
workflow_id The ID of the workflow that the action will be added to

Example request:

{
"data": {
"type": "workflow_send_email_action",
"attributes": {
"subject": "Updated subject",
"body": "Updated body",
"fixed_emails": ["hr@example.com"],
"user_ids": []
}
}
}

Example response:

{
"data": {
"id": "85579c3b-22ea-43b8-ab79-d60d05680be5",
"type": "workflow_send_email_action",
"attributes": {
...
}
}
}

This endpoint updates a send email action in a workflow.

PUT /api/v1/workflows/:workflow_id/send_email_actions/:id

Parameter Description
workflow_id The ID of the workflow being updated
id The ID of the send-email action to update