Guides

How automations work

This is the idea that makes Meisa integrations small: your app syncs state, and automations configured in the dashboard react to changes in that state. Understanding automations tells you what's worth syncing.

You sync, Meisa reacts

An automation is a trigger plus optional conditions plus actions. Your team builds them in the dashboard — you don't create them via the API. But every automation runs as a side effect of the API calls you already make.

So a plan upgrade in your app becomes one line of integration code — an upsert — and Meisa does the rest:

your code
# After a successful upgrade, just sync the new state:
POST /contacts/upsert/
{ "email": "[email protected]", "custom_fields": { "plan": "pro" } }

# Meisa detects plan changed free -> pro and runs your automation:
#   - remove tag "free-plan", add tag "paying-customer"
#   - enroll in the "welcome-pro" sequence
# No extra API calls from you.

Triggers your API calls can fire

TriggerFires when
contact_createdThe first upsert of a new contact.
contact_updatedAn upsert that changes fields (the changed fields, including custom_fields.*, are available to conditions).
tag_addedA tag is added (via tag_names on upsert, or add_tag).
tag_removedA tag is removed.
custom_eventYou POST to /events/track/ with a matching event_name.
sequence_enrolledA contact is enrolled in a sequence.

Automations can also act on conditions over the contact (segment-style rules on fields and tags). Actions include adding/removing tags, updating a custom field, enrolling or removing from a sequence, and sending a notification.

Mapping your needs to the API

When you want to……your app does this
Send a one-time code / receipt / password resetPOST /emails/trigger/ with a trigger_key
Start onboarding on signupUpsert the user; an automation enrolls them
Tag/segment by plan, churn, or upgradeUpsert the changed field; an automation tags them
React to an in-product actionPOST /events/track/ with an event_name
Avoid emailing unsubscribed/bounced usersPoll /contacts/api/unsubscribed-emails/ and suppress locally
Send a marketing announcement to a segmentDo it in the dashboard — not via this API

Example automations

WhenThen
plan changes from free to any paid valueAdd tag paying-customer, remove free-plan, enroll in welcome-pro
plan changes to churnedAdd tag churned, enroll in win-back sequence
custom event feature_activated is trackedSend a power-user tips email
onboarding_completed becomes trueRemove from onboarding sequence, add tag activated

The takeaway for your integration

Sync the fields and events your automations key off of, and you're done. You don't reimplement lifecycle logic in your app — you keep Meisa fed with accurate state and let your team own the rules.