Skip to main content

add_user_to_usergroup

Facts​

DescriptionAdd a user to a user group
SchemaSchema.slack.functions.AddUserToUsergroup
Schema referenceslack#/functions/add_user_to_usergroup
Required scopes

Input Parameters​

Required Input Parameters

user_idsSchema.types.arrayRequired

A list of user IDs to add to the User Group

Examples
["U111AAA111","U222BBB222"]
usergroup_idSchema.slack.types.usergroup_idRequired

The ID for the user group to add the user to

Examples
S123ABC456

Output Parameters​

Optional Output Parameters

usergroup_idSchema.slack.types.usergroup_idOptional

The ID for the user group that now contains the added user(s)

Examples
S123ABC456

Usage info​

Your workspace has user groups and you want to automate adding users to them in workflows? This function is here to make your user groups grow!

Example workflow step​

Here is an example of how to use this function in a workflow step.

const addUserToUsergroupStep = ExampleWorkflow.addStep(
Schema.slack.functions.AddUserToUsergroup,
{
usergroup_id: "S0123ABC456",
user_ids: ["U111AAA111", "U999ZZZ999"],
},
);