Skip to content

Conversation

@AdminAdi
Copy link

@AdminAdi AdminAdi commented Nov 11, 2025

I've successfully implemented the Gorgias ticket messages functionality as requested. Here's a quick summary of what's been added:

New Methods in Gorgias OAuth App:
listTicketMessages(ticketId, params)
: Fetches all messages for a specific ticket with pagination support.
getTicketMessage(ticketId, messageId)
: Retrieves a specific message by its ID from a ticket.
New Actions:
List Ticket Messages: Located at components/gorgias_oauth/actions/list-ticket-messages/
Get Ticket Message: Located at components/gorgias_oauth/actions/get-ticket-message/
Documentation:
Added JSDoc comments for all new methods
Included links to the official Gorgias API documentation
Added parameter descriptions and types

Summary by CodeRabbit

  • New Features
    • Added actions: Get Ticket Message, List Ticket Messages (per-ticket, paginated), and List Messages (global, cursor pagination).
  • Chores
    • Package version bumped to 0.7.0.
    • Multiple actions and event sources had metadata version increments.

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

@vercel
Copy link

vercel bot commented Nov 11, 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 21, 2025 7:30pm

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

coderabbitai bot commented Nov 11, 2025

Walkthrough

Adds message-retrieval capabilities to the Gorgias OAuth integration: three new actions (Get Ticket Message, List Ticket Messages, List Messages), three new app methods in the gorgias_oauth app, a package version bump to 0.7.0, and multiple action/source version increments.

Changes

Cohort / File(s) Change Summary
New Message Actions
components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs, components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs, components/gorgias_oauth/actions/list-messages/list-messages.mjs
Added three actions: Get Ticket Message (props: gorgiasOAuth, ticketId, messageId with dynamic options; calls getTicketMessage), List Ticket Messages (props: gorgiasOAuth, ticketId, limit, cursor; calls listTicketMessages), and List Messages (props: gorgiasOAuth, limit, cursor; calls listMessages). Each constructs params, invokes app methods, exports a summary, and returns API response data/meta.
App Module Methods
components/gorgias_oauth/gorgias_oauth.app.mjs
Added three public methods: listTicketMessages({ $, ticketId, params = {} }) -> GET /tickets/{ticketId}/messages, getTicketMessage({ $, ticketId, messageId }) -> GET /tickets/{ticketId}/messages/{messageId}, and listMessages({ $, params = {} }) -> GET /messages. All use the existing _makeRequest helper.
Package version
components/gorgias_oauth/package.json
Bumped package version from 0.6.2 to 0.7.0.
Action & Source version bumps
components/gorgias_oauth/actions/*, components/gorgias_oauth/sources/*
Multiple actions and sources have version field increments only (no behavioral changes). Files include: actions/create-customer, create-macro, create-ticket-message, create-ticket, delete-macro, get-ticket, list-macros, list-tickets, retrieve-customer, update-customer, update-macro, update-ticket, and sources ticket-created, ticket-updated, ticket-message-created, new-macro-created, macro-updated, internal-note-created.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Action as Action (List / Get-Ticket-Message)
  participant App as gorgias_oauth.app
  participant API as Gorgias API

  Note over Action,App: props: gorgiasOAuth, ticketId?, messageId?, limit, cursor
  Action->>App: listTicketMessages({ $, ticketId, params })\nlistMessages({ $, params })\ngetTicketMessage({ $, ticketId, messageId })
  App->>API: GET /tickets/{ticketId}/messages\nor /messages\nor /tickets/{ticketId}/messages/{messageId}
  API-->>App: 200 OK { data, meta }
  App-->>Action: return { data, meta } or message payload
  Action->>Action: export summary (e.g., "Retrieved X messages")
  Action-->>User: return result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Focus review on:
    • components/gorgias_oauth/gorgias_oauth.app.mjs — request path interpolation and params handling.
    • components/gorgias_oauth/actions/*-messages/*.mjs — dynamic options for messageId, pagination (cursor), and returned shapes.
    • components/gorgias_oauth/package.json — confirm version bump.

Suggested reviewers

  • lcaresia

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is comprehensive, covering new methods, actions, and documentation updates. However, it does not follow the required template structure with a WHY section. Add a WHY section to explain the business rationale or use case for this functionality, following the repository's description template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: adding Gorgias ticket messages functionality with new methods and actions.
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

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.

@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 16ec150 and 85f09e1.

📒 Files selected for processing (6)
  • PR_DESCRIPTION.md (1 hunks)
  • components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (1 hunks)
  • components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (1 hunks)
  • components/gorgias_oauth/gorgias_oauth.app.mjs (1 hunks)
  • sage_crm_client.py (1 hunks)
  • update_pr_title.sh (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/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs
  • components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs
🧬 Code graph analysis (2)
components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (3)
types/src/index.ts (1)
  • defineAction (402-408)
components/gorgias_oauth/gorgias_oauth.app.mjs (2)
  • params (295-295)
  • response (285-285)
components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (1)
  • response (25-29)
components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (3)
types/src/index.ts (1)
  • defineAction (402-408)
components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (1)
  • response (42-46)
components/gorgias_oauth/gorgias_oauth.app.mjs (1)
  • response (285-285)
🪛 Ruff (0.14.4)
sage_crm_client.py

40-40: Avoid specifying long messages outside the exception class

(TRY003)


44-44: Avoid specifying long messages outside the exception class

(TRY003)


47-47: Avoid specifying long messages outside the exception class

(TRY003)


66-66: Dynamically typed expressions (typing.Any) are disallowed in **kwargs

(ANN401)


86-86: Logging statement uses f-string

(G004)


93-93: Avoid specifying long messages outside the exception class

(TRY003)


95-95: Avoid specifying long messages outside the exception class

(TRY003)


97-97: Avoid specifying long messages outside the exception class

(TRY003)


107-107: Use logging.exception instead of logging.error

Replace with exception

(TRY400)


107-107: Logging statement uses f-string

(G004)


108-108: Within an except clause, raise exceptions with raise ... from err or raise ... from None to distinguish them from errors in exception handling

(B904)


108-108: Avoid specifying long messages outside the exception class

(TRY003)


111-111: Use logging.exception instead of logging.error

Replace with exception

(TRY400)


111-111: Logging statement uses f-string

(G004)


111-111: Use explicit conversion flag

Replace with conversion flag

(RUF010)


116-116: datetime.datetime.now() called without a tz argument

(DTZ005)


124-124: datetime.datetime.now() called without a tz argument

(DTZ005)


128-128: Dynamically typed expressions (typing.Any) are disallowed in **filters

(ANN401)


189-189: Avoid specifying long messages outside the exception class

(TRY003)


218-218: Avoid specifying long messages outside the exception class

(TRY003)


247-247: Avoid specifying long messages outside the exception class

(TRY003)


249-249: Avoid specifying long messages outside the exception class

(TRY003)


274-274: Avoid specifying long messages outside the exception class

(TRY003)


281-281: Unnecessary pass statement

Remove unnecessary pass

(PIE790)


286-286: Unnecessary pass statement

Remove unnecessary pass

(PIE790)


341-341: f-string without any placeholders

Remove extraneous f prefix

(F541)


356-356: Do not catch blind exception: Exception

(BLE001)

🔇 Additional comments (4)
components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (4)

1-2: LGTM!

The imports are correct and follow Pipedream conventions.


4-9: LGTM!

The action metadata is well-structured, includes helpful documentation links, and follows Pipedream component guidelines.


10-32: LGTM!

The props are well-defined with appropriate validation, defaults, and helpful descriptions. Good use of propDefinition for ticketId and optional for the pagination cursor.


33-46: listTicketMessages method verified—no changes needed.

The listTicketMessages method exists in components/gorgias_oauth/gorgias_oauth.app.mjs (line 236) with the correct signature and implementation. The action file correctly calls this method with all required parameters.

Copy link
Collaborator

@lcaresia lcaresia left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution, I just left some comments to fix.

@lcaresia lcaresia moved this from Ready for PR Review to Changes Required in Component (Source and Action) Backlog Nov 12, 2025
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 85f09e1 and 74cb107.

📒 Files selected for processing (3)
  • components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (1 hunks)
  • components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (1 hunks)
  • components/gorgias_oauth/gorgias_oauth.app.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/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs
  • components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs
🧬 Code graph analysis (2)
components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (3)
types/src/index.ts (1)
  • defineAction (402-408)
components/gorgias_oauth/gorgias_oauth.app.mjs (2)
  • params (295-295)
  • response (285-285)
components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (1)
  • response (25-29)
components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (3)
types/src/index.ts (1)
  • defineAction (402-408)
components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (1)
  • response (42-46)
components/gorgias_oauth/gorgias_oauth.app.mjs (1)
  • response (285-285)
🔇 Additional comments (5)
components/gorgias_oauth/gorgias_oauth.app.mjs (1)

229-243: LGTM! Method implementation is correct.

The listTicketMessages method is properly implemented with comprehensive JSDoc documentation. The path correctly omits the /api prefix since _defaultConfig adds it automatically.

components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (2)

4-23: LGTM! Action metadata and props are well-defined.

The action follows Pipedream component guidelines with proper metadata, key format, and prop definitions. The use of propDefinition for ticketId ensures consistency across actions.


24-35: LGTM! Run method is correctly implemented.

The run method properly calls the app method and returns the response. The summary export was correctly added to address the previous review feedback, providing clear user feedback.

components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (2)

4-32: LGTM! Action metadata and props are well-defined.

The action follows Pipedream conventions with proper metadata and prop definitions. The limit prop includes appropriate constraints (1-100) and a sensible default (50). The optional cursor prop enables pagination.


33-56: LGTM! Run method is correctly implemented.

The run method properly builds the params object, calls the app method, and returns the response with pagination metadata. The summary export was correctly added to address previous feedback, with proper message pluralization based on the result count.

@michelle0927 michelle0927 linked an issue Nov 12, 2025 that may be closed by this pull request
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

♻️ Duplicate comments (1)
components/gorgias_oauth/gorgias_oauth.app.mjs (1)

252-259: Consider "retrieve" prefix for consistency.

The method implementation is correct. However, other single-item retrieval methods in this file use the "retrieve" prefix (retrieveTicket at line 438, retrieveCustomer at line 394, retrieveUser at line 402), while this uses "get". Consider renaming to retrieveTicketMessage for consistency across the codebase.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 74cb107 and 6703b0e.

📒 Files selected for processing (5)
  • components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (1 hunks)
  • components/gorgias_oauth/actions/list-messages/list-messages.mjs (1 hunks)
  • components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (1 hunks)
  • components/gorgias_oauth/gorgias_oauth.app.mjs (1 hunks)
  • components/gorgias_oauth/package.json (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/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs
  • components/gorgias_oauth/actions/list-messages/list-messages.mjs
  • components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs
🧬 Code graph analysis (3)
components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (3)
components/gorgias_oauth/actions/list-messages/list-messages.mjs (1)
  • response (40-43)
components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (1)
  • response (46-50)
components/gorgias_oauth/gorgias_oauth.app.mjs (1)
  • response (300-300)
components/gorgias_oauth/actions/list-messages/list-messages.mjs (2)
components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (2)
  • params (38-40)
  • response (46-50)
components/gorgias_oauth/gorgias_oauth.app.mjs (2)
  • params (310-310)
  • response (300-300)
components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (3)
components/gorgias_oauth/actions/list-messages/list-messages.mjs (2)
  • params (32-34)
  • response (40-43)
components/gorgias_oauth/gorgias_oauth.app.mjs (2)
  • params (310-310)
  • response (300-300)
components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (1)
  • response (46-50)
🔇 Additional comments (11)
components/gorgias_oauth/package.json (1)

3-3: LGTM!

The minor version bump from 0.6.2 to 0.7.0 is appropriate for adding new functionality without breaking changes.

components/gorgias_oauth/gorgias_oauth.app.mjs (2)

229-244: LGTM!

The listTicketMessages method is well-documented and correctly implemented. The path uses the proper format without the double /api prefix.


260-274: LGTM!

The listMessages method is well-documented and correctly implemented. It follows the same patterns as other list methods in the file.

components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (3)

3-13: LGTM!

Action metadata is correctly configured with appropriate annotations for a read-only operation and includes documentation link.


14-36: LGTM!

Props are well-defined with appropriate constraints on the limit parameter (1-100) and proper reuse of the ticketId propDefinition for consistency.


37-61: LGTM!

The run method is correctly implemented with proper parameter handling, summary export following the learned pattern, and returns both data and pagination metadata.

components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (3)

3-13: LGTM!

Action metadata is correctly configured with appropriate annotations for a read-only operation.


16-21: LGTM!

Proper reuse of the ticketId propDefinition for consistency.


45-55: LGTM!

The run method correctly calls the app method and exports an informative summary message.

components/gorgias_oauth/actions/list-messages/list-messages.mjs (2)

14-30: LGTM!

Props are well-defined with appropriate constraints and pagination support.


31-54: LGTM!

The run method is correctly implemented with proper parameter handling, summary export, and returns both data and pagination metadata.

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

♻️ Duplicate comments (1)
components/gorgias_oauth/actions/list-messages/list-messages.mjs (1)

3-13: Consider clarifying the scope in the description.

The description "List all messages" has been improved from the previous version but could be more explicit about the account-wide scope to differentiate it from the ticket-specific list-ticket-messages action.

Suggested improvement:

-  description: "List all messages. [See the documentation](https://developers.gorgias.com/reference/list-messages)",
+  description: "List all messages across all tickets. [See the documentation](https://developers.gorgias.com/reference/list-messages)",

This makes it clearer that the action fetches messages account-wide rather than for a specific ticket.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c4ef295 and 670ef52.

📒 Files selected for processing (2)
  • components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (1 hunks)
  • components/gorgias_oauth/actions/list-messages/list-messages.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 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/gorgias_oauth/actions/list-messages/list-messages.mjs
  • components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs
📚 Learning: 2024-10-30T15:24:39.294Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream PR: 14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".

Applied to files:

  • components/gorgias_oauth/actions/list-messages/list-messages.mjs
🧬 Code graph analysis (2)
components/gorgias_oauth/actions/list-messages/list-messages.mjs (3)
components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (2)
  • params (38-40)
  • response (46-50)
components/gorgias_oauth/gorgias_oauth.app.mjs (2)
  • params (310-310)
  • response (300-300)
components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (1)
  • response (46-50)
components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (2)
components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (1)
  • response (46-50)
components/gorgias_oauth/gorgias_oauth.app.mjs (1)
  • response (300-300)
🔇 Additional comments (4)
components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (2)

1-21: LGTM!

The action metadata, key naming convention, and prop definitions follow Pipedream component guidelines correctly. The use of propDefinition for ticketId promotes reusability.


45-55: LGTM!

The run method correctly implements the action logic with proper error context ($ parameter), includes an informative summary export, and returns the API response. This addresses the previous review feedback about missing summary.

components/gorgias_oauth/actions/list-messages/list-messages.mjs (2)

14-29: LGTM!

The props are well-defined with appropriate constraints, defaults, and helpful descriptions. The limit prop has proper validation (min/max), and the cursor prop is correctly marked optional with clear guidance for users.


31-54: LGTM!

The run method implementation is clean and follows best practices. The summary export correctly formats the message count with proper pluralization, consistent with the learnings pattern. Returning both data and meta enables pagination for users.

Based on learnings.

@michelle0927 michelle0927 moved this from Changes Required to Ready for QA in Component (Source and Action) Backlog Nov 21, 2025
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

Development

Successfully merging this pull request may close these issues.

[ACTION] gorgias - get ticket message

5 participants