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

invite_user_to_channel

Invite a user to a channel

Facts

Schema ID

Schema.slack.functions.InviteUserToChannel

Schema reference

slack#/functions/invite_user_to_channel

Input parameters

Required parameters
Optional parameters
A list of usergroup IDs to add to the conversation.
  • ["S111AAA111","S222BBB222"]
A list of user IDs to add to the conversation.
  • ["U111AAA111","U222BBB222"]

Output parameters

Optional parameters
A list of usergroup IDs added to the conversation.
  • ["S111AAA111","S222BBB222"]
A list of user IDs added to the conversation.
  • ["U111AAA111","U222BBB222"]

Usage guide

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: ["C082T4F6S1N"],
    user_ids: ["U0R36M8T62", "U0J46F228L0"],
  },
);