Easymailing
Automation triggers

Create a contact added to group trigger

POST /automations/{automationUuid}/automation_triggers/contact_added_to_group

POST/automations/{automationUuid}/automation_triggers/contact_added_to_group

Starts the automation when a contact of the audience is added to the chosen group.

When to use: To react to a classification: welcome a contact who joins the VIP group, or begin onboarding when someone is placed in a group.

When not to use: To react when a contact leaves a group, use create_trigger_contact_removed_from_group. To react when a contact first subscribes, use create_trigger_contact_subscribed; for a given form, create_trigger_form_completed. To add contacts to a group from inside an automation, use create_step_add_to_group.

Side effects: Fires whenever the contact is added to that group: from the app (one by one or in bulk), the API (including its asynchronous group tasks), a subscription form that assigns the group, an import into the group or an add-to-group step of another automation. 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/contact_added_to_group" \  -H "X-Auth-Token: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "group": "/entity/1",    "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}