Introducing Conditional Branching in Workflow Builder

Share

Over five years ago, we released a no-code automation tool called Workflow Builder and in that time builders, admins, and developers have created millions of automations and run over a billion workflows. These workflows help admins keep channels tidy, IT departments keep track of assets, and marketing teams manage their campaigns. We’ve added new features, like connectors to your favorite apps and given developers the ability to build their own custom workflow steps. In that time, you’ve had plenty of requests and feedback, though none more than the ability to create branches within a workflow. And now, at long last, it’s here!

We knew we couldn’t just add an if/then step and call it done, workflows are meant to be used by everyone in your organization. We wanted to keep the powerful simplicity of building automations without writing code while expanding what you could do and give builders the ability to build dynamic, responsive workflows that adapt based on user input. After plenty of design iterations, prototypes, testing, and developer feedback, we’re excited to bring conditional branching to your workflows.

What’s New

Conditional branching is like a visual switch statement, built for the millions of builders who don’t necessarily think of themselves as programmers but who are nonetheless building the kinds of automations that their teams and entire companies rely on. Workflows are built as a series of steps and a branch is just a new step that lets workflow take a different path based on the user input. Before we get too into the weeds, here are the key capabilities:

  • A branch can respond to most types of user input, including text inputs in forms and buttons.
  • Each branch can contain up to ten custom rules and also include a fallback if none of the rules are met.
  • Every branch gets its own name and can even be color coded.
  • Being a visual tool, the rules within a branch can be reordered via dragging and dropping, and even duplicated entirely.

Branching simply makes workflows more powerful. Now you can build basic logic into your workflows for routing requests to the right channels, pull in the correct team based on the severity of a swarm, and even handle basic client-side validation.

To learn more about building workflows with branches, check our announcement blog post or learn more at the help center. One thing to note: conditional branching is available on the Business+ and Enterprise+ plans.

Opportunities for Developers

Workflow Builders aren’t the only ones who’ve been clamoring for branches, we know our millions of developers are anxious to get their hands on more powerful workflows.

If you’re building custom workflow steps, great news: they automatically work with branching! Now you can compose powerful frontends in a workflow and call your custom steps based on the user input, without having to handle the business logic in your custom steps. This should dramatically simplify your custom steps and let you focus on the business logic.

This means you can let Workflow Builder handle some of your basic validation and logic for you since branches use variables like strings, booleans, and numbers. Instead of having to write one mega step that handles different user inputs, you can split out your logic into smaller steps that get called depending on what the user needs and let Workflow Builder handle figuring that out. With a fallback option, you can even provide better error messaging or defaults to your users to help reduce confusion.

Not to worry, branches work with your custom steps regardless of whether you’ve built them using the Deno SDK, Bolt, or hand coded them without any SDK at all.

Next Steps

Workflow Builder is one of the most empowering parts of Slack, enabling anyone in an organization to automate the mundane parts of their work whether you’ve been programming for decades or don’t think of yourself as a programmer at all. For developers, Workflow Builder is a customizable and composable interface to your apps via custom steps, and now with conditional branching, your apps get even more powerful.

More Reads