An automation starts with a trigger, shown as “When …”, and runs its steps from top to bottom. Steps can send emails, create PDFs, add or update records, move an entry to another stage, branch, repeat, wait, and call other systems. You build automations in the form builder, step by step, choosing values from the entry rather than typing references by hand.
What can start an automation
| Group | Triggers |
|---|---|
| While someone fills in the form | Answer changes, Page is reached, Button is clicked |
| When something happens to an entry | Form is submitted, Entry is started, Team field changes, Team button is clicked, Stage changes, Approval is decided |
| On a schedule | Every day / week, Before or after a date answer, No change for a while, In a stage too long |
| From another system | API request |
An optional Only run if condition decides whether a run starts at all. See triggers.
What an automation can do
| Kind | Steps |
|---|---|
| Notify | Send email, Send Slack message, Send to webhook |
| Logic | If, Switch, For each, Calculate, Wait, Stop, Skip to next item |
| Records | Find a row or entry, Find records, Create entry or row, Update entry or row, Delete entry or row |
| Stages | Move to stage, Assign, Request approval, Remind approvers |
| Documents | Generate PDF |
| Connected apps | Call an app, for API connectors and extensions such as Stripe |
If and Switch choose one branch, then the run carries on with the step after the block. For each repeats steps for every item in a list, such as the lines of an order, and Skip to next item leaves one item and goes on with the next. Wait pauses the run for a time, until a date, or until a day of the week, and the run carries on later, even days afterwards. See steps.
Example: approve requests over an amount
For a purchase request form with a process, one automation could:
- Start when the form is submitted.
- Email the requester that the request has arrived.
- If the total is more than £500, move the entry to a stage that needs approval from Finance. Otherwise, move it straight to Approved.
A second automation could start when the approval is decided and email the requester the outcome. A third could start when an entry has been in the approval stage too long, and remind the approvers. FormWork offers starting points like these as automation templates.
This is a design example. You supply the amounts, approvers, wording and any receiving systems.
When steps run
Where a trigger sits decides how its automation runs:
- While someone fills in the form: instantly, while the person waits, so calculated values and lookups show straight away. Only quick steps are available, such as Calculate, If, Find records and Update entry or row.
- When something happens to an entry: quick steps run straight away. From the first step that contacts another system, such as Send to webhook, Generate PDF or Call an app, the rest of the run continues in the background, so nobody waits for it.
- On a schedule: in the background. FormWork checks schedules every minute.
- From another system: while the API request waits.
See run modes.
Runs, testing and failures
Every run is recorded on its entry, step by step, so you can see what happened and why. Select Test in the editor to try an automation against a real entry without sending emails, calling apps or saving anything. A finished run can be run again, which repeats its emails and updates. See runs and testing.
An automation runs after the submission or change that started it has been saved, so a failed step doesn’t undo the submission. Treat the entry’s submitted status and the success of a downstream action as separate facts. When a step that calls another system, or an Assign step, fails, steps under If it fails can run, and When it fails decides whether the run is marked as failed, stops as completed or carries on. By default it is marked as failed, so the failure shows in the automation’s runs. A Stop can also end a run as failed, with a reason. The form’s notifications can email account admins when one of its automations fails.
A sent email isn’t proof that it arrived or was read, and a request accepted by another system isn’t proof that the system acted on it. Build operational checks around the outcome that matters for your process.
Integrations
- Send to webhook sends the entry, or chosen values, to another system’s web address, or looks something up.
- Send Slack message posts to a channel through a Slack webhook.
- API connectors describe the endpoints of an HTTP API once, then offer them as steps in any automation in the project. A connector is a configurable integration point, not a ready-made integration with a particular product.
- Stripe adds a payment field and Stripe steps. See extensions.
- The API request trigger lets another system start an automation through the REST API.
Settings that need a value from the entry, such as an email address or an amount, use the value picker. See inserting values and templates for reusable email and PDF content.
Keep automations tied to a reviewed form
Automations are part of the form’s draft and go live when you publish. Once published, they apply to new events on every entry, old or new. When you change an automation that has runs waiting, the publish review asks whether to let them finish, cancel them or, where possible, carry on with the new version. Turning an automation on or off takes effect straight away, without publishing.
Previews of a draft run the draft’s automations for real, including emails. See drafts and versions and the automations guide.