App triggers: start a workflow from an app

An app trigger starts a workflow when something happens in an app you connected: an invoice is paid, an order is placed, a call is booked. You do not send anything yourself. send.io watches the app for you.

Add an app trigger

First connect the app. Then, in the automation builder, open the trigger step. It has two sources: Custom event and App. The App source shows once an app is connected.

  1. Choose the source. Click App.
  2. Pick the app. Open the list that starts with Choose an app and pick one of your connected apps. With one connected app, it is picked for you.
  3. Pick what starts the workflow. Open Choose what starts the workflow and pick one, for example "Invoice paid or payment failed". Each one has a short description under it.
  4. Fill in its settings. Some triggers have settings, such as which status to watch. A setting you leave empty means any. Required ones say (required).
  5. Start the workflow. Click Start. Starting is what makes send.io watch the app.

Triggers marked (not supported yet) need a setting the builder cannot show yet, so you cannot choose them. A trigger can also show this when an earlier trigger of the same app already watches the same kind of record. Choose that earlier one instead.

Start, stop and delete

The app must be Connected when you start. If it says Reconnect needed, reconnect it first on the Apps page.

Note: Only team admins can start a workflow with an app trigger. A member can start again a workflow that an admin already started and has not changed since.

Start a template from an app

Some automation templates describe something that happens in an app: a payment fails, an order is placed, a cart is left behind. With the right app connected, the template starts from that app and you write no code. In setup, the Events step lists the apps the template can start from, for example "Stripe: Invoice payment failed".

Note: Only the event that starts the workflow can come from an app. An event that ends a wait, such as "payment succeeded" in the failed payment template, still comes from your app. If your app does not send it, each wait runs to its end and the next email goes out.

When an app trigger stops

A workflow that an app starts can only start while the app is connected and watched. When that is not the case, the Automations list marks the workflow and shows a notice above the list, and the builder shows the same notice at the top of the workflow. Each says what happened and what to do.

Changes that happened in the app while the trigger was stopped are not replayed. Before you disconnect an app, the Apps page tells you how many switched on automations start from it.

After reconnecting an app where you pasted an address

For Stripe and Loops, reconnecting is not the whole fix. Disconnecting the app removes the trigger's webhook address for good. When the app is connected again, the trigger gets a new address, and the app still sends to the old one. Nothing starts the workflow until you paste the new address into the app.

  1. Open the automation. The notice at the top says Address changed and has a Show the address button. A live automation's trigger step is closed, so the address is shown in the notice.
  2. Replace the address in the app. Copy the new address and put it in place of the old webhook endpoint in the app. Delete the old endpoint.
  3. Wait for the next event. The notice clears when the first event arrives on the new address. Until then send.io cannot know that you pasted it, so the notice stays.

Note: send.io can only show this notice for a trigger that has received at least one event before. If you reconnect an app before its trigger ever received one, nothing can tell the old address from the new one: open the trigger step, press Show the address and check that it is the address in the app.

Apps where you paste an address

Most apps let send.io register for their events. Some do not: Stripe and Loops cannot be subscribed for you. For those, the builder shows a card, Finish in (app), with a webhook address to paste into the app.

  1. Show the address. Click Show the address. Only team admins can. A member sees "Ask a team admin to show the address."
  2. Copy it. Click Copy. If the app's webhook page is known, Open the webhook page in (app) takes you there.
  3. Paste it into the app. Add it as a webhook endpoint in the app. Choose the events that match your trigger.
  4. Start the workflow. Events from the app start the workflow once it is started.

Warning: The address changes when the trigger's settings change. If you change a setting, show the address again and update it in the app. An address that no longer matches stops the workflow from firing.

The address stays the same while you stop and start the workflow with the same settings.

Which contact a run is for

Every run is for a contact, and the record's email address decides which one. send.io reads the address from the record: the first of email, customer_email, user_email, receipt_email, customer.email, customer_details.email, billing_details.email, billing.email, billing_address.email, payer.email_address, subscriber.email_address, person_properties.email, attendees.email, emails.email and answers.email that holds a valid address. Where a field is a list, the first entry that has an address is used.

The workflow's own settings still apply to each run. For example, a workflow set to run once per contact skips a contact it already ran for, and a marketing workflow skips contacts who unsubscribed.

The record's fields in later steps

Each changed record becomes an event, and its fields are the event variables of the run. Use them in any later step, in a condition or in a field of an App action. Write {{event.field}} for a field, and {{event.parent.field}} for a field inside another (for example {{event.customer.name}}).

VariableWhat it holds
{{event.status}}A field of the record. The names are the app's own, so the variable list in the builder is the best place to look.
{{event.customer.email}}A field inside the record.
{{event._action}}What happened to the record, as the app reports it, such as updated.
{{contact.email}}The contact the run is for.

A very large record (over 100 fields or 64 KB) is kept with its top-level text, number and yes/no fields only. A record the event limits still refuse is skipped.

Repeats and order

Apps can send the same change more than once, and not always in the order it happened. send.io handles both: a repeat of a change never starts a second run. Do not rely on the order of runs, and design steps so a late, older change does not undo a newer one.

If a trigger does not fire

More in Apps: troubleshooting.

Loading your dashboard