Flows

A flow is a reusable block of logic that can be called from any app in your solution. Flows are used to encapsulate integrations and business logic once, and then reuse them across apps without rebuilding them each time.

Flows can be thought of as functions at the solution level: they accept inputs, run logic, and return results. A single flow can be called from many apps, so any change made to the flow propagates everywhere it is used.

A flow can be used to:

  • Encapsulate an integration with an external system, such as Brønnøysund, Google Drive, or Visma, so that the same integration logic is shared across apps.

  • Implement shared business logic, such as a customer lookup or a status transition, that would otherwise be duplicated per app.

circle-info

Server-side execution Flows run on the server. This makes them well-suited for integrations, data aggregations, and any logic that should not run in the browser.

circle-info

Flows and schemas Flows often send and receive data that does not need to be persisted. To support this, flows are paired with schemas, a way to describe external data structures. Schema data can be used directly as input and ouput in actions without first being modelled as an object class.

Actions

A flow consists of one or more actions. An action is the unit of logic within a flow and works in much the same way as an action in an app or service - it is composed of action nodes that run in sequence.

Available action nodes

Flows currently support a subset of the platform's action nodes. Action nodes that are specific to apps, such as navigation nodes, are not available in flows.

The following action nodes are available in flows:

Data: Create Object, Read Objects, Update Object, Delete Objects, Persist Objects

Logic: While, Foreach, Next Iteration, Exit Loop, Exit Block, If, Block, Catch Exception, Throw Exception, End Execution, Sleep

Other: Run Action, Run Flow, Web Request, Send Email, Send SMS, Create Shortlink, Update Secret

Debug: Log to Console

Inputs and outputs

An action inside a flow defines the data it accepts as inputs and the data it returns. Inputs are passed when the flow is called, and outputs are returned to the caller once the flow completes.

Inputs. Flow inputs are defined using action params. Action params on flows can be simple data types, enumerated types, object class references and schemas, the latter allowing structured data to be passed into a flow without first modelling it as an object class.

Outputs. A Flow returns output through two mechanisms:

A flow can return any number of action variables and action data sources as part of its output. Once the flow completes, they are available to the calling action in the same way any action variable or data source would be.

Calling a Flow

Flows are called from an action using the Run Flow action node. Input values are mapped from the calling context — data sources, app variables, or function results — into the flow's input parameters. Once the flow completes, its output action variables are available to subsequent action nodes in the calling action.

Flows can be called from:

  • Actions in apps

  • Actions in flows

Secrets

Flows access credentials and other sensitive values through secrets, the same mechanism used elsewhere in the platform. Store any API keys, tokens, or passwords required by a flow as secrets, and reference them from within the flow's actions.

Last updated

Was this helpful?