Skip to content

Conversation

@jcortes
Copy link
Collaborator

@jcortes jcortes commented Nov 26, 2025

WHY

Resolves #19173

Summary by CodeRabbit

  • New Features
    • Added Trengo action to list all quick replies with optional filtering by communication type (Messaging or Email). Provides a success confirmation when quick replies are returned.
  • Chores
    • Trengo component version updated to 0.8.0.

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

@jcortes jcortes self-assigned this Nov 26, 2025
@vercel
Copy link

vercel bot commented Nov 26, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Dec 2, 2025 7:23pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Dec 2, 2025 7:23pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

Walkthrough

Adds a new Trengo action to list quick replies, a constants file exposing FILTER_TYPES (MESSAGING, EMAIL), and bumps the Trengo component version in package.json. The action accepts an optional filterType and calls the app SDK method to retrieve quick replies.

Changes

Cohort / File(s) Summary
Trengo Quick Replies Action
components/trengo/actions/list-all-quick-replies/list-all-quick-replies.mjs, components/trengo/common/constants.mjs
New action implementing "List All Quick Replies" with metadata, props (app, optional filterType using FILTER_TYPES), and a run that calls this.app.listQuickReplies({ params: { type: this.filterType } }). Adds FILTER_TYPES enum (["MESSAGING","EMAIL"]).
Package Manifest
components/trengo/package.json
Version bump from 0.7.0 to 0.8.0.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Action as Trengo Action
participant SDK as Trengo App SDK
participant API as Trengo API (GET /api/v2/quick_replies)
Action->>SDK: listQuickReplies(params: { type? })
SDK->>API: HTTP GET /api/v2/quick_replies?type=...
API-->>SDK: 200 OK (quick replies list)
SDK-->>Action: response payload
Note right of Action: returns API response and summary

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Review list-all-quick-replies.mjs for correct param naming and error handling.
  • Verify FILTER_TYPES values match Trengo API accepted types.
  • Confirm package.json version bump is intentional and consistent with release process.

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: a new action to list quick replies for the Trengo app.
Description check ✅ Passed The description includes the required 'WHY' section referencing the linked issue, though minimal implementation details are provided.
Linked Issues check ✅ Passed The PR implements the complete API integration to list all quick replies via the Trengo endpoint, matching issue #19173's requirements.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the list quick replies action; version bump and constants file are supporting changes within scope.
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
  • Commit unit tests in branch trengo-new-component-list-all-quick-replies

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
components/trengo/sources/new-internal-note/new-internal-note.mjs (1)

7-20: Summary text does not match internal note event type.

The source is "New Internal Note Event", but summary still says "New ticket label added event", which is confusing for users inspecting emitted events. Consider aligning the text with the event type.

-        summary: `New ticket label added event: ${event?.body?.message}`,
+        summary: `New internal note event: ${event?.body?.message}`,
components/trengo/actions/send-a-team-chat-message/send-a-team-chat-message.mjs (1)

7-54: Fix typo in configuration error message.

The validation logic is sound, but the thrown message contains a typo: "Attachement". This is user-facing and worth correcting.

-      throw new ConfigurationError("Either `Body` or `Attachement IDs` should be set!");
+      throw new ConfigurationError("Either `Body` or `Attachment IDs` should be set!");
components/trengo/actions/log-a-voice-call/log-a-voice-call.mjs (1)

22-27: Optional: Fix typo in prop name.

The prop name recepientPhoneNumber is misspelled (should be recipientPhoneNumber). While this is pre-existing code and not introduced by this PR, consider fixing it for API consistency.

components/trengo/sources/new-outbound-message/new-outbound-message.mjs (1)

19-19: Optional: Fix typo in summary message.

The word "outbund" should be "outbound". While this is pre-existing code and not introduced by this PR, consider fixing it for better user experience.

Apply this diff to fix the typo:

-        summary: `New outbund message event: ${event?.body?.message}`,
+        summary: `New outbound message event: ${event?.body?.message}`,
components/trengo/actions/send-a-whatsapp-message-template/send-a-whatsapp-message-template.mjs (1)

78-79: Summary message text doesn’t reflect the action behavior

The summary says “The contact has been created”, but this action sends a WhatsApp template message, not a contact-creation call. This can confuse users inspecting step output.

Consider updating to something aligned with the action, for example:

-    $.export("$summary", `The contact has been created. (${resp.name} ID:${resp.id})`);
-    return resp;
+    $.export("$summary", "WhatsApp template message sent successfully");
+    return resp;
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 10ad254 and 627b570.

📒 Files selected for processing (27)
  • components/trengo/actions/attach-label/attach-label.mjs (1 hunks)
  • components/trengo/actions/create-contact/create-contact.mjs (1 hunks)
  • components/trengo/actions/find-contacts/find-contacts.mjs (1 hunks)
  • components/trengo/actions/get-label/get-label.mjs (1 hunks)
  • components/trengo/actions/get-message/get-message.mjs (1 hunks)
  • components/trengo/actions/list-all-quick-replies/list-all-quick-replies.mjs (1 hunks)
  • components/trengo/actions/list-articles/list-articles.mjs (1 hunks)
  • components/trengo/actions/list-labels/list-labels.mjs (1 hunks)
  • components/trengo/actions/list-messages/list-messages.mjs (1 hunks)
  • components/trengo/actions/list-tickets/list-tickets.mjs (1 hunks)
  • components/trengo/actions/log-a-voice-call/log-a-voice-call.mjs (1 hunks)
  • components/trengo/actions/send-a-message/send-a-message.mjs (1 hunks)
  • components/trengo/actions/send-a-team-chat-message/send-a-team-chat-message.mjs (1 hunks)
  • components/trengo/actions/send-a-ticket-message/send-a-ticket-message.mjs (1 hunks)
  • components/trengo/actions/send-a-whatsapp-message-template/send-a-whatsapp-message-template.mjs (1 hunks)
  • components/trengo/package.json (1 hunks)
  • components/trengo/sources/new-inbound-message/new-inbound-message.mjs (1 hunks)
  • components/trengo/sources/new-internal-note/new-internal-note.mjs (1 hunks)
  • components/trengo/sources/new-outbound-message/new-outbound-message.mjs (1 hunks)
  • components/trengo/sources/phone-call-ended/phone-call-ended.mjs (1 hunks)
  • components/trengo/sources/phone-call-missed/phone-call-missed.mjs (1 hunks)
  • components/trengo/sources/phone-call-started/phone-call-started.mjs (1 hunks)
  • components/trengo/sources/ticket-closed/ticket-closed.mjs (1 hunks)
  • components/trengo/sources/ticket-label-added/ticket-label-added.mjs (1 hunks)
  • components/trengo/sources/ticket-reopened/ticket-reopened.mjs (1 hunks)
  • components/trengo/sources/voice-call-recorded/voice-call-recorded.mjs (1 hunks)
  • components/trengo/trengo.app.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-10-20T01:01:02.970Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 18744
File: components/slack_v2/actions/send-large-message/send-large-message.mjs:49-64
Timestamp: 2025-10-20T01:01:02.970Z
Learning: In components/slack_v2/actions/send-large-message/send-large-message.mjs, the metadata_event_payload prop is typed as string, so the code only needs to handle string-to-JSON parsing and does not need to handle object inputs.

Applied to files:

  • components/trengo/actions/send-a-whatsapp-message-template/send-a-whatsapp-message-template.mjs
  • components/trengo/actions/get-message/get-message.mjs
  • components/trengo/actions/send-a-ticket-message/send-a-ticket-message.mjs
  • components/trengo/actions/list-messages/list-messages.mjs
  • components/trengo/actions/send-a-message/send-a-message.mjs
  • components/trengo/actions/send-a-team-chat-message/send-a-team-chat-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/trengo/actions/create-contact/create-contact.mjs
📚 Learning: 2024-07-04T18:11:59.822Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
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/trengo/actions/list-messages/list-messages.mjs
🧬 Code graph analysis (1)
components/trengo/actions/list-all-quick-replies/list-all-quick-replies.mjs (4)
components/trengo/actions/attach-label/attach-label.mjs (1)
  • response (30-36)
components/trengo/actions/get-label/get-label.mjs (1)
  • response (24-27)
components/trengo/actions/get-message/get-message.mjs (1)
  • response (33-37)
components/trengo/trengo.app.mjs (4)
  • response (75-79)
  • response (165-169)
  • response (181-185)
  • response (199-204)
⏰ 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: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (23)
components/trengo/sources/voice-call-recorded/voice-call-recorded.mjs (1)

7-7: Version bump only; behavior remains consistent.

The version metadata update to 0.0.6 matches the broader Trengo package bump and introduces no functional changes.

components/trengo/package.json (1)

3-3: Package version bump looks consistent with component updates.

Updating @pipedream/trengo to 0.6.0 aligns with the new action and multiple component version bumps in this PR.

components/trengo/sources/phone-call-started/phone-call-started.mjs (1)

7-7: Source version increment is straightforward.

The bump to 0.0.7 preserves existing behavior for the phone call started webhook source.

components/trengo/sources/ticket-label-added/ticket-label-added.mjs (1)

7-7: Ticket label source version bump is consistent and safe.

The metadata update to 0.0.7 matches the existing ticket-label-added semantics without altering behavior.

components/trengo/actions/get-label/get-label.mjs (1)

7-7: Read-only get-label action version bump looks good.

Incrementing the action version to 0.0.3 keeps the existing getLabel behavior unchanged and consistent with the documentation link.

components/trengo/actions/list-articles/list-articles.mjs (1)

7-7: LGTM: Routine version bump.

Version increment from 0.0.5 to 0.0.6 is appropriate as part of the package update that introduces new functionality (list-all-quick-replies action).

components/trengo/actions/log-a-voice-call/log-a-voice-call.mjs (1)

6-6: LGTM: Routine version bump.

Version increment from 0.0.7 to 0.0.8 is appropriate as part of the package update.

components/trengo/actions/create-contact/create-contact.mjs (1)

6-6: LGTM: Routine version bump.

Version increment from 0.0.7 to 0.0.8 is appropriate as part of the package update.

components/trengo/sources/ticket-reopened/ticket-reopened.mjs (1)

7-7: LGTM: Routine version bump.

Version increment from 0.0.4 to 0.0.5 is appropriate as part of the package update.

components/trengo/sources/new-outbound-message/new-outbound-message.mjs (1)

7-7: LGTM: Routine version bump.

Version increment from 0.0.6 to 0.0.7 is appropriate as part of the package update.

components/trengo/actions/send-a-message/send-a-message.mjs (1)

6-6: LGTM: Routine version bump.

Version increment from 0.0.7 to 0.0.8 is appropriate as part of the package update.

components/trengo/sources/phone-call-ended/phone-call-ended.mjs (1)

7-7: LGTM: Routine version bump.

Version increment from 0.0.6 to 0.0.7 is appropriate as part of the package update.

components/trengo/sources/ticket-closed/ticket-closed.mjs (1)

7-7: LGTM: Routine version bump.

Version increment from 0.0.4 to 0.0.5 is appropriate as part of the package update.

components/trengo/actions/list-messages/list-messages.mjs (1)

8-8: LGTM!

Version bump aligns with the package version update.

components/trengo/actions/find-contacts/find-contacts.mjs (1)

7-7: LGTM!

Version bump aligns with the package version update.

components/trengo/actions/list-labels/list-labels.mjs (1)

8-8: LGTM!

Version bump aligns with the package version update.

components/trengo/actions/attach-label/attach-label.mjs (1)

7-7: LGTM!

Version bump aligns with the package version update.

components/trengo/actions/get-message/get-message.mjs (1)

7-7: LGTM!

Version bump aligns with the package version update.

components/trengo/actions/send-a-whatsapp-message-template/send-a-whatsapp-message-template.mjs (1)

7-7: Version bump is consistent with the rest of the Trengo actions

Incrementing the action version to 0.0.8 without behavior changes is consistent with the coordinated release across this package.

components/trengo/actions/list-tickets/list-tickets.mjs (1)

8-8: Version bump aligns with coordinated Trengo release

Updating the action version to 0.0.5 with no logic changes is consistent with the other Trengo actions in this PR.

components/trengo/actions/send-a-ticket-message/send-a-ticket-message.mjs (1)

5-5: Metadata version bump looks good

The version increment to 0.0.2 with unchanged behavior is consistent with other Trengo action updates in this PR.

components/trengo/sources/new-inbound-message/new-inbound-message.mjs (1)

7-7: Source version bump is straightforward

Incrementing the source version to 0.0.7 without changing logic is consistent with the rest of the Trengo components in this PR.

components/trengo/trengo.app.mjs (1)

374-379: New listQuickReplies wrapper is consistent with existing API helpers

The new method correctly delegates to _makeRequest with path: "/quick_replies" and matches the style of other list/get helpers like listLabels and getTickets. This is a clean addition to the app API.

@jcortes jcortes force-pushed the trengo-new-component-list-all-quick-replies branch from 627b570 to f0fc852 Compare November 27, 2025 14:37
@jcortes jcortes requested a review from lcaresia November 27, 2025 14:38
lcaresia
lcaresia previously approved these changes Dec 1, 2025
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.

LGTM!

@lcaresia
Copy link
Collaborator

lcaresia commented Dec 1, 2025

@jcortes Approved and moved to QA, but have conflits to resolve.

@vunguyenhung
Copy link
Collaborator

Hi @lcaresia @jcortes, I would suggest to resolve all conflicts first before moving it to Ready for QA. Since once you resolve the conflict, I still need to test again with the new code changes.

Could you resolve the conflict first?

@jcortes jcortes force-pushed the trengo-new-component-list-all-quick-replies branch from f0fc852 to 082ccc3 Compare December 2, 2025 19:19
@jcortes jcortes force-pushed the trengo-new-component-list-all-quick-replies branch from 082ccc3 to 917acc8 Compare December 2, 2025 19:23
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 f0fc852 and 917acc8.

📒 Files selected for processing (3)
  • components/trengo/actions/list-all-quick-replies/list-all-quick-replies.mjs (1 hunks)
  • components/trengo/common/constants.mjs (1 hunks)
  • components/trengo/package.json (1 hunks)
⏰ 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: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (3)
components/trengo/package.json (1)

3-3: LGTM! Version bump is appropriate.

The minor version bump from 0.7.0 to 0.8.0 correctly reflects the addition of new functionality (the list quick replies action).

components/trengo/actions/list-all-quick-replies/list-all-quick-replies.mjs (1)

25-33: Method exists and parameter appears intentional, but API documentation lacks confirmation.

The listQuickReplies method is properly defined in trengo.app.mjs (lines 463–468) and accepts the type parameter as passed. The filterType property references constants.FILTER_TYPES with defined options (MESSAGING, EMAIL), indicating deliberate design. However, the official Trengo API documentation for the /quick_replies endpoint does not document query parameters—including the type parameter. Verify that the API actually accepts this parameter, as it may be undocumented or the endpoint may ignore it.

components/trengo/common/constants.mjs (1)

1-6: Verify FILTER_TYPES values against Trengo API documentation for list quick replies endpoint.

The FILTER_TYPES constant defines "MESSAGING" and "EMAIL" as filter values for the type parameter in the list quick replies endpoint. Trengo API documentation for this endpoint does not publicly expose the exact valid values for this parameter. Additionally, Trengo's typical API patterns use lowercase channel types (email, chat, facebook, twitter, sms, voice, help_center, whatsapp), whereas "MESSAGING" and "EMAIL" are uppercase and "MESSAGING" is not listed as a standard Trengo channel type. Confirm these values are correct by testing against the live Trengo API or consulting the detailed API specification directly.

@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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ACTION] trengo - macros

4 participants