user/updateProfile
Update the Slack profile of a workspace member. Can set real name, display name, title, phone, email, and status. Requires a user token (xoxp-), not a bot token.
User Token Required: This operation requires a user token (
xoxp-) with the users.profile:write scope, not a bot token (xoxb-). User tokens have broad account-level access. Store them as a named credential with restricted access policies and never expose them in workflow logs or error output.When to Use
- Sync user profiles from an HR system (HRIS) to Slack on a scheduled basis to keep titles and names current.
- Set an automated OOO status text and emoji when an employee submits approved leave in the HR system.
- Update titles and department info across the workspace after an organizational restructure.
- Bulk update display names during a company rebrand or naming convention change.
- Clear status text and emoji programmatically when the OOO period ends.
Configuration
Connection
| Field | Required | Description |
|---|---|---|
userToken | Required | Slack User Token starting with xoxp-. Must have the users.profile:write OAuth scope. This is a user-level token, not a bot token — obtain it via user OAuth or from a workspace admin. |
Operation Fields
| Field | Required | Description |
|---|---|---|
userId | Required | The Slack user ID of the member whose profile to update (e.g. U01ABCDEFGH). Workspace admins can update any user; regular users can only update their own profile. |
realName | Optional | Updated real name. Omit to leave unchanged. |
displayName | Optional | Updated display name shown in Slack messages. Omit to leave unchanged. |
email | Optional | Updated email address. Admin-level token required to change another user's email. Omit to leave unchanged. |
phone | Optional | Updated phone number. Omit to leave unchanged. |
title | Optional | Updated job title. Omit to leave unchanged. |
statusText | Optional | Updated status text (e.g. "On vacation until June 3"). Set to empty string to clear the status. |
statusEmoji | Optional | Emoji for the status (e.g. :palm_tree:). Set to empty string to clear the emoji. |
Sample Configuration
{
"operation": "user/updateProfile",
"connection": {
"userToken": "{{ $credentials.slackUser.token }}"
},
"userId": "{{ $input.targetUserId }}",
"statusText": "On leave until {{ $input.returnDate | date:'MMM d' }}",
"statusEmoji": ":palm_tree:"
}
Validation Errors
| Error Code | Cause | Resolution |
|---|---|---|
user_not_found | The target userId does not exist in the workspace. | Verify the user ID with a user/get call first. |
missing_scope | The user token lacks the users.profile:write scope. | Add users.profile:write to the OAuth scopes and re-authorize the user. |
cant_update_admin | Attempting to update the profile of a workspace admin without sufficient privileges. | Workspace Admins can only be updated by other Admins or Owners. |
invalid_auth | User token is invalid, expired, or revoked. | Re-authorize the user via OAuth to obtain a fresh user token. |
not_authed | A bot token (xoxb-) was provided instead of a user token (xoxp-). | Replace the credential with a user token. Bot tokens cannot call users.profile.set. |
Output
Success Port
| Field | Type | Description |
|---|---|---|
userId | string | Slack user ID of the updated profile. |
status | string | "success" when the profile was updated successfully. |
errorCode | string | Empty on success. Slack API error code on failure. |
payload | object | Raw Slack API response including the updated profile object. |
Error Port
Activated when the user is not found, the token is a bot token instead of a user token, or the token lacks write permissions.
Sample Output
{
"userId": "U01ALICE123",
"status": "success",
"errorCode": "",
"payload": {
"ok": true,
"profile": {
"real_name": "Alice Johnson",
"display_name": "Alice",
"title": "Principal Engineer",
"status_text": "On leave until Jun 3",
"status_emoji": ":palm_tree:"
}
}
}
Expression Reference
| Expression | Result |
|---|---|
{{ $output.updateProfile.userId }} | User ID of the successfully updated profile. |
{{ $output.updateProfile.status }} | Status string for conditional branching after the update. |
{{ $output.updateProfile.payload.profile.title }} | Confirmed updated title from the API response. |
{{ $output.updateProfile.payload.profile.status_text }} | Confirmed updated status text from the API response. |
Node Policies & GuardRails
| Policy Area | Recommendation |
|---|---|
| User Token Security | User tokens (xoxp-) carry the full permissions of the authorizing user. Store them in the credential vault with restricted access. Never log, print, or include in error messages. |
| Admin vs. User Scope | A non-admin user token can only update the profile of the token owner. To update profiles of other users, the token must belong to a workspace admin or owner. |
| Partial Updates | Only supply fields you intend to change. Omitted fields are left unchanged on the server. Passing an empty string for statusText explicitly clears the status. |
| Status Expiry | Slack does not enforce status expiry via this API. If you set an OOO status, pair it with a scheduled user/updateProfile call to clear the status when the leave period ends. |
| Rate Limits | Slack's users.profile.set is Tier 3. Bulk profile update jobs should be throttled and run as background scheduled workflows rather than synchronous operations. |
Examples
Set OOO Status When Leave is Approved
When an employee's leave request is approved in the HR system, automatically set their Slack status.
{
"operation": "user/updateProfile",
"userId": "{{ $input.slackUserId }}",
"statusText": "On leave until {{ $input.returnDate | date:'MMM d' }}",
"statusEmoji": ":palm_tree:"
}
Clear OOO Status When Leave Ends
On the day of the employee's return, clear their status as part of an automated offboarding-from-leave workflow.
{
"operation": "user/updateProfile",
"userId": "{{ $input.slackUserId }}",
"statusText": "",
"statusEmoji": ""
}
Bulk Update Titles After Org Restructure
Iterate over a list of users with updated titles from the HR system and apply them to Slack profiles.
{
"operation": "user/updateProfile",
"userId": "{{ $loop.item.slackUserId }}",
"title": "{{ $loop.item.newTitle }}"
}