This is reference content about building functions and workflows. Learn more if you're not yet familiar with this new Slack platform paradigm.

create_channel

Create a new channel

Facts

Schema ID

Schema.slack.functions.CreateChannel

Schema reference

slack#/functions/create_channel

Related methods

Input parameters

Required parameters
The name of the channel; the function will attempt to create a channel name that follows Slack's channel name guidelines, but the channel's name may end up being different than the exact string provided.
  • team-devrel-education-running-buddies
  • proj-remove-all-oxford-commas
  • broadcast-jesse-promotion
Optional parameters
Set to true if the channel should be private, set to false if the channel should be public.
  • true
  • false
Select Channel Manager(s)
  • ["U111AAA111","U222BBB222"]

Output parameters

Required parameters
The conversation ID for the channel you created
  • C123456
  • D123ABC456
Optional parameters
Person(s) who were made channel manager
  • ["U111AAA111","U222BBB222"]

Usage guide

Your automations may create channels as part of a workflow using this Slack function.

Consider the channel_name you specify as merely a suggestion. If it's taken, Slack might append characters to it. Or if you provide some kind of characters Slack doesn't use for channel names, they might be munged.

To set the channel managers as part of the newly created channel, specify one or more IDs in an array to manager_ids.

Example workflow step:

const createChannelStep = ExampleWorkflow.addStep(
  Schema.slack.functions.CreateChannel,
  {
    channel_name: "broadcast-jesse-promotion",
    is_private: false,
  },
);