Use if/then branches in workflows to direct enrolled objects down one path or another based on set conditions.
Add an if/then branch
- In your HubSpot account, navigate to Automation > Workflows.
- Click the name of an existing workflow, or create a new workflow by clicking Create workflow.
- Click the plus icon +.
- In the right panel, select If/then branch.
- Select the filter type, then select the criteria for the if/then branch. If/then branch criteria options are identical to enrollment trigger criteria options.
- After selecting the criteria, click Apply filter.
Add multiple branches
You can add up to 20 branches to an if/then branch action to consolidate your workflow. Enrolled records will be evaluated against each branch in the order that the branches are set. For example, if a contact meets the first branch criteria, they'll proceed down that YES branch without being evaluated against other branches. Learn how to reorder your if/then branches.
In the example screenshot below, contacts are being evaluated against 3 branches based on their Lifecycle stage property:
To add multiple branches to an if/then branch action:
- After adding your first if/then branch condition, click Add another branch.
- Select the criteria for the new branch, then click Apply filter.
- Name each branch by clicking into the Branch name field and entering text.
- To clone a branch, hover over the branch, then click the duplicate clone icon.
- When you're done, click Save.
At any time, you can reorder branches within an if/then branch:
- Click the if/then branch action.
- In the right sidebar, hover over the branch, then click and drag the blue drag and drop bar to the desired location. Or, click the More dropdown menu and select Move up or Move down.
- Click Save.
Add actions after the if/then branch
To funnel enrolled records through each YES or NO branch, you can add actions below each branch.
Please note: if your branch criteria is based on a contact or associated contact engaging with content in a previous action in the workflow (e.g., contacts opening a marketing email sent in a previous action), add a delay before your branch to ensure that they have time to engage with your content.
- Click the plus icon + to add an action under the YES branch or under the NO branch. In the example below, if a contact has filled out the Contact Us form, they will go down the YES path. If they have not filled out the Contact Us form, they will go down the NO path.
- Click the plus icon + to add more actions if needed. If no other actions are added, the object will finish the workflow after the last action.