Portal Community

user/getMany

Retrieve a paginated list of all users in the Slack workspace. Returns identity, bot status, and account status for each member. Supports Enterprise Grid team scoping.

When to Use

Configuration

Connection

FieldRequiredDescription
botTokenRequiredSlack Bot Token starting with xoxb-. Requires the users:read OAuth scope. Add users:read.email to include email addresses in results.

Operation Fields

FieldRequiredDescription
returnAllOptionalBoolean. Default true. When true, paginates automatically through all workspace members. Set to false to limit by the limit field.
limitOptionalMaximum number of users to return per page when returnAll is false. Default 200. Maximum 1000.
teamIdOptionalEnterprise Grid team ID to scope results to a specific team within the grid. Only applicable for Enterprise Grid workspaces.

Sample Configuration

{
  "operation": "user/getMany",
  "connection": {
    "botToken": "{{ $credentials.slackBot.token }}"
  },
  "returnAll": true
}

Validation Errors

Error CodeCauseResolution
missing_scopeBot token lacks the users:read scope.Add users:read under OAuth & Permissions in your Slack App and reinstall.
invalid_authBot token is invalid or revoked.Regenerate the token and update the credential store.
team_not_foundThe provided teamId does not exist in the Enterprise Grid.Verify the team ID with your Slack Enterprise Admin.

Output

Success Port

FieldTypeDescription
userCountnumberTotal number of users returned in this result set.
usersarrayArray of user objects. Each entry contains: userId, userName, isBot (boolean), deleted (boolean), realName, displayName.
statusstring"success" on successful retrieval.
errorCodestringEmpty on success. Slack API error code on failure.
payloadobjectRaw Slack API response including pagination metadata.

Error Port

Activated when the token lacks permissions or the team ID is invalid.

Sample Output

{
  "userCount": 3,
  "users": [
    {
      "userId": "U01ALICE123",
      "userName": "alice.johnson",
      "isBot": false,
      "deleted": false,
      "realName": "Alice Johnson",
      "displayName": "Alice"
    },
    {
      "userId": "U01BOB4567",
      "userName": "bob.smith",
      "isBot": false,
      "deleted": false,
      "realName": "Bob Smith",
      "displayName": "Bob"
    },
    {
      "userId": "UBOT12345",
      "userName": "bizfirst-bot",
      "isBot": true,
      "deleted": false,
      "realName": "BizFirst Bot",
      "displayName": "BizFirst Bot"
    }
  ],
  "status": "success",
  "errorCode": "",
  "payload": {
    "ok": true,
    "cache_ts": 1748221200,
    "response_metadata": { "next_cursor": "" }
  }
}

Expression Reference

ExpressionResult
{{ $output.getManyUsers.userCount }}Total user count for seat reporting or summary messages.
{{ $output.getManyUsers.users }}Full user array for iteration in a loop node.
{{ $output.getManyUsers.users[0].userId }}First user's Slack ID.
{{ $output.getManyUsers.users[0].isBot }}Boolean bot flag for filtering bots out of human-targeted operations.
{{ $output.getManyUsers.users[0].deleted }}Boolean deleted flag for filtering deactivated accounts.

Node Policies & GuardRails

Policy AreaRecommendation
Bot FilteringAlways filter isBot: true entries when syncing to HR or directory systems. Bot accounts do not represent human workspace members.
Deleted User HandlingFilter deleted: true users unless your use case specifically requires auditing deactivated accounts. Deleted users cannot receive messages.
Rate LimitsSlack's users.list is Tier 2 (20+ req/min). For large workspaces, use returnAll: false with pagination and add retry logic. Run workspace syncs as scheduled workflows rather than on-demand.
PII in ResultsThe user list contains real names. Do not write the full output to unencrypted workflow logs. Process inline and discard or store only required fields.
Enterprise GridOn Enterprise Grid workspaces, results are scoped to the organization by default. Use teamId to narrow to a specific team when the bot has multi-team access.

Examples

Sync Active Human Users to HR System

Retrieve all workspace users, filter to active humans, then write to an external HR system.

{
  "operation": "user/getMany",
  "returnAll": true
}
// Filter: users.filter(u => !u.isBot && !u.deleted)
// Then loop and upsert each user into HR database

Generate Seat Count Report

Count active human users for a monthly licensing report.

{
  "operation": "user/getMany",
  "returnAll": true
}
// Active humans: users.filter(u => !u.isBot && !u.deleted).length
// Total bots: users.filter(u => u.isBot).length

Populate User Picker for a Custom Tool

Fetch active users with a limited page size to populate an autocomplete dropdown in a UI tool.

{
  "operation": "user/getMany",
  "returnAll": false,
  "limit": 200
}
// Map to { label: displayName, value: userId } for dropdown