Skip to content

Workflow Date Field Triggers

AttributeDescriptionDetails
account_idID of the account the trigger belongs toCannot be set.
field_idID of the Field whose value determines the trigger dateRequired. Must reference a date field.
ignore_yearWhen true, only month and day of the stored date are relevantRequired. Boolean.
offsetNumber of days added to (positive) or subtracted from (negative) the dateRequired. Integer. Example: -1 is one day before, 1 is one day after.
offset_unitUnit for the offsetRequired. Currently only day is supported.

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.

POST /api/v1/workflows/:workflow_id/date_field_triggers

ParameterDescription
workflow_idThe ID of the workflow the trigger will be attached to

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.

PUT /api/v1/workflows/:workflow_id/date_field_triggers/:date_field_trigger_id

ParameterDescription
workflow_idThe ID of the workflow that the trigger belongs to
date_field_trigger_idThe ID of the date field trigger to update