Portal Community

user/getStatus

Retrieve the current presence status and last activity timestamp for a Slack user. Returns whether the user is active or away based on their recent Slack activity.

When to Use

Approximation Warning: Slack presence status is approximate. Slack marks users as active when they have recently interacted with the Slack client and away after a period of inactivity. Users may appear away while still working (e.g. in a meeting, focused mode, or using a non-Slack tool). Never use presence as a hard gate for access control. Use it for soft signals only — routing preferences, notification timing, and similar non-critical decisions.

Configuration

Connection

FieldRequiredDescription
botTokenRequiredSlack Bot Token starting with xoxb-. Requires the users:read OAuth scope.

Operation Fields

FieldRequiredDescription
userIdRequiredThe Slack user ID to retrieve presence for (e.g. U01ABCDEFGH).

Sample Configuration

{
  "operation": "user/getStatus",
  "connection": {
    "botToken": "{{ $credentials.slackBot.token }}"
  },
  "userId": "{{ $input.oncallUserId }}"
}

Validation Errors

Error CodeCauseResolution
user_not_foundNo user with the given ID exists in the workspace.Verify the user ID with a user/get call first.
missing_scopeToken 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.

Output

Success Port

FieldTypeDescription
userIdstringSlack user ID (echoed from input).
presenceStatusstringCurrent presence — either "active" (recently active in Slack) or "away" (inactive or explicitly set away).
lastActivitynumberUnix timestamp (seconds) of the user's last recorded Slack activity. May be 0 if no activity has been recorded yet.
statusstring"success" on successful retrieval.
errorCodestringEmpty on success. Slack API error code on failure.
payloadobjectRaw Slack API presence response.

Error Port

Activated when the user is not found or the token lacks the required scope.

Sample Output

{
  "userId": "U01ALICE123",
  "presenceStatus": "active",
  "lastActivity": 1748221180,
  "status": "success",
  "errorCode": "",
  "payload": {
    "ok": true,
    "presence": "active",
    "online": true,
    "auto_away": false,
    "manual_away": false,
    "connection_count": 2,
    "last_activity": 1748221180
  }
}

Expression Reference

ExpressionResult
{{ $output.getUserStatus.presenceStatus }}Presence string — "active" or "away" — for conditional routing.
{{ $output.getUserStatus.lastActivity }}Unix timestamp of last activity for staleness checks.
{{ $output.getUserStatus.userId }}User ID for downstream nodes.
{{ $output.getUserStatus.lastActivity | date:'HH:mm' }}Last activity time formatted as HH:mm for display in messages.

Node Policies & GuardRails

Policy AreaRecommendation
Soft Signal OnlyPresence is approximate and not a reliable real-time signal. Always provide a fallback for away users rather than blocking the workflow entirely (e.g. send to backup contact or queue for later).
No Hard Access ControlNever use presence to gate security-sensitive operations. A user appearing away does not mean they are unavailable — they may be in a meeting or on another device.
Rate LimitsThe users.getPresence endpoint is Tier 3 (50+ req/min). Avoid polling this endpoint in tight loops. Use it as a one-time check at the start of a routing decision.
Privacy AwarenessSome workspaces allow users to set their presence to manual away or hide their presence. A "away" response does not distinguish between genuinely inactive and deliberately hidden users.
Stale DataSlack presence can lag by 1–5 minutes. For time-critical routing, combine presence with a schedule check (e.g. Google Calendar or PagerDuty) for higher confidence.

Examples

Route Page to Active On-Call Engineer

Before sending a critical alert, check if the primary on-call engineer is active. If away, route to the backup.

{
  "operation": "user/getStatus",
  "userId": "{{ $input.primaryOncallId }}"
}
// If presenceStatus === "active" → send DM to primary
// Else → send DM to backup contact

Delay Outreach Until User is Active

Check presence before sending a non-urgent workflow notification. If away, schedule for the next active period.

{
  "operation": "user/getStatus",
  "userId": "{{ $input.targetUserId }}"
}
// Branch: presenceStatus === "active" → send now
// Else → enqueue for retry in 30 minutes

Log Last Activity for Idle User Report

In a weekly inactive user report, retrieve last activity for each user and flag those who have been away for over 7 days.

{
  "operation": "user/getStatus",
  "userId": "{{ $loop.item.userId }}"
}
// Flag condition: ($now - lastActivity) > (7 * 86400)