How Conditional Paths Work?

Conditional Path is a part of setting up the Automations by providing logical expressions that resolve to either true or false. Based on this, different actions can be executed for different paths. It adds flexibility and adaptability in automation.

Let’s see how Conditional Path works. Here are a few steps you need to perform to use in Automation.

  1. Configure Trigger
  2. Configure Action Step
    • Select Conditional Path
      • If - Add Step
      • Else - Add Step
  1. Configure Trigger

    Triggers are invocation events that happen whenever an event is triggered. Automation Hub provides different triggers to invoke an event based on certain conditions.

    Configure-Trigger.png

    For example, Contentstack Trigger provides different events to configure the trigger connector, such as executing an action when an entry is created in Contentstack.

    Configure-Trigger-Contentstack.png

    Note: If the trigger conditions do not satisfy the conditions, then the automation will not be executed. To go ahead in the conditional path block, the configuration in the Trigger Conditions (if provided) must match.

  2. Configure Action Step

    Configure Action Step executes when the trigger event is fired. For example, when an entry is created/updated/deleted in Contentstack, a slack message is sent to the channel to notify the team members of the ongoing updates.

    Configure-Step.png

    Contentstack provides a variety of connectors or third-party applications that can be used based on the requirements. This allows you to connect your Contentstack application to a third-party application by simply authenticating your account.

    Note: Pause and Response action connectors cannot be used inside Conditional Path.

    Conditional-Path.png

    In the Conditional Path configuration, provide the conditions you want to set up in the input box.

    Suppose you want to execute the If block only when an entry is created in a specific content type. You can provide the content type UID and match it with the content type.

    Save-Configuration-Conditional-Path.png
  3. 2-1 If (Configure Action Step)

    In the Configure Action Step section, provide the action you want to perform if the conditions provided in the Conditional Path configuration resolves to true, then the If block will get executed. 

    Step-two-one.png

    You can check the success message for the execution of the automation in the Execution Log section.

    Execution-Log.png

    Similarly, you can add multiple steps in the If statement for execution. See the screenshot below.

    Add-Multiple-Steps-copy.png
  4. 2-2 Else (Configure Action)

    The basic formula of the Conditional Path is to execute a specific action. check for the configuration; if the conditions match, execute IF; otherwise, execute ELSE block.

    So, if the condition resolves to false, then execute the Else block. You can set up any action connector in the Else block.

    Step-two-two.png

    Once the Else block is executed, you can check the success message for the execution in the Execution Log section. In detail , you can see the name of the steps that are executed and number of steps configured (2-3 and 3-2)

    Different-Steps.png

    Note: The naming for steps 2-1, 2-3, 4-3 depends on the number of actions configured in the conditional path.

Was this article helpful?

Thanks for your feedbackSmile-icon

On This Page

^