Flows
Flow represents a multi-step integration logic that can be triggered by events, on schedule, or via API.
Flows consist of nodes and always start with a trigger node.
Here is an example of a flow:
name: Sync New Contacts
key: sync-new-contacts
nodes:
contact-created:
type: data-record-created-trigger
name: Contact Created
config:
dataSource:
collectionKey: contacts
links:
- key: transform-contact-data
transform-contact-data:
type: transform-data
name: Transform Contact Data
config:
output:
firstName:
$var: input.contact-created.record.fields.firstName
lastName:
$var: input.contact-created.record.fields.lastName
email:
$var: input.contact-created.record.fields.email
links:
- key: send-contact-to-my-app
send-contact-to-my-app:
type: api-request-to-your-app
name: Send contact to my app
config:
request:
uri: https://myapp.com/api/new-contact
method: POST
body:
contact:
$var: $.input.transform-contact-dataFlow Structure
A flow consists of the following components:
name– Human-readable name of the flow.key– Name of the flow to use in your code (unique within a workspace)description– Optional description of what the flow does.nodes– A dictionary of nodes that make up the flow. Each node has a unique key and contains configuration for its behavior.parametersSchema– Schema of the flow parameters - useful for creating child flows from a parent template.parameters– Parameters of the flow (matchparametersSchema)enabled– Whether the flow is enabled.parentUuid– UUID of the parent flow (when this flow was created from a parent flow)integrationUuid– UUID of the integration this flow is created for (only for flows that have an integration)connectionUuid– UUID of the connection this flow is created for (only for flows that have a connection)isCustomized– Whether the flow is customized compared to the parent (only for flows that have a parent)
Node Structure
Each node in a flow has the following properties:
type– Node type that defines what the node does (see Node Types below).name– Human-readable name describing what this node does.config– Configuration specific to the node type.concurrency– Number of concurrent runs allowed for this node (default: 1).onError– Behavior when the node encounters an error:stop(default) orcontinue.links– Array of links to downstream nodes.
Links
Links connect nodes together and control the flow of data. Each link has:
name– Optional name for the link.key– Key of the target node to connect to.filter– Optional filter to conditionally pass outputs to the target node. The value of the filter can use any formulas and has access to the same variables as the node's configuration, with additionaloutputvariable available that represents output of the current node.
Node Types
Nodes are the building blocks of flows. Each node type serves a specific purpose and can be configured to perform different operations.
Triggers
Triggers start the flow execution. Every flow must have at least one trigger node. Flows can have multiple triggers to reuse the same logic in different scenarios.
| Type | Description | Documentation |
|---|---|---|
api-trigger | Launch flow via API with optional input | API Trigger |
schedule-trigger | Run flow on a recurring schedule | Schedule Trigger |
app-event-trigger | Launch flow when an event happens in your app | App Event Trigger |
data-record-created-trigger | Run flow when a data record is created | Data Record Created Trigger |
data-record-updated-trigger | Run flow when a data record is updated | Data Record Updated Trigger |
data-record-deleted-trigger | Run flow when a data record is deleted | Data Record Deleted Trigger |
connector-event-trigger | Launch flow on connector-specific events | Connector Event Trigger |
Function Nodes
Function nodes perform operations on data, make API requests, or interact with external systems.
| Type | Description | Documentation |
|---|---|---|
list-data-records | List all records from a data collection | List Data Records |
find-data-record-by-id | Find a single record by its ID | Find Data Record By ID |
search-data-records | Search for records using a query string | Search Data Records |
lookup-data-record | Look up a record by field values | Lookup Data Record |
find-or-create-data-record | Find existing record or create if not found | Find or Create Data Record |
create-data-record | Create a new data record | Create Data Record |
update-data-record | Update an existing data record | Update Data Record |
delete-data-record | Delete a data record | Delete Data Record |
create-data-link | Create a link between records | Create Data Link |
find-data-link | Find a link between records | Find Data Link |
delete-data-link | Delete a link between records | Delete Data Link |
api-request-to-external-app | Make authenticated API requests to external apps | API Request to External App |
api-request-to-your-app | Make API requests to your internal API | API Request to Your App |
custom-http-request | Make arbitrary HTTP requests | Custom HTTP Request |
run-javascript | Execute custom JavaScript code | Run JavaScript |
run-action | Execute a predefined action | Run Action |
integration-specific-operation | Execute integration-specific operations | Integration Specific Operation |
Control Nodes
Control nodes manage the flow of execution, transform data, and implement conditional logic.
| Type | Description | Documentation |
|---|---|---|
transform-data | Transform and reshape data | Transform Data |
filter | Filter which records continue through the flow | Filter |
for-each-v2 | Execute nodes for each item in a list | For Each |
Inputs and Outputs
When a flow starts, the trigger node receives an initial input. This could be:
- Data from an API request (API Trigger)
- Data from an external app event (Data Record Created Trigger)
- Empty object for scheduled triggers (Schedule Trigger)
- Data from an internal app event (App Event Trigger)
Each node produces an output after executing. This output is added to the input of all downstream nodes under the node's key.
For example, if a node with key transform produces output {firstName: "John", lastName: "Doe"}, the downstream nodes will receive:
{
"trigger-key": {
/* trigger output */
},
"transform": {
"firstName": "John",
"lastName": "Doe"
}
}These outputs are available for subsequent nodes as input variable.
Variables
You can use variables in the node configuration. Here are the available variables:
input- Initial flow input + outputs of all upstream nodesflowInstance- data of the current flow.flowRun- data of the current flow run.integration- data of the current integrationconnection- data of the current connectionuser- data of the current userparameters- parameters of the current flow
You can reference any upstream node's output using the $var syntax:
config:
output:
currentIntegrationId:
$var: integration.id
previousNodeOutput:
$var: input.previous-nodeUsing Flows
You can only run a flow created for a specific connection (having connectionId field). It can be either flow created for a specific connection only or an integration-level or universal flow instantiated for a specific connection.
If your flow has an API trigger, you can run it via API or SDK. Otherwise, a flow will be executed automatically when the trigger conditions are met.
See full API reference here: Flows API Reference.
Each time a flow runs, it creates a Flow Run record.
Updated about 15 hours ago
