Skip to main content

Create a new Slack channel

Learn how to design an action that creates a new Slack channel.


In this tutorial, we'll take a closer look into designing an action that creates a new Slack channel. Our action will contain Slack requests and dynamically generate request parameters from input and request components.

Deal room

Imagine one of your sales team member is about to close an important deal and the customer has some questions regarding their billing and subscription. The situation requires a finance team expertise in collaboration with sales team.

We'll design an action that automatically creates a Slack channel with the entered deal name and invites selected users to this channel. Let's see how to configure this action.

  1. Go to your apps App settings tab and add a new Slack connection. Select your Slack workspace.

  2. Create an action. You can name it Deal room.

  3. Create a new input component: deal_name. It is a text input.

    deal_name input

  4. Add another input Slack_users. It is a multi select component.

    Slack_users input

  5. Add a new Slack request. Select List Slack users method and give ListSlackUsers name to your request. Then, select your Slack connection.

    ListSlackUsers request

  6. Go to Slack_users input and add below values to display and identifier fields:

    Display: {{request.ListSlackUsers.response.users.map(u=>u.name)}}

    Identifier: {{request.ListSlackUsers.response.users.map(u=>u.id)}}

    Source of Slack_users input

  7. Add a new Slack request. Select Create channel method and give CreateChannel name to your request. Then, select your Slack connection.

    Next, enter below to Channel name:

    {{input.deal_name.replace(' ', '-').toLowerCase()}}

    CreateChannel request

    The channel's name will be dynamically generated from the entered deal name. Since Slack channel names can not contain spaces, we applied .replace() method that replace any space in deal name with a dash.

    You can select Public for Channel type.

  8. Add a new Slack request. Select Invite users to channel method and give InviteUsersToChannel name to your request. Then, select your Slack connection.

    Next, go to Channel field and click gear button near it. Select Dynamic option and enter below:

    Channel: {{request.CreateChannel.response.channel.id}}

    Channel's value will be dynamically generated from the response of CreateChannel request.

    Next, go to Users field and click gear button near it. Select Dynamic option and enter below:

    Users: {{input.Slack_users}}

    Users field's value will be the values selected in Slack_users input.

    InviteUsersToChannel request

  9. Add CreateChannel and InviteUsersToChannel Slack requests to Run steps on Inputs tab.

    Add requests to run steps

  10. Apply changes to your action. Make sure to mark it as Enabled while applying changes.

    Apply changes to deal room action

  11. Test your action or run in Slack to see how it works. Test deal room action

  12. Go to the channel created by Actioner in your Slack workspace. Deal room created in Slack