slack.updateUserGroupMembers replaces the group’s complete membership list.
Example
automations/update-user-group-members.automation.ts
Inputs
RequiresuserGroupId 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. Requiresusergroups:write and sufficient workspace permissions.