About helper flows
Helper flows allow for more efficient management and running of parent flows such as an application event-driven or API Endpoint flow.
In the Workflows interface, a child flow is now referred to as a helper flow. The functionality for such flows remains unchanged.
Helper flows are useful in several scenarios:
You have a series of steps that get used more than once in a single flow or across multiple flows. By moving that series of steps into their own "helper flow" you created them just once but you can use them repeatedly. You run the steps from other flows by using the Call Flow or Call Flow Async functions.
You want to process a list, one item at a time. For example, you can run a series of steps on each list item using the For Each function or you can transform a list into a new list (one item at a time) using the Map function.
You just want to break a very large flow into smaller, more manageable parts.
Helper flows are helpful for List Functions because they allow you to go through each item of a list. These helper flows can have inputs that correspond to the type of item in the list, function perform a task on each item, and a return (found in the Control category).
For example, you can convert an object into a list of objects, where each key/value pair is converted to object that has
propertyvalue keys. This is a common pattern among cloud APIs. The
propertyname also needs to be prefixed with
custom:. You can do that with a helper flow. It accepts key, value, and a constant prefix (which is the same across all iterations; the parent flow passes this in), and returns back an object with two keys.
That flow, when used with object.map, will turn this object:
Each helper flow card has the following outputs:
|Inputs to this Flow||Click Click or drag to create to add custom fields. Give each a name and data type (such as Text or Number). Each custom field you create corresponds to an expected input from any flow that calls your helper flow.|
|context||Outputs in this section are automatically assigned values whenever the flow runs.|
|Index||This number output is assigned a value when the flow is called from a function that loops through the items of a list (such as the For Each or Map functions). The value of Index corresponds to the item's position in the list (starting with zero) processed by this particular instance of the flow.|
|Caller||The keys of the Caller object tell you which flow called the helper flow (id and name), which particular execution of the flow made the call (execution_id), and which particular step in the flow (method, which is an unique ID). When the helper flow is manually run, then id and execution_id are null. This is especially useful for debugging purposes.|
Object output is assigned a value when the flow is called for error handling. See Set error handling for cards in flows.
The value of Error corresponds to the raw error object returns by the application or action that caused the error. For example, an object that will often have keys that include "message", "statusCode" and "execution" (the unique identifier of the flow execution that caused the error, which can be used to construct a URL to the execution history that shows the flow details that led to the error).
|Execution ID||Unique ID of the flow instance.|