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
- Disable a seasonal group (e.g.
@summer-interns) at the end of the seasonal period without deleting it. - Deactivate a project group after the project completes so stale @mentions do not trigger unwanted notifications.
- Temporarily disable a group during a reorganization while membership is being restructured.
Configuration
Connection
| Field | Required | Description |
|---|---|---|
botToken | Required | Slack Bot Token starting with xoxb-. Requires the usergroups:write OAuth scope. |
Operation Fields
| Field | Required | Description |
|---|---|---|
userGroupId | Required | The 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 Code | Cause | Resolution |
|---|---|---|
no_such_subteam | No user group with the given ID exists in the workspace. | Verify the group ID using userGroup/getMany. |
already_disabled | The group is already disabled. | Treat as non-fatal — the desired end state (disabled) is already achieved. |
missing_scope | Token lacks the usergroups:write scope. | Add usergroups:write under OAuth & Permissions and reinstall the app. |
invalid_auth | Bot token is invalid or revoked. | Regenerate the token and update the credential store. |
Output
Success Port
| Field | Type | Description |
|---|---|---|
userGroupId | string | ID of the disabled group. |
status | string | "success" when the group was successfully disabled. |
errorCode | string | Empty on success. Slack API error code on failure. |
payload | object | Raw 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
| Expression | Result |
|---|---|
{{ $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 Area | Recommendation |
|---|---|
| Reversibility | Disabling 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. |
| Idempotency | The 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 Preservation | Disabling preserves the group's membership list intact. When re-enabled, all previous members are restored automatically without needing to re-add them. |
| Audit Trail | Log 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. |
| Communication | Notify 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)