Switch Node

Updated 4 months ago by Karan

Byteline provides you with a built-in Switch node that allows you to implement if/then branching to multiple paths. In simple words, it offers an option to build an if/else condition within the flows. In this documentation, we have explained the steps to implement Switch in a flow.

Let’s get started.

Switch node is available on the Standard plan and higher.

Configuring Switch

Step 1: Hover the cursor over a flow node to add a new node. Once displayed, click on the add button to view the nodes in the select node window.

Step 2: Select the Switch node to add it to your flow. 

Step 3: Hover the cursor over the Switch to display the options. Once displayed, click on the add button to view the nodes in the select node window.

Step 4: Select the node to add after the Switch node. In this example, we are using Airtable - Get Records node.

Step 5: Now let's add one more node after the Switch node. Hover the cursor over the Switch to display the options. Once displayed, click on the add button to view the nodes in the select node window.

Step 6: Select the node, Webflow - Get Items in this example, to add another condition.

Configuring Switch Conditions

You configure the Switch condition by using the Settings icon from the connection. The connection label shows <Not Set> in red if the condition is not yet configured. 

In this example, we will use Airtable - Get Records as the default path, which means if no other condition matches, the flow executes the Airtable task. In addition, a condition will be set for the Webflow path so that it's called only when the input field has a specific value.

Step 7: Click the settings icon on the connection between Switch and Airtable - Get Records to configure the transitioning.

Step 8: Click on the Switch icon to set the condition.

Step 9: Fill in the Condition Label and click in the box next to Default Branch to set the branch as the default branch.

Step 10: Click on the Save button to save the settings.

Note: Once the Airtable is conditioned, the color will change to blue.

Step 11: Similarly, click the settings icon followed by the Switch icon on the connection between Switch and Webflow - Get items to configure the transitioning.

Step 12: Fill in the Condition Label, and leave the default branch unchecked as only one branch can be set as a default. Now fill in the condition as per your choice.

In this example, the Webflow Switch path is configured to execute only when the input source field value is Webflow

Note: Users can add multiple conditions by clicking on the Add Condition button. 

Note: Users can select ALL from the drop-down menu to match all (AND) of the following conditions.

Note: Users can also select ANY from the drop-down menu to match any (OR) of the following conditions.

Step 13: Once the condition is filled in successfully, click on the Save Button.

Deploy the Flow

Click on the Deploy button to deploy the flow.

Test Run the Flow

Step 1: Click on the Test Run button to test the flow.

Step 2: Type the source and click on the Run button to run the flow. 

Note: Users can type Webflow if they want to keep it a source.

Flow Run Status

The Flow has run successfully. The flow went to the Airtable because the source was Airtable.

You have successfully implemented a Switch node in the flow.


How did we do?