Checkbox

Checkbox Input in AgenticFlow AI

What is a Checkbox Input?

A Checkbox Input is an input component that allows you to enter a checkbox for boolean (i.e., True/False) values. This component is used to capture binary decisions or states within your workflow.

When to Use the Checkbox Input Component

The Checkbox Input component is suitable for scenarios that require a binary decision or state, such as:

  • True/False

  • Selected/Unselected

  • Enabled/Disabled

How to Add a Checkbox Input to Your Custom Workflow

The Checkbox component is listed under User Inputs. You can add it to your workflow using the main section or the sidebar.

Adding a Checkbox Input

  1. Navigate to the Workflow page.

  2. Click on + Create Workflow or select an existing workflow.

  3. In the empty state or within your workflow, click on + Add Input.

  4. Select Checkbox Input from the list of input components.

Checkbox Input Settings

Title

The title of your input component.

Description

Describe what this input is or will be used for. This helps users understand the purpose of the input.

Variable Name

Located at the bottom left and marked in green, you can rename the variable. Use this name to access the data in your workflow.

Optional/Required

Located at the top right, indicating whether the input is mandatory for the workflow to run:

  • Optional: The input is not required for the workflow to function.

  • Required: The input must be provided before the workflow can start.

Setting a Default Value

To set a default value for a Checkbox Input component:

  1. Check or uncheck the box to set the desired default state.

  2. Click on the small setting icon at the bottom right.

  3. Click on Set Current Value to save the default value.

Accessing the Value

To access the entered data, use the variable name within double curly braces {{}}.

For example, if the variable name is checkbox, you can access it as:

  • {{checkbox}} in most workflow steps.

  • params.checkbox in a JavaScript step.

Example Usage in a Prompt:

If the option is enabled: "{{checkbox}}", proceed with the advanced analysis.

Practical Example

Example Workflow: Enabling Advanced Analysis

  1. Add a Checkbox Input:

    • Title: "Enable Advanced Analysis"

    • Description: "Check this box to enable advanced analysis features."

    • Variable Name: enable_advanced_analysis

  2. Add a Conditional Action:

    • Use the value provided by the enable_advanced_analysis variable to determine the workflow's next steps.

    • Prompt:

      If "{{enable_advanced_analysis}}" is True, perform the advanced analysis. Otherwise, proceed with the basic analysis.
  3. Run the Workflow:

    • Save the workflow.

    • On the App page, check or uncheck the box using the Checkbox Input component.

    • Run the workflow to see the conditional execution based on the checkbox state.

By following these steps, you can effectively utilize Checkbox Input components in your workflows to capture binary decisions, enhancing the capabilities of your AI-driven automation in AgenticFlow AI.

Last updated