Skip to content

Conversation

@akbar-kurnia1
Copy link

@akbar-kurnia1 akbar-kurnia1 commented Nov 16, 2025

About this Pull Request

This PR implements the requested List Social Profiles action for the Hootsuite component (closes #19083).

This action allows users to quickly retrieve all social profile IDs associated with their authenticated Hootsuite account.


Technical Implementation Details

  • Method: Calls the GET /socialProfiles endpoint.
  • Logic: The code uses the standard Pipedream authenticated axios wrapper to ensure secure communication.
  • Output: Returns an array of social profile objects (as per the Hootsuite API schema).

WHY

This action serves as a necessary prerequisite and foundational step for subsequent Hootsuite actions (such as scheduling or sending messages), which require a list of valid profile IDs to operate.

Summary by CodeRabbit

  • New Features

    • Added "List Social Profiles" action to retrieve social profiles associated with authenticated Hootsuite accounts.
  • Chores

    • Updated Hootsuite component from version 0.2.1 to 0.3.0, including version updates to related actions and sources.

@vercel
Copy link

vercel bot commented Nov 16, 2025

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

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Nov 17, 2025 5:03pm

@adolfo-pd adolfo-pd added the User submitted Submitted by a user label Nov 16, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 16, 2025

Walkthrough

The changes include version bumps across multiple Hootsuite action modules and the package manifest (from 0.2.1 to 0.3.0). An optional opts parameter is added to the listSocialProfiles() method in the core app file to enable request option passthrough. A new action module for listing social profiles is introduced to support the Hootsuite integration.

Changes

Cohort / File(s) Summary
Action version updates
components/hootsuite/actions/create-media-upload-job/create-media-upload-job.mjs, components/hootsuite/actions/get-media-upload-status/get-media-upload-status.mjs, components/hootsuite/actions/schedule-message/schedule-message.mjs, components/hootsuite/sources/new-post-created/new-post-created.mjs
Version property bumped from "0.0.2" to "0.0.3" across all files; no logic or control flow changes
Package & core app enhancement
components/hootsuite/package.json, components/hootsuite/hootsuite.app.mjs
Package version bumped from "0.2.1" to "0.3.0"; listSocialProfiles() method signature updated to accept optional opts = {} parameter that spreads into request options
New action: List Social Profiles
components/hootsuite/actions/list-social-profiles/list-social-profiles.mjs
New action module exports default object with key "hootsuite-list-social-profiles", calls hootsuite.listSocialProfiles(), returns API response with dynamic summary, includes error handling with user-friendly messages, annotated as read-only and non-destructive

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Workflow as Workflow Engine
    participant Action as List Social Profiles Action
    participant App as Hootsuite App
    participant API as Hootsuite API

    User->>Workflow: Execute action
    Workflow->>Action: call run()
    Action->>App: call listSocialProfiles(opts)
    App->>API: GET /socialProfiles (with opts)
    API-->>App: response { profiles[] }
    App-->>Action: return response
    Action->>Action: generate summary from profile count
    Action-->>Workflow: export({ summary }), return response
    Workflow-->>User: action complete
    
    alt API Error
        API-->>App: error response
        App-->>Action: throw error
        Action->>Action: extract user-friendly message
        Action-->>Workflow: throw descriptive error
        Workflow-->>User: error
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Version bumps across 4 files — Repetitive, trivial metadata updates with no functional impact
  • Opts parameter addition to listSocialProfiles() — Straightforward parameter enhancement; verify no breaking changes to existing callers
  • New list-social-profiles.mjs action — Verify error handling logic, ensure proper annotation flags, validate that the dynamic summary generation logic is correct

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding a new 'list-social-profiles' action to the Hootsuite component, and directly references the closing issue #19083.
Description check ✅ Passed The description provides comprehensive context including the rationale (WHY section), technical implementation details, and explains the action's importance for downstream functionality.
Linked Issues check ✅ Passed The PR successfully implements the primary objective from #19083: retrieving social profiles via GET /socialProfiles endpoint and returning profile objects needed for downstream actions.
Out of Scope Changes check ✅ Passed The PR includes version bumps for the Hootsuite component and related actions, plus an enhancement to listSocialProfiles method signature, which are reasonable supporting changes for releasing this new action.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@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:

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: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb77e57 and e868ecc.

📒 Files selected for processing (1)
  • components/hootsuite/actions/list-social-profiles/list-social-profiles.js (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-15T22:01:11.472Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 18362
File: components/leonardo_ai/actions/generate-image/generate-image.mjs:103-105
Timestamp: 2025-09-15T22:01:11.472Z
Learning: In Pipedream components, pipedream/platform's axios implementation automatically excludes undefined values from HTTP requests, so there's no need to manually check for truthiness before including properties in request payloads.

Applied to files:

  • components/hootsuite/actions/list-social-profiles/list-social-profiles.js
🔇 Additional comments (2)
components/hootsuite/actions/list-social-profiles/list-social-profiles.js (2)

1-2: LGTM!

The import statement correctly uses the Pipedream platform axios wrapper.


12-13: LGTM!

The OAuth token retrieval and API endpoint URL are correctly configured for the Hootsuite API.

akbar-kurnia1 and others added 3 commits November 16, 2025 15:12
…profiles.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…profiles.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…profiles.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e868ecc and 1ce6386.

📒 Files selected for processing (1)
  • components/hootsuite/actions/list-social-profiles/list-social-profiles.js (1 hunks)
🔇 Additional comments (3)
components/hootsuite/actions/list-social-profiles/list-social-profiles.js (3)

1-1: LGTM!

The import correctly uses the Pipedream platform's authenticated axios helper.


3-14: LGTM!

All required action metadata fields are present and correctly formatted. The key follows kebab-case naming conventions, and the description includes a helpful link to the API documentation.


27-31: LGTM!

The error handling correctly uses optional chaining and provides multiple fallbacks to safely extract error messages. This prevents runtime errors from missing properties and ensures users receive helpful error messages.

…profiles.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@akbar-kurnia1
Copy link
Author

Thanks for the feedback! The pagination logic is a bit more complex than I anticipated for my first contribution. Would it be possible for a maintainer to take over from here?

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 444ffe5 and 591d1fc.

📒 Files selected for processing (1)
  • components/hootsuite/actions/list-social-profiles/list-social-profiles.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-10-08T15:33:38.240Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.

Applied to files:

  • components/hootsuite/actions/list-social-profiles/list-social-profiles.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (3)
components/hootsuite/actions/list-social-profiles/list-social-profiles.mjs (3)

1-16: LGTM: Action configuration follows Pipedream conventions.

The action metadata, key naming, annotations, and props structure align with Pipedream component guidelines. The readOnlyHint: true and destructiveHint: false annotations correctly reflect the read-only nature of this list operation.


32-36: Error handling correctly addresses previous review feedback.

The catch block now safely accesses nested error properties using optional chaining and provides multiple fallback levels (error.response?.data?.errors?.[0]?.message || error.message || "Unknown error"). This resolves the unsafe property access issue flagged in the previous review.


23-31: Implementation is correct; no pagination support available for socialProfiles endpoint.

The Hootsuite API's socialProfiles endpoint returns social profiles for the authenticated member via a simple GET request to https://platform.hootsuite.com/v1/socialProfiles. The documented example shows no pagination parameters, confirming that the endpoint returns all available profiles in a single response. The current implementation is appropriate and complete.

Copy link
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

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

Ready for QA!

@vunguyenhung
Copy link
Collaborator

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

Test reports

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ACTION] Hootsuite: List social profiles

5 participants