Skip to content

Add Find User by ID action for slack_v2#19758

Merged
GTFalcao merged 6 commits intoPipedreamHQ:masterfrom
aliaksei-v7:add-slack-find-user-by-id
Jan 23, 2026
Merged

Add Find User by ID action for slack_v2#19758
GTFalcao merged 6 commits intoPipedreamHQ:masterfrom
aliaksei-v7:add-slack-find-user-by-id

Conversation

@aliaksei-v7
Copy link
Contributor

@aliaksei-v7 aliaksei-v7 commented Jan 20, 2026

WHY

Resolves #19757

Summary by CodeRabbit

  • New Features

    • Added a Slack action to find and retrieve a user by ID. Returns profile details (display name, email where permitted), timezone, status, and the full API response.
    • Optional setting to include the user's locale. Action emits clear success/failure summaries for workflow visibility.
  • Chores

    • Bumped Slack component version to 0.2.0.

✏️ Tip: You can customize this high-level summary in your review settings.

@adolfo-pd adolfo-pd added the User submitted Submitted by a user label Jan 20, 2026
@vercel
Copy link

vercel bot commented Jan 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Jan 23, 2026 6:47pm

Request Review

@pipedream-component-development
Copy link
Collaborator

Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified.

@pipedream-component-development
Copy link
Collaborator

Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

Walkthrough

Adds a new Slack v2 action that looks up a user by Slack user ID via users.info, optionally includes locale, exports a success/failure summary, and returns the Slack API response with user profile data.

Changes

Cohort / File(s) Summary
Slack v2 Find User by ID Action
components/slack_v2/actions/find-user-by-id/find-user-by-id.mjs
New action export with metadata (key, name, description, version, type, annotations), props (slack, user selector, includeLocale), and an async run that calls this.slack.usersInfo({ user: this.user, include_locale: this.includeLocale }), exports a failure summary and rethrows on error, derives a display name on success, exports a success summary, and returns the API response.
Slack v2 package manifest
components/slack_v2/package.json
Bumped package version from 0.1.2 to 0.2.0.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Action as Slack v2 Action
    participant SlackAPI
    participant Runtime as Platform ($)

    Client->>Action: invoke with `user` and `includeLocale`
    Action->>SlackAPI: users.info({ user, include_locale })
    SlackAPI-->>Action: response (ok + user profile) or error
    alt error
        Action->>Runtime: export("$summary", "Failed to find user ...")
        Action-->>Client: throw Error
    else success
        Action->>Runtime: export("$summary", "Successfully found user <displayName>")
        Action-->>Client: return response
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description provides the issue reference (#19757) but lacks detail about the implementation, changes made, or testing performed. Expand the description to include what was implemented, how the action works, scope details, and testing results for clarity.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add Find User by ID action for slack_v2' directly matches the PR's main change: adding a new Find User by ID action to the slack_v2 component.
Linked Issues check ✅ Passed The implementation fully addresses all coding requirements from issue #19757: accepts user ID input, optionally includes locale, uses users.info API, returns profile information, and provides success summary with display name.
Out of Scope Changes check ✅ Passed All changes are directly related to the objective: new find-user-by-id action implementation and version bump as requested in reviews.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@components/slack_v2/actions/find-user-by-id/find-user-by-id.mjs`:
- Around line 37-44: The code only sets a success summary when response.ok is
true and returns response silently on failure; update the error path in
find-user-by-id.mjs to explicitly handle non-OK responses by exporting a clear
failure summary and including diagnostic info from the response (e.g.,
response.error, response.status, or response.body) so callers see why the lookup
failed (use $.export("$summary", `Failed to find user ${this.user}:
${response.error || response.status || 'unknown error'}`)); optionally also
throw or return a rejected error after exporting so upstream logic can handle
the failure.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@components/slack_v2/actions/find-user-by-id/find-user-by-id.mjs`:
- Around line 43-46: Update the displayName selection so the success summary
uses the user's chosen display handle first: in the block assigning displayName
(the const displayName variable used in $.export("$summary", ...)), check
response.user.profile?.display_name first, then
response.user.profile?.real_name, then response.user.name, then this.user as the
final fallback; keep the $.export("$summary", `Successfully found user
${displayName}`) call unchanged.
- Around line 31-41: The response.ok check is dead because this.slack.usersInfo
already throws on non-ok responses; remove the if (!response.ok) branch and
instead wrap the this.slack.usersInfo call inside a try/catch in the run method:
call await this.slack.usersInfo({ user: this.user, include_locale:
this.includeLocale }) inside try, and in catch(err) call $.export("$summary",
`Failed to find user ${this.user}: ${err.message || err}`) then rethrow the
error; update references to response.ok and errorMessage accordingly so only the
try/catch handles failures.

Copy link
Collaborator

@GTFalcao GTFalcao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @aliaksei-v7 , thanks for your contribution!

I'm moving this forward to QA validation. We just need to increase the package.json version for this before it can be merged.

@GTFalcao GTFalcao moved this from Ready for PR Review to Ready for QA in Component (Source and Action) Backlog Jan 22, 2026
@vunguyenhung vunguyenhung moved this from Ready for QA to Ready for Release in Component (Source and Action) Backlog Jan 23, 2026
@vunguyenhung
Copy link
Contributor

Hi everyone, all test cases are passed! Ready for release!

Test reports

@aliaksei-v7
Copy link
Contributor Author

Hey @aliaksei-v7 , thanks for your contribution!

I'm moving this forward to QA validation. We just need to increase the package.json version for this before it can be merged.

Hey @GTFalcao, understood. Thanks for the review!

@GTFalcao GTFalcao merged commit 199c500 into PipedreamHQ:master Jan 23, 2026
9 checks passed
@github-project-automation github-project-automation bot moved this from Ready for Release to Done in Component (Source and Action) Backlog Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

User submitted Submitted by a user

Development

Successfully merging this pull request may close these issues.

[ACTION] Add a "Find User by ID" action for Slack that retrieves user profile information using a user ID.

6 participants