Workflow Date Field Triggers
Valid Attributes
Section titled “Valid Attributes”| Attribute | Description | Details |
|---|---|---|
| account_id | ID of the account the trigger belongs to | Cannot be set. |
| field_id | ID of the Field whose value determines the trigger date | Required. Must reference a date field. |
| ignore_year | When true, only month and day of the stored date are relevant | Required. Boolean. |
| offset | Number of days added to (positive) or subtracted from (negative) the date | Required. Integer. Example: -1 is one day before, 1 is one day after. |
| offset_unit | Unit for the offset | Required. Currently only day is supported. |
Create
Section titled “Create”Example request:
{ "data": { "type": "workflow_date_field_trigger", "attributes": { "field_id": "6d3c5c2a-b4e9-41d0-a4c8-3327f9012abc", "ignore_year": true, "offset": 1, "offset_unit": "day" } }}Example response:
{ "data": { "id": "ad21caa3-c798-4be2-8af4-019fec9b21be", "type": "workflow_date_field_trigger", "attributes": { "account_id": "c2546da1-e5ef-4f31-a205-9539c45805d2", "field_id": "6d3c5c2a-b4e9-41d0-a4c8-3327f9012abc", "ignore_year": true, "offset": 1, "offset_unit": "day" } }}Creating a date field trigger also creates the associated workflow trigger linking it to the workflow.
HTTP Request
Section titled “HTTP Request”POST /api/v1/workflows/:workflow_id/date_field_triggers
URL Parameters
Section titled “URL Parameters”| Parameter | Description |
|---|---|
| workflow_id | The ID of the workflow the trigger will be attached to |
Update
Section titled “Update”Example request:
{ "data": { "type": "workflow_date_field_trigger", "attributes": { "offset": 7 } }}Example response:
{ "data": { "id": "ad21caa3-c798-4be2-8af4-019fec9b21be", "type": "workflow_date_field_trigger", "attributes": { "account_id": "c2546da1-e5ef-4f31-a205-9539c45805d2", "field_id": "6d3c5c2a-b4e9-41d0-a4c8-3327f9012abc", "ignore_year": true, "offset": 7, "offset_unit": "day" } }}This endpoint updates a date field trigger in a workflow.
HTTP Request
Section titled “HTTP Request”PUT /api/v1/workflows/:workflow_id/date_field_triggers/:date_field_trigger_id
URL Parameters
Section titled “URL Parameters”| Parameter | Description |
|---|---|
| workflow_id | The ID of the workflow that the trigger belongs to |
| date_field_trigger_id | The ID of the date field trigger to update |