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
Navigate to the Workflow page.
Click on + Create Workflow or select an existing workflow.
In the empty state or within your workflow, click on + Add Input.
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:
Check or uncheck the box to set the desired default state.
Click on the small setting icon at the bottom right.
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:
Practical Example
Example Workflow: Enabling Advanced Analysis
Add a Checkbox Input:
Title: "Enable Advanced Analysis"
Description: "Check this box to enable advanced analysis features."
Variable Name:
enable_advanced_analysis
Add a Conditional Action:
Use the value provided by the
enable_advanced_analysis
variable to determine the workflow's next steps.Prompt:
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