Portal Community

userGroup/disable

Disable an existing Slack User Group. Disabled groups retain their handle and membership list but no longer notify members when @mentioned. The group can be re-enabled at any time.

Impact: Disabling a group means @mentions of the group handle in Slack will no longer send notifications to members. Existing members are not removed from the group. Re-enable with userGroup/enable to restore notification behavior.

When to Use

Configuration

Connection

FieldRequiredDescription
botTokenRequiredSlack Bot Token starting with xoxb-. Requires the usergroups:write OAuth scope.

Operation Fields

FieldRequiredDescription
userGroupIdRequiredThe Slack user group identifier (starts with S, e.g. S08ABCDEFGH). Obtain from userGroup/create or userGroup/getMany.

Sample Configuration

{
  "operation": "userGroup/disable",
  "connection": {
    "botToken": "{{ $credentials.slackBot.token }}"
  },
  "userGroupId": "{{ $input.userGroupId }}"
}

Validation Errors

Error CodeCauseResolution
no_such_subteamNo user group with the given ID exists in the workspace.Verify the group ID using userGroup/getMany.
already_disabledThe group is already disabled.Treat as non-fatal — the desired end state (disabled) is already achieved.
missing_scopeToken lacks the usergroups:write scope.Add usergroups:write under OAuth & Permissions and reinstall the app.
invalid_authBot token is invalid or revoked.Regenerate the token and update the credential store.

Output

Success Port

FieldTypeDescription
userGroupIdstringID of the disabled group.
statusstring"success" when the group was successfully disabled.
errorCodestringEmpty on success. Slack API error code on failure.
payloadobjectRaw Slack API response including the updated group object.

Error Port

Activated when the group does not exist or the token lacks write permissions. The already_disabled error should typically be treated as non-fatal.

Sample Output

{
  "userGroupId": "S08INTERNS1",
  "status": "success",
  "errorCode": "",
  "payload": {
    "ok": true,
    "usergroup": {
      "id": "S08INTERNS1",
      "name": "Summer Interns",
      "handle": "summer-interns",
      "date_delete": 1748221200
    }
  }
}

Expression Reference

ExpressionResult
{{ $output.disableGroup.userGroupId }}ID of the disabled group — pass to userGroup/enable when restoring.
{{ $output.disableGroup.status }}Status string for conditional branching.
{{ $output.disableGroup.payload.usergroup.date_delete }}Unix timestamp when the group was disabled — useful for audit logging.

Node Policies & GuardRails

Policy AreaRecommendation
ReversibilityDisabling a group is fully reversible. Prefer disable over deletion when you may need to re-enable the group for the next cycle or after a reorganization completes.
IdempotencyThe already_disabled error means the group is already in the desired state. Wire the error port to log and continue rather than failing the workflow.
Member PreservationDisabling preserves the group's membership list intact. When re-enabled, all previous members are restored automatically without needing to re-add them.
Audit TrailLog userGroupId and the disable timestamp to an audit database when running automated lifecycle management of groups. Store enough context to identify why the group was disabled.
CommunicationNotify affected members before disabling a group they actively use. An @mention in the group's associated channels before disable reduces confusion.

Examples

Disable Seasonal Group at End of Program

On the last day of the summer internship program, automatically disable the @summer-interns group.

{
  "operation": "userGroup/disable",
  "userGroupId": "S08INTERNS1"
}

Disable All Project Groups After Project Closes

When a project is closed in the project management system, find and disable all associated Slack groups.

{
  "operation": "userGroup/disable",
  "userGroupId": "{{ $loop.item.userGroupId }}"
}

Temporary Disable During Reorganization

Before restructuring a department, disable the department group to prevent accidental notifications during the transition period.

// Step 1: Disable
{
  "operation": "userGroup/disable",
  "userGroupId": "{{ $input.deptGroupId }}"
}
// ... restructure membership ...
// Step 2: Re-enable when complete (userGroup/enable)