Execute workflow — Runs another workflow — waits for it, or starts it and carries on — calls another workflow in the same workspace, as one of this workflow's steps. Build the work you repeat once — Prepare and email the order summary, say — and call it from every workflow that needs it. Change it in one place, and every caller uses the change once you publish it.
Who can do this
Workspace Admins and Editors, on every plan.
Before you start
The workflow you call must start with the trigger When called by another workflow, and must be published and switched on. See Start a workflow when another workflow calls it.
Steps
- Select + where the call should happen. In the step picker, open Logic and select Execute workflow. Or search execute.
- In Workflow, choose the workflow — for example Prepare and email the order summary. Published workflows in this workspace that start with “When called by another workflow” are listed, each with its live version: Published v7, or Published v7 · switched off.
- Under Fields it needs, fill in each field the called workflow asks for — drag in values from Data from earlier steps, such as
{{ $json.customer_email }}. Each row shows the field's type and whether it is needed, such as Number · Required · e.g. 1499. Read from the called workflow's trigger. If it changes, this list changes with it. - Choose Wait for it to finish:
- Wait (the default) — what its last step returns becomes this step's output. This workflow waits for it, up to the run's 15-minute limit.
- Start it and carry on — this workflow goes on at once; the output is the called run's number.
- Choose Call it:
- Once per item (the default) — one call, and one run, for each item.
- Once for all items — one call for all the items. The fields are filled in from the first item, and the called workflow also gets
items, a list of every item.
- Select Run this step, then check Output.
Output
With Wait, the fields of what the called workflow's last step returned — its first item — plus run, the called run's number, runId, and status, Finished. A file on that item comes back too. If the last step returned a single value rather than fields, it is under result.
With Start it and carry on, run, runId and status, Started.
What happens next
- Each call is its own run on Runs, marked Called by #2041 — or Called by a test run. Its page says Called by run #2041 · Weekly sales summary · step “Execute workflow”, with item 2 of 3 when the step called once per item.
- The caller's run lists the runs its step made. Open the step on the run's page: Called 3 runs, each with its number, workflow, outcome and how long it took, and each opening on its own page.
- A called run counts as a run towards your plan's runs — even when the caller is a test. See What counts as a run.
- Run again on a called run runs it again with the same input, on its published version. The caller is not run again, and the new run is not linked to it.
Good to know
- The called workflow always runs its live version, not its draft, and in the caller's environment — even when you test the caller. A field you add to its trigger appears under Fields it needs once you publish it.
- Five deep at most. A workflow can call one that calls another, up to five levels; the sixth call fails.
- A workflow cannot call itself.
- When the called workflow gains a required field, this step shows Needs setup until you fill the field in. See Fix steps marked Needs setup.
- Values are sent as the field's type. A number that arrives as text, such as 1499, is sent as a number; a value that cannot be read as the type stops the step. An optional field left empty is not sent.
- With Wait, the called workflow must finish in one go. If it pauses on a Wait step, this step fails — the called run carries on by itself. Choose Start it and carry on for a workflow that waits.
- With Wait, a failed called run fails this step and names the step it failed at. Use the step's If this step fails setting to carry on instead — see Choose what happens when a step fails.
If something goes wrong
On the run, each message follows the step's name, such as Execute workflow: A workflow cannot call itself.
| What the run says | Why | What to do |
|---|---|---|
| “order_total” is required by Prepare and email the order summary, and was empty for item 2. | A required field had no value for that item. | Fill it in, or give it a default with Set / Edit Fields. |
| “order_total” should be a number, and got “…”. Prepare and email the order summary expects it as number. | The value cannot be read as the field's type — a number, a date, true or false, a list or an object. | Check the value on the step's Input tab, and fix it before this step. |
| … is switched off, so it cannot be called. Switch it on, or choose another workflow. | The called workflow is off. | Switch it on. See Switch a workflow on or off. |
| … is not published, so it cannot be called. Publish it, or choose another workflow. | The called workflow has no published version. | Publish it. |
| … doesn't start with “When called by another workflow”, so it cannot be called. Choose another workflow. | The called workflow's live version starts with another trigger. | Change its trigger back and publish it, or choose another workflow. |
| The workflow this step calls no longer exists. Choose another. | The called workflow was deleted. | Choose another workflow. |
| Workflows can call each other five deep. This call would be the sixth: … → … → …. | Too many levels of calls. | Call fewer levels — merge two of the workflows. |
| A workflow cannot call itself. | The step calls its own workflow. | Choose another workflow. |
| Run #212 failed at “Email the summary”. This step fails with it; open the run to see why. | The called run failed. | Open the run from the step's Called 1 run list on this run's page, and fix it there. |
| … paused on a Wait — a caller can only wait for a workflow that finishes in one go. Choose Start it and carry on, or take out the Wait. | The called workflow has a Wait step. | Choose Start it and carry on, or take the Wait out of the called workflow. |
| … could not be called: … | The called run could not start — the end says why. | Act on the reason given. |
| Needs setup: “order_total” is required by the workflow it calls. Fill it in under Fields it needs. | The called workflow's trigger has a required field this step leaves empty. | Fill it in under Fields it needs. |
| Needs setup: fill in workflow. | No workflow is chosen. | Choose one in Workflow. |