How to create a Flow?
ZBrain Flows allow you to define logic for a use case in a step-by-step, modular format. These flows can be used independently or integrated within Apps and Agents to orchestrate dynamic, multi-step tasks.
Defining a Flow involves configuring a sequence of interconnected steps that determine how the system processes inputs, makes decisions and takes actions, and produces outputs. This guide walks you through the process of creating, configuring, and finalizing a Flow, from initial setup to deployment.
Steps to create a Flow
You can create a Flow either from scratch or by importing an existing flow.
Create a Flow from scratch
Click Flows and click ‘+ New Flow’ to create the Flow from scratch.

Upon navigating to the Flow page, you will see two default components:
Webhook (Catch webhook): This component is used to receive HTTP requests and trigger flows via unique URLs. The live URL for the webhook will be displayed. You can generate sample data and trigger the published Flow using this component.
Synchronous requests: If a response is required, add
/sync
to the URL. If the operation takes longer than 30 seconds, a 408 timeout will be returned. To send back data, include a webhook step with the return response action.Test URL: To generate sample data without triggering the Flow, append
/test
to the webhook URL.Authentication: You can select Basic Auth or Header Auth for authentication.

Text: The trigger input component captures incoming data from webhooks or other sources. It initiates the Flow based on predefined conditions and serves as the starting point for processing the data.

Adding components to the Flow
To create the logic:
Click the '+' icon between the default elements to add new components to your workflow.

Select components from the following four categories:
AI: Includes LLM and advanced AI tools, each offering a unique set of functions and features to enhance your workflow with intelligent capabilities.
Core components: Provides essential programming logic and helper methods to manage Flow control, data manipulation, and processing tasks. This includes foundational building blocks that control logic, manage flow structure, and handle external interactions.
Apps: Includes integrations with third-party tools like Amazon S3, Slack, JIRA, and Google Sheets, enabling seamless connections between your workflow and external applications.

Use the search bar to quickly locate your desired component.
To get detailed information on how to configure a component into your ZBrain Flow, refer -Flow components
Finalizing and publishing the Flow
Once all steps are configured:
Review your Flow to ensure all steps are correctly configured.
Click 'Save' to save the configuration and publish the flow, making it available.
Importing a Flow
To import a flow -
Click on 'Import Flow'.
It opens a file upload dialog where you can select a flow file (typically in JSON format) to import.

Once selected, click 'Import' and the Flow will be added under Flows.
Disabling steps in ZBrain Flows
You can disable individual steps within a Flow based on your business logic. This provides you with greater control and flexibility during testing, debugging, and iterative development, without altering the core structure of the Flow.
From Flows, select the particular Flow you want to modify.
Select the step you want to disable and click the three dots on the component, and click ‘Disable.’

Disabled steps are highlighted distinctly, improving workflow readability and maintenance.

Exporting the Flow
You can export the Flow to another agent or as an orchestration method for Apps using the 'Export' option available on the All Flows page.
Click the three dots beside the Status column of the particular Flow you want to export.
Select the 'Export' option, and the Flow will be downloaded in JSON format.

Last updated