Workflow Send Email Actions
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
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.
Create
Section titled “Create”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.
HTTP Request
Section titled “HTTP Request”POST /api/v1/workflows/:workflow_id/send_email_actions
URL Parameters
Section titled “URL Parameters”| Parameter | Description |
|---|---|
| workflow_id | The ID of the workflow that the action will be added to |
Update
Section titled “Update”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.
HTTP Request
Section titled “HTTP Request”PUT /api/v1/workflows/:workflow_id/send_email_actions/:id
URL Parameters
Section titled “URL Parameters”| Parameter | Description |
|---|---|
| workflow_id | The ID of the workflow being updated |
| id | The ID of the send-email action to update |