Easymailing
Automation triggers

Create a specific date trigger

POST /automations/{automationUuid}/automation_triggers/specific_date

POST/automations/{automationUuid}/automation_triggers/specific_date

Starts the automation for a contact when the date stored in a date custom field is reached, or a few days or weeks before it.

When to use: For one-off dates: an event the contact signed up for, a contract expiry or the end of a trial.

When not to use: For dates that repeat every year, such as birthdays, use create_trigger_anniversary_date. For the anniversary of the day the contact subscribed, use create_trigger_suscription_date.

Side effects: A scheduled check runs about every minute; a contact matches during the 6 hours after the date (or after the moment delay_value before it) is reached, so a field that holds only a date matches in the first hours of that day. Works only while the automation is active and the trigger is enabled, and only for contacts with a confirmed subscription. A contact that is already running through the automation is not started again; after finishing, it can enter again only if workflow_repeat is true and 24 hours have passed.

Permissions: Requires the author role or higher, or the marketing.automations.write capability.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Path Parameters

automationUuid*string

UUID of the automation, as returned by list_automations.

Request Body

The new AutomationTrigger resource

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://api.easymailing.com/automations/0df14405-90ff-4287-b3e4-ef088901ee6f/automation_triggers/specific_date" \  -H "X-Auth-Token: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "list_field": "/entity/1",    "delay": true,    "delay_value": 0,    "delay_unit": "day",    "workflow_repeat": true  }'
{  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",  "automation": "/entity/1",  "trigger_type": "trigger.admin.manual",  "active": true,  "workflow_repeat": true,  "trigger": null,  "count_automation_queues": 0,  "count_completed_automation_queues": 0,  "count_queued_automation_queues": 0,  "count_canceled_automation_queues": 0}