Use flow control steps

You can add flow control steps to your agent workflow to direct execution based on conditions, filter data, or loop over lists of items.

Flow control steps let you build complex workflows with branching logic, scoped data processing, and iterative operations.

Before you begin

Before using this feature, ensure that a Gemini Enterprise administrator has enabled the Workflow Builder feature toggle in your app's feature management settings. For more information, see Manage web app features.

Flow control step types

Workflow Builder provides three flow control step types:

  • Condition: Branch your workflow into different paths based on criteria you define. Use conditions to route execution to different steps depending on data values or step outputs.
  • Filter: Filter a list of data to process only items that match your criteria. Use filters to narrow results from a search or previous step before passing data to downstream steps.
  • Loop: Iterate over a list of items and run one or more steps for each item. Use loops to process multiple records, such as each email in a search result or each ticket in a project.

Add a condition step

App

  1. Open your Gemini Enterprise web app in a browser.
  2. Navigate to an existing agent or create a new agent.
  3. In the flow builder, click Add step.
  4. In the Add step panel, click Flow control to expand the section.
  5. Click Condition.
  6. The condition step is added to your workflow and its configuration panel opens on the right.
  7. Configure the condition criteria that determines which branch the workflow follows.
  8. Add steps to each branch of the condition.

Add a filter step

App

  1. Open your Gemini Enterprise web app in a browser.
  2. Navigate to an existing agent or create a new agent.
  3. In the flow builder, click Add step.
  4. In the Add step panel, click Flow control to expand the section.
  5. Click Filter.
  6. The filter step is added to your workflow and its configuration panel opens on the right.
  7. Configure the filter criteria to specify which items should pass through to downstream steps.

Add a loop step

App

  1. Open your Gemini Enterprise web app in a browser.
  2. Navigate to an existing agent or create a new agent.
  3. In the flow builder, click Add step.
  4. In the Add step panel, click Flow control to expand the section.
  5. Click Loop.
  6. The loop step is added to your workflow and its configuration panel opens on the right.
  7. Configure the list of items to iterate over.
  8. Add one or more steps inside the loop that run for each item in the list.

What's next