Senlo

Triggers and automations

One request, one email; or one event, a workflow of steps. When to use which.

# One request sends one email, now.
curl -X POST https://senlo.io/api/triggered \
  -H "Authorization: Bearer $SENLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "id": 12, "to": "ada@example.com", "data": { "resetUrl": "https://app.example.com/reset/abc" } }'

Triggers

A trigger sends one template to one recipient when your code calls POST /api/triggered. It sets the From name and From email, the default template and the locale templates.

The recipient does not have to be a contact. Nothing is stored about them except the delivery log entry.

Use a trigger when your code knows exactly which email to send and when: password resets, receipts, invitations, magic links.

Automations

An automation is a workflow drawn in the automation builder. It starts with a trigger node that listens for one event from POST /api/events, and runs for one contact.

StepWhat it does
Send emailSends a trigger's template to the contact, with the contact's metadata as merge data and the template for the contact's locale.
DelayWaits a number of minutes, hours or days before the next step.
ConditionPosts the contact (email, name, metadata) to a URL you set. A 200 takes the yes branch, anything else no.
Update contactMerges fields into the contact's metadata (tags are added, not replaced).
ExitEnds the run.

Events an automation can start on:

EventSent when
contact_addedA contact is created.
contact_updatedYour app updates a contact.
tag_addedYour app tags a contact.
order_createdYour app records a purchase.
event_triggeredAnything else; carry your own data in metadata.

Only active automations start; a paused one ignores events. While a contact has a run in progress in an automation, the same event does not start a second run for them in that automation.

Use an automation when the email depends on what the user does over time: onboarding sequences, trial reminders, a follow-up a few days after an order.

Cloud only

On senlo.io each started run counts toward the plan's monthly automation runs, and each email toward its monthly emails. A run that would go over the limit is refused with 402. See Errors.

Which one

You want toUse
Send an email your code decides on, right nowTrigger
Send to an address that is not a contactTrigger
Send a sequence, with waitsAutomation
Branch on something your backend knowsAutomation with a Condition step
Let non-developers change who gets what, without a deployAutomation

Both send through the same templates, provider, suppression list and unsubscribe links.

Edit this page on GitHub