Skip to main content
slack.updateUserGroupMembers replaces the group’s complete membership list.

Example

automations/update-user-group-members.automation.ts

Inputs

Requires userGroupId and a non-empty userIds array. includeCount asks Slack to include the resulting member count. Slack does not allow this method to remove every member; disable the group instead.

Output

Returns the updated user group. Guests and bot users cannot be members. Requires usergroups:write and sufficient workspace permissions.