List User Groups
slack.list_usergroups
ActionChat & messagingconnection required
Calls the Slack Web API with the connection's bot token.
List the workspace's @-mentionable user groups.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Slack
- Secret shape
- the Slack bot token (xoxb-…), or {"token": "xoxb-…"}
- Resolved by
- config.connection_id, else node.connection_id
Configuration
4 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
include_disabled Include groups that have been disabled. | boolean | No | false | — | — |
include_count Ask Slack to include the member count in the response. | boolean | No | false | — | — |
include_users Include each group's member ids in the response. | boolean | No | false | — | — |
team_id Workspace the group lives in. Only needed with an org-wide token. | string | No | — | — | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"include_count": false,
"include_disabled": false,
"include_users": false
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
usergroups[].id The user group id (S…). | string | — |
usergroups[].name The group's display name. | string | — |
usergroups[].handle The @-mention handle, without the @. | string | — |
usergroups[].description The group's description. | string | — |
usergroups[].team_id The workspace the group belongs to. | string | — |
usergroups[].user_count How many members Slack reports, when it reports one. | number | — |
usergroups[].date_delete Non-zero when the group is disabled. | number | — |
usergroups[].users Member ids, when include_users is set. | array | — |
count How many groups were returned. | number | — |
{
"count": 0,
"usergroups": [
{
"date_delete": 0,
"description": "",
"handle": "",
"id": "",
"name": "",
"team_id": "",
"user_count": 0,
"users": []
}
]
}Notes
- The bot must be a member of a private channel before it can act there (Slack answers not_in_channel otherwise).
- Slack rate-limits each Web API method on its own tier; a throttled call fails with the number of seconds to wait and is safe for the node's retry policy to repeat.
Templates that use Slack
See List User Groups run in a workflow.
In a technical demo we add the Slack connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.