Workflows

Use if/then branches in workflows

Last updated: March 23, 2020

Applies to:

Marketing Hub  Professional, Enterprise
Sales Hub  Professional, Enterprise
Service Hub  Professional, Enterprise

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 +. add-an-action
  • 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.
  • You can add up to 20 branches to an if/then action to consolidate your workflow. Objects will be evaluated against each if/then branch in the order that the branches are set. For example, if a contact meets the first if/then branch criteria, they'll proceed down that YES branch without being evaluated against other if/then branches.
  • To add more if/then branches:
    • After adding your first if/then branch condition, click Add another branch.

      multiple-if-then-branches
    • Select the criteria for the new branch, then click Apply filter.
    • You can name each branch by clicking into the Branch name field and entering text.
  • When you're done, click Save.

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.if-then-branch-example
  • 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.
  • Next, click the Settings tab. Learn more about managing workflow settings.
  • When you're done setting up your workflow, click Review.
  • Review your workflow settings, then click Turn on.
  • A dialog box will appear informing you that the workflow has been turned on.

Test if/then branches

You can test your if/then branches either individually or by testing all workflow actions to see how an object would go through all branches.

Please note: an if/then branch with multiple branches can't be tested individually. Instead, use the Test feature to test all workflow actions.

 
/workflows/use-if-then-branches-in-workflows?zorseWidget