Switch Case
The Switch Case tool allows you to create decision points in your workflows. It lets you define specific conditions and branch your workflow accordingly, making it highly dynamic and tailored for various scenarios. It makes workflows adaptable, enabling you to efficiently handle diverse conditions and execute tasks based on specific criteria.
How to Use Switch Case
-
Add a Case Click the plus icon to add a new case to the Switch Case node. You can define multiple cases based on your workflow's requirements.
Click the plus icon to add a new case. -
Select the Case Type Choose the type of value the condition will evaluate, such as
String
,Number
, etc. This step helps you define how the workflow will handle different input values.Choose the type of value for the case, such as String or Number. -
Define the Case and Outcome Specify the case value (e.g., "get_users") and assign an outcome or action associated with that value. For instance, if the case value matches "get_users," the workflow will execute the corresponding action.
Enter the case value and link it to an outcome.
Example Table
Type | Case | Outcome |
---|---|---|
String | get_users | Runs the get_users action. |
String | get_todos | Runs the get_todos action. |
String | get_photos | Runs the get_photos action. |
Number | get_number | Runs the get_number task. |