Define Flow
A Flow in ZBrain Builder is an operational blueprint that visually defines how your agent interacts with data, applies logic, makes decisions, and executes actions.
Get detailed information on ZBrain Flows here - Flows.
Defining a flow involves setting up a series of interconnected steps that guide the agent’s actions. This guide outlines the process of creating and configuring a flow, from initial setup to finalization.
Steps to define Flow
To define a Flow, you can either create one from scratch, import an existing Flow or import a JSON to create the flow.

1. Navigate to the Define Flow page
Upon navigating to the Define Flow page, you will see four 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.
You can replace the default Webhook trigger with other triggers, such as Human Input or Google Sheets.
Selecting other trigger options
Click on three dots on Catch Webhook and click 'Replace'.
After clicking, you will see additional trigger options to select from.


Trigger input: The trigger input component captures incoming data from the webhook or other sources. It initiates the Flow based on predefined conditions and serves as the starting point for processing the data.
ZBrain (Models): This component employs large language models to process the extracted data. Tasks such as data analysis, insight generation, summarization, classification, or other outputs are performed here, tailored to meet the specific requirements of the Flow.
Utilities (Agent output): This component handles the processed data from previous steps and sends the final output to the agent dashboard. It serves as the last step in the Flow, ensuring the result is properly delivered to the user-facing interface in the intended format.

Note: You can customize your workflow by building logic around these pre-configured components and incorporating additional elements as needed.
2. Adding components to the Flow
You can add additional Flow components to build the logic.
Follow How to create a Flow for detailed instructions on defining a Flow with components.
3. Toggle options for robust workflows
Each component includes additional options:
Continue on failure: Enable to skip the step and proceed with the Flow even if it fails.
Auto retry on failure: Automatically retry the step up to four times if it fails.

4. Finalizing the Flow
Once all steps are configured:
Review your Flow to ensure all steps are correctly configured.
Click 'Next' to continue and set up the additional settings.
Exporting and reusing the Flow
Once deployed, use the Export option to package it as a reusable template, accelerating new agent development, ensuring consistent logic, and sharing proven best practices across your organization.
From Define Flow, click 'Flow options'
Click 'Export'
The Flow will be downloaded as a JSON file

Explore advanced workflows
For more complex use cases, combine AI tools, core components, and app actions to seamlessly integrate advanced logic with third-party tools, ensuring seamless integration. This enables you to create highly customized workflows tailored specifically to your business needs.
Last updated