Build and execute workflows of workflows.
alias
trigger_input
to pass data into a child workflowOutput Schema
to define the data returned from a child workflowcore.workflow.execute
action to call a workflow from another workflow.
You can call a workflow by workflow_alias
(recommended) or by workflow_id
.
alias
to call them by a human-readable name, in core.workflow.execute
, as opposed to the workflow ID.
trigger_inputs
in the core.workflow.execute
action’s inputs.
trigger_inputs
takes a JSON-serializable object exactly like webhook payloads.
For example, the core.workflow.execute
action inputs might be configured as:
wait_strategy
parameter controls how the core.workflow.execute
action behaves after creating a child workflow:
detach
(default): The action returns immediately after creating the child workflow, without waiting for it to complete. The parent workflow continues execution.wait
: The action waits for the child workflow to complete before marking itself as complete. Use this when you need the child workflow’s result.detach
(default) when:wait
when:detach
mode:Output Schema
for every workflow.ACTIONS
, TRIGGER
, FN
within the Output Schema
field.Output Schema
field under the Schemas
tab in workflow settings allows you to define the data returned from a workflow.
Output Schema
field can be configured as a nested JSON object:
Get weather
that calls a weather API for the temperature.
Let’s build another workflow that calls the Get weather
workflow for three different locations (New York, London, and Tokyo).
Parameterize child workflow
Get weather
workflow.
Let’s change this so that we can pass in coordinates from the webhook trigger into the HTTP Request
action.Create parent workflow
core.workflow.execute
actions to the workflow, one for each location.
Configure each core.workflow.execute
action to call the Get weather
workflow (with alias get_weather
) with the appropriate coordinates.wait_strategy: wait
here because we want to see the temperature results in the parent workflow.
If you don’t need the results and just want to trigger the child workflows, you can omit this parameter to use the default detach
mode.Run parent workflow
Action result
that the child workflow returns the entire workflow context as the output of the parent workflow.
In this next step, we’ll add an Output Schema
to the Get weather
child workflow to return only the temperature.Add output schema
Output Schema
to the Get weather
workflow.
Configure the Output Schema
to return only the temperature.
Save the workflow.Rerun parent workflow
Action result
that the child workflow now returns only the temperature.