New: Bring branches back together with the Merge step

Once an automation split into branches, it used to stay split, so every step the branches had in common had to be built again in each branch. With the new Merge step, you join the branches back together and build the shared steps once. The Merge step is available now.

What is new

  • A new Merge step. Find Merge under Utilities when you add a step.
  • Join branches by dragging. Drag the dot on top of a Merge step onto the + under another branch to connect that branch to it.
  • Choose when the run continues. Set Continue when to First branch completed to go on as soon as one branch reaches the Merge step. Later branches still run, but they stop there. Choose All branches completed to wait until every branch has arrived.
  • Warnings before you publish. Diagnostics warn you about a Merge step that can never continue, for example one that waits for all branches when only one of them can run, and about connections that change nothing.

Why it matters

After an if/else or an approval, every step the branches had in common had to be copied into each branch. Changing one of those steps meant changing every copy, and forgetting one left the automation half updated. With the Merge step, the shared steps live in one place, so automations get shorter and a lot easier to read and change.

One customer's case automation splits into three branches. Each branch writes a different message and then used to repeat the same steps as the others. Now each branch only writes its message, and one Merge step takes it from there.

Good to know

  • With All branches completed, the run stops at the Merge step if one of the branches can't arrive, for example because a filter didn't pass or the run took the other side of an if/else.
  • A Merge step adds no new fields to the property picker. Steps after it use the data from the steps before it.

Getting started

Open an automation with branches, add a step, and choose Merge under Utilities. Merge works well together with local variables: set a variable in each branch and use it once after the merge. New to automations? Start with What are automations?.

0 comments

Please sign in to leave a comment.