Skip to main content

invite_user_to_channel

Facts​

DescriptionInvite a user to a channel
SchemaSchema.slack.functions.InviteUserToChannel
Schema referenceslack#/functions/invite_user_to_channel

Input Parameters​

Required Input Parameters

channel_idSchema.types.arrayRequired

An array of 1 conversation IDs for the you are inviting users to. Only accepts 1 channel ID presented as an array.

Examples
["C123456"]
["D123ABC456"]

Optional Input Parameters

user_idsSchema.types.arrayOptional

A list of user IDs to add to the conversation.

Examples
["U111AAA111","U222BBB222"]
usergroup_idsSchema.types.arrayOptional

A list of usergroup IDs to add to the conversation.

Examples
["S111AAA111","S222BBB222"]

Output Parameters​

Optional Output Parameters

user_idsSchema.types.arrayOptional

A list of user IDs added to the conversation.

Examples
["U111AAA111","U222BBB222"]
usergroup_idsSchema.types.arrayOptional

A list of usergroup IDs added to the conversation.

Examples
["S111AAA111","S222BBB222"]

Usage info​

This function allows your workflow to add users to a channel. It only works with channels your workflow created.

You can provide the usergroup_ids or user_ids parameters.

Example workflow step​

const inviteUserToChannelStep = ExampleWorkflow.addStep(
Schema.slack.functions.InviteUserToChannel,
{
channel_ids: ["C0123ABC456"],
user_ids: ["U111AAA111", "UZZZ999ZZZ"],
},
);