Build a workflow: Create a workflow in Slack

Workflows allow you to automate tasks and work more efficiently in Slack. By default, anyone on a paid subscription can create workflows using Workflow Builder. If you can’t see the option, your owners or admins may have restricted who can build workflows.

New to workflows? Take a look at our What is a Slack workflow? tutorial for an overview.


Components of a workflow

Before you get started, it’s helpful to understand the components that make up a workflow. As you build your workflow, you’ll customise each component to complete a task in Slack. 

Component Definition Example
Trigger The action that starts a workflow There are several options to start a workflow, such as clicking a   Start Workflow button or someone joining a channel.
Steps The actions that you want your workflow to take A step can take a variety of actions in Slack (such as sending a message or adding people to a channel). You can also add connector steps from third-party services.
Variable Any information submitted to your workflow that can be referenced in steps that come later in the workflow The @mention of the person who started the workflow can be added as a variable to a message sent by the workflow.
Button Moves your workflow to the next step when clicked Once clicked, a button could show a form, or allow someone to claim a request in a channel monitored by a bigger team.
Workflow manager A member of your workspace with permission to edit, unpublish and delete a workflow

The person who builds a workflow is automatically a workflow manager. To share the responsibility of maintaining your workflow, add others as workflow managers.


Step 1: Open Workflow Builder

  1. From your desktop, hover over   More, then select   Automations.
    An image of a cursor over the More icon in the Slack desktop app.
  2. Click   New workflow in the top right.


Step 2: Choose how your workflow begins
 

  1. Below Start the workflow, click   Choose an event, then select an option from the list:

      From a link
    Share this link in Slack to display a   Start workflow button that people can click to start your workflow.

        On a schedule
    Specify a date, time and cadence for your workflow. Starts automatically based on the schedule that you set.

        When an emoji reaction is used
    Specify an emoji and a channel. When someone uses the emoji reaction in the channel, your workflow will start.

        When a person joins a channel
    Specify a channel. Each time someone joins the channel, the workflow will start.

        When a List item is updated
    Choose a list. When any item in the list is updated, your workflow will start. Click Add field to start the workflow when a particular field changes.

        From a webhook
    Configure external events to start your workflow.
  2. Follow the prompts, then click Continue

Note: Workflows that start with a link can only be started from Slack. Clicking the link outside Slack won’t work.

 

Step 3: Add steps to your workflow

Once you’ve decided how your workflow will start, the steps you add will complete the task you’d like to automate. Steps are the building blocks of a workflow – they can take actions inside and outside Slack, and will occur in the order that you specify when someone starts your workflow. 

Types of steps

Step Description Who can use
Slack Takes a Slack action, such as sending a message or adding someone to a channel Everyone (by default)
Connector Takes an action in a third-party service, like adding a row to a Google spreadsheet or creating a new Zoom meeting Everyone (by default)*
Custom Built specifically for your organisation to take actions that the developer specifies App collaborators**

*If app approval is enabled for your workspace or Enterprise Grid organisation, custom apps and connectors will need to be approved before you can add them to workflows
**Unless the developer has set other permissions


Add steps

To add steps to your workflow, decide which type of step you’d like to use, then find and select it from the step library.

  1. Search for a step, or choose one from the list.
  2. Follow the prompts to configure the step, then click Save.

Depending on your workspace or Enterprise Grid org’s settings, you may need to request access or additional configuration for connectors before you can add those steps to a workflow. When you add a connector step, we require you to authenticate an account with the third-party service before the workflow can complete the step successfully. Workflow creators can choose whether to require individual people using their workflows to authenticate with their own accounts, or use their own credentials.

Note: To configure a step to send messages to a channel, you need to have posting permissions for that channel. If you don’t have posting permissions, ask an owner or admin to grant them to you.


Customise steps

While setting up a step, you’ll see the option to add variables or buttons. Variables allow the workflow to use information from previous steps to inform future steps and responses, and buttons allow the workflow to ‘pause’ the flow of steps until the button is clicked.

Variables

Buttons

The variables available in a step will depend on previous information that is passed into the workflow. For example, you can add a Send a message step to your workflow, and select the Person who used this workflow variable to dynamically change the recipient based on who started the workflow.
  1. From a step, click   insert a variable. (In some places, you may only see the   brackets icon.)
  2. Choose from the list of variables. When your workflow runs, the dynamic data will replace the variable.
When you add a button to a step, the workflow won’t proceed until someone clicks the button. You can use a button to continue the workflow, start another workflow or open a link.
  1. From a step, click   Add button.
  2. If you’d like to, edit the text that appears on the button or change the button colour.
  3. To choose an action for the button, click the drop-down menu below Behaviour.
  4. Click the toggle next to Single-click to disable the button once one person has clicked it.
  5. Select Advanced options to restrict clicking the button to certain people or set an expiry date to disable the button at a certain date and time.
  6. Click Done, then click Save.


Edit and reorder steps

If you change your mind, you can adjust the configuration of your steps and change the order they’re executed. 

  • To edit a step, click the   pencil icon
  • To reorder a step, click the  up arrow or  down arrow, or drag it to a new location.


Step 4: Finish up and publish your workflow

Before you publish your workflow, you'll need to add a few finishing touches. You can always edit your workflow once it's been published to make updates, add or remove workflow managers, or change the permissions.

Add a title, description, and icon

  1. Click the workflow's icon in the top-left corner of Workflow Builder.
  2. Choose a name for your workflow. This is what will appear when the workflow link is shared, the workflow posts a message in a channel or sends a direct message, etc.
  3. If you’d like, add a description.
  4. To add a custom icon, click Upload.


Add workflow managers

Any workflow managers that you add will have the same permissions that you do as the workflow creator.

  1. Click on the   three dots icon in the top right-hand corner of Workflow Builder, then select Settings.
  2. Click Edit.
  3. Below Workflow managers, type the name of the person that you’d like to add. Then, select their name.


Set access permissions

By default, everyone in your workspace or org can find and use your workflow, but only workflow managers can make a copy. Here’s how to change these default permissions:

  1. Click on the   three dots icon in the top right-hand corner of Workflow Builder, then select Settings.
  2. Click Edit.
  3. Select an option from the Who can find and use this workflow? drop-down menu.
  4. To ensure that external people that you work with in Slack Connect have permission to use your workflow, tick the box next to Also include connected, external organisations to find and run.
  5. Select an option from the Who can copy this workflow? drop-down menu.
  6. Click on Save.


Publish your workflow

When you're ready, publish your workflow so that you and the members in your workspace or org with permission can use it. 

  1. Click Finish up in the top-right corner of Workflow Builder.
  2. Review the workflow's details and permissions.
  3. Click on Publish.

That’s it! You’ve just built a workflow. If it starts with a link, make sure that you share it in Slack so that people can find and use your new workflow.

Note: Slack Connect channels and external people can be granted access to your workflow only if your owners and admins have allowed external people to run workflows created by your organisation.

Who can use this feature?