Skip to content
MyAppBuilder
StableGuide

Workflow triggers

The trigger is the When of a workflow: the event that starts a run. Every workflow has exactly one. Click the When card at the top of the workflow editor to change it; the panel on the right shows the settings for the chosen type.

Workflow triggers

The trigger is the When of a workflow: the event that starts a run. Every workflow has exactly one. Click the When card at the top of the workflow editor to change it; the panel on the right shows the settings for the chosen type.

When to use

TriggerFires whenFires automatically?
A record is createdA new record of the chosen entity is savedYes
A record is updatedA record of the chosen entity changes (optionally only one field)Yes
A record is deletedA record of the chosen entity is removedYes
A form is submittedA form's submit actions create a recordYes, when the form's onSubmit list contains a Create record action
Run manually / from an actionA Run workflow action or a Test run starts itYes, from the action
An incoming webhookAnother service calls the workflow's signed URLYes — beta: the test URL runs the draft on test data, the live URL the published app on live data
On a scheduleA schedule such as every day at 09:00 or every monday at 08:00Yes, for published apps (live data) when the workflow cron runs — beta; Test run starts it now

How to configure a trigger

  1. Open the workflow in Logic → Workflows and click the When card.
  2. Choose the type under Start this workflow when.
  3. For record triggers, choose the Entity. For A record is updated you can also pick Only when this field changes (leave it on Any field to run on every change).
  4. For A form is submitted, pick the Form component (the list shows each form with its page).
  5. For Run manually, optionally choose Works on a record of so that steps can use Current record when the workflow is run with one.
  6. Optionally add Only if — an extra condition checked against the record before the run starts (for example Status is Approved).
  7. Settings save immediately.

What steps can read

  • Current record ({{record.field_key}}): the record that was created, updated or deleted, or the record passed by a Run workflow action or Test run.
  • Event data ({{event.name}}): the inputs of a Run workflow action or the JSON typed in a Test run. For A record is updated, {{event.before.field_key}} holds the value before the change.
  • Current user: the person whose action caused the run (for record triggers started from the app). For Test runs it is you, as the app owner.

Example: only when a status changes to a value

Example
When:        A record is updated
Entity:      Quotes
Only when:   Status changes
Only if:     Status is "Approved"

This is exactly what Logic → Pipelines → Add automation creates for you.

Common mistakes

  • Using a webhook without a URL. Create the test or live URL in the trigger panel (workspace admin) and sign each delivery with its secret — see Integration center. The live URL runs the published version.
  • Waiting for a schedule in the draft. Schedules run for the published version on live data (or on test data with Also run on test data), when the server's workflow cron ticks — once a day on Vercel Hobby. Use Test run to try one now; see Workflow steps › Scheduled workflows.
  • *Testing A record is updated* with the data editor and seeing nothing.** The run only happens if the chosen field actually changed; saving a record without changing that field does not fire it.
  • *Expecting A form is submitted* on a form that saves directly.** If the form has no actions on onSubmit and simply saves to its entity, use A record is created instead. (The editor also shows the manual start badge on this trigger; it still fires when the form's submit runs a Create record action.)
  • Loops between workflows. A workflow that updates the same entity it listens to can trigger itself. Nested triggering stops after 3 levels, but prefer an Only if condition that becomes false after the update.

Advanced

Record triggers are evaluated server-side after every successful createRecord / updateRecord / deleteRecord (triggerRecordWorkflows). The field filter compares the JSON of the field before and after; the Only if condition is evaluated against the resulting record with the acting user in scope. Trigger types are record_created, record_updated, record_deleted, form_submitted, manual, webhook, schedule.

Related

Was this helpful?