Subflows
Call a reusable Attio workflow for a record, pass the data it needs through named inputs, and choose whether the calling workflow waits for its answer.
Before you start
Use the current Advanced Workflow Automations app with named inputs and outputs. Complete Automations setup. Subflows require Paid or an active trial.
Install the app through All apps in Neon Deer. Its public Attio marketplace listing is pending.
A subflow is a workflow called by another workflow. For example, several sales workflows can call the same company-routing process, passing it the company and the context needed to choose an owner.
Use scheduled workflows when a record should enter a workflow at a future date and time instead.
Video walkthrough
Watch how to combine a reusable subflow with lookup-table data in Attio.
Define the inputs and outputs on the called workflow
- Add Start a subflow to the reusable Attio workflow. Choose the
Objectwhose records it accepts. - Give the workflow a descriptive name, such as
Route company owner, so callers can recognize it. - Under
Inputs, chooseAdd inputfor each value the workflow needs. Name the inputs after the data they carry, such asRegion,Customer segment, andRequest source. - Under
Outputs, chooseAdd outputfor each value the subflow will return. Use descriptive names, such asOwner email. - Add the steps to reuse. Read the named values from the trigger's
Inputsoutputs, and use itsRecordoutput for the Attio record. - Add Return from a subflow. Map
Subflow IDfrom the trigger, chooseStatus, and add values underOutputsin the same order as the outputs declared on Start a subflow. - Turn the workflow on. Its subflow can then be selected by a calling workflow for the same object.
Named inputs carry text. Pass the Attio record separately through Record. Input and output names must be distinct within their own list and start with a letter; avoid names that differ only in spacing or punctuation. Define the inputs your process needs, rather than mapping data into fixed numbered input slots.
If you need to use an input as a number, date, or true/false value, add Convert value inside the subflow. Map the named input into Input value and select its Target type; the block validates and formats it, returning standardized text for later steps.
The return step sends the result to the workflow that called this run. Use the Subflow ID from this run's trigger; do not hardcode an ID from an earlier run.
Pass data from the calling workflow
- Add Call a subflow to the calling workflow. Choose
Object, the matchingSubflow, and theRecordto send. - The selected subflow's named input fields appear. Fill them with text or map values from earlier steps in this workflow. An input left unfilled arrives as empty text.
- Leave
Wait for a resultselected when the next steps need the answer. It is selected by default. After the subflow returns, those steps can useStatusand the named fields underOutputs, such asOwner email. - Clear
Wait for a resultwhen the caller should continue immediately or the subflow is expected to take longer than the waiting limit. The caller receives no returned values in this mode.
Inside the subflow, use the values from Start a subflow → Inputs in subsequent steps. For example, a Region value from a form lookup in the calling workflow can become the value used by a routing lookup in the subflow.
Inputs carry text into the subflow, and outputs carry text back to a waiting caller. Define output names on Start a subflow, then supply their values in the same order on Return from a subflow. The caller receives Status and those named fields under Outputs.
Waiting for a result: the 15-minute limit
A calling step that waits for a result has a hard limit of 15 minutes from when Neon Deer accepts the call. The Timeout setting defaults to 15 minutes; you can choose a shorter wait. If the subflow does not return within the selected timeout, the calling step fails. A workflow that waits on a person, includes a long delay, or depends on a slow external process may exceed that window.
For a longer-lived subflow, we recommend clearing Wait for a result on Call a subflow. The calling workflow continues immediately, and the subflow runs independently. Put any steps that depend on that work inside the subflow, because the caller will not receive its returned values.
If a waiting call times out, review the subflow's run in Attio before trying again. A failed waiting step does not prove that the subflow's earlier actions failed or were undone.
Example: share a company-routing process
Create a Companies subflow named Route company owner. Define the text inputs Region, Customer segment, and Request source. Declare Owner email under Outputs on that trigger. In the routing steps, read the incoming values from the trigger's Inputs outputs.
| Input | Demo-request workflow | Partner-referral workflow |
|---|---|---|
| Region | North America | Europe |
| Customer segment | Enterprise | Mid-market |
| Request source | Demo form | Partner referral |
Each caller maps its company into Record and its context into these named fields. The shared workflow uses a lookup table and its own conditions to choose an owner. On Return from a subflow, choose Succeeded and add the owner's email as the first value under Outputs, corresponding to Owner email on the trigger. Return Failed when no owner is found.
When a caller waits for the answer, it checks Status and uses Outputs → Owner email in its next step. Changing the shared routing workflow updates the process used by both callers.
Failed is a returned status your calling workflow can branch on. It is different from a call that could not start or failed to receive a return.
Use several starting points in one workflow
A workflow can contain both Start a scheduled run and Start a subflow triggers, or several Start a subflow triggers. Choose the intended starting point in the caller. The picker distinguishes multiple triggers in the same workflow. Each trigger has its own configuration. Each subflow trigger defines its own named inputs and outputs.
Keep callers in sync when inputs or outputs change
After adding, renaming, or removing an input or output, turn the updated workflow on and review every Call a subflow step that uses it. Choose the subflow again, check input mappings, and update later steps that use returned outputs. If you change output order, update the values on every Return from a subflow step to match.
If the step reports that the subflow's inputs have changed, open that step and check its inputs. Renaming an input does not automatically move an existing caller's value to the new name. Inputs that the caller leaves unfilled arrive as empty text.
Review calls and resolve problems
In Automations → Scheduled runs, choose Type → Subflow runs. Open a run to see which workflow called it and follow the link to the calling run in Attio.
If the subflow is missing from the picker, check that it is on, has the intended Start a subflow trigger, and uses the selected object. If a waiting call does not receive a result, check that the called workflow reaches Return from a subflow with the correct Subflow ID within the 15-minute waiting limit. Review both workflows in Attio before retrying work that may already have changed records.
The first return decides the result. Later returns do not replace it. Check any calling-step error and the Activity page before trying again.