Skip to content

Conversation

@jcortes
Copy link
Collaborator

@jcortes jcortes commented Nov 25, 2025

WHY

Resolves #19180

Summary by CodeRabbit

  • New Features

    • Added FrontApp knowledge base APIs: list/get knowledge bases, list categories, list/retrieve articles, and download article attachments.
    • Added message template actions: get templates, get template folders, and list template folders.
    • Added dynamic selectors for Knowledge Base and Article fields.
  • Chores

    • Bumped package/action/source versions across the FrontApp component (package now 0.9.0).

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

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

vercel bot commented Nov 25, 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 Nov 27, 2025 6:59pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Nov 27, 2025 6:59pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

Walkthrough

Adds FrontApp knowledge-base and message-template actions, a new action to download article attachments (writes binary to /tmp), extends the FrontApp client with propDefinitions and API methods for knowledge bases/templates/attachments, and bumps the frontapp package version.

Changes

Cohort / File(s) Change Summary
Knowledge base actions
components/frontapp/actions/get-knowledge-base/get-knowledge-base.mjs, components/frontapp/actions/list-knowledge-bases/list-knowledge-bases.mjs, components/frontapp/actions/list-knowledge-base-categories/list-knowledge-base-categories.mjs, components/frontapp/actions/list-knowledge-base-articles/list-knowledge-base-articles.mjs, components/frontapp/actions/get-knowledge-base-article/get-knowledge-base-article.mjs
Added actions to list/get knowledge bases, categories, articles, and fetch a single article. Each defines props (using propDefinitions where applicable), calls new client methods in run, exports a summary, and returns API results.
Article attachment download action
components/frontapp/actions/download-article-attachment/download-article-attachment.mjs
New action that downloads an article attachment via client.downloadArticleAttachment (responseType=arraybuffer), derives filename (Content-Disposition → provided → attachmentId), writes binary to /tmp/<filename> synchronously, computes size (Content-Length or buffer length), exports a summary, and returns saved file path.
Message template actions
components/frontapp/actions/get-message-template/get-message-template.mjs, components/frontapp/actions/get-message-template-folder/get-message-template-folder.mjs, components/frontapp/actions/list-message-template-folders/list-message-template-folders.mjs
Added actions to get message templates and folders and list template folders; each invokes new client methods, exports summaries, and returns results.
Core FrontApp client
components/frontapp/frontapp.app.mjs
Added two propDefinitions (knowledgeBaseId, articleId with async options) and added methods: getMessageTemplate, getMessageTemplateFolder, listKnowledgeBases, getKnowledgeBase, listKnowledgeBaseCategories, listKnowledgeBaseArticles, getKnowledgeBaseArticle, downloadArticleAttachment.
Package version bump
components/frontapp/package.json
Updated package version from 0.8.4 to 0.9.0.
Multiple action/source version bumps
components/frontapp/actions/..., components/frontapp/sources/...
Numerous actions and sources had their exported version fields incremented (patch/minor bumps) with no logic changes.

Sequence Diagram(s)

sequenceDiagram
    participant Caller as Caller
    participant Action as download-article-attachment
    participant Client as FrontApp client
    participant FS as File System
    participant Context as Execution Context

    Caller->>Action: invoke(articleId, attachmentId, [filename])
    Action->>Client: downloadArticleAttachment(articleId, attachmentId, responseType=arraybuffer)
    Client-->>Action: response { data: ArrayBuffer, headers }
    Note right of Action: Determine filename\n(Content-Disposition → provided → attachmentId)
    Action->>FS: write file to /tmp/<filename> (binary)
    FS-->>Action: file written
    Note right of Action: Determine size (Content-Length or buffer.length)
    Action->>Context: export "$summary" = "Successfully downloaded attachment: <filename> (<size> bytes)"
    Action-->>Caller: return { path: "/tmp/<filename>" }
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Areas needing extra attention:
    • components/frontapp/frontapp.app.mjs: verify new API paths, request argument shapes, and pagination handling in propDefinitions/options.
    • components/frontapp/actions/download-article-attachment/download-article-attachment.mjs: filename extraction (Content-Disposition parsing and encoding), path traversal/sanitization, and binary write semantics (sync write to /tmp).
    • Aggregation/pagination in list actions to ensure full result collection and correct return shape.
    • Consistency of version bumps relative to package version.

Possibly related PRs

  • Frontapp new components #17689 — Overlapping FrontApp client changes; modifies components/frontapp/frontapp.app.mjs and related actions (propDefinitions and client methods).

Suggested reviewers

  • michelle0927

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title '[ACTION] Front - Articles' directly relates to the changeset, which implements new Front article-related actions as specified in issue #19180.
Description check ✅ Passed The PR description includes the required 'WHY' section that references the linked issue #19180, though it could be more detailed about the specific implementation.
Linked Issues check ✅ Passed The PR implements all required Front API endpoints from issue #19180: message template operations, knowledge base operations, article operations, and attachment downloads are all implemented as new action modules and API methods.
Out of Scope Changes check ✅ Passed All changes are scoped to the Front app integration: new action modules for articles/knowledge bases, frontapp.app.mjs method additions, version bumps for existing actions, and package version update. No out-of-scope changes detected.
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 frontapp-new-article-components

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.

@jcortes jcortes force-pushed the frontapp-new-article-components branch from 82018d8 to 968083e Compare November 25, 2025 21:27
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: 8

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 64f3488 and 968083e.

📒 Files selected for processing (40)
  • components/frontapp/actions/add-comment/add-comment.mjs (1 hunks)
  • components/frontapp/actions/archive-conversation/archive-conversation.mjs (1 hunks)
  • components/frontapp/actions/assign-conversation/assign-conversation.mjs (1 hunks)
  • components/frontapp/actions/create-draft-reply/create-draft-reply.mjs (1 hunks)
  • components/frontapp/actions/create-draft/create-draft.mjs (1 hunks)
  • components/frontapp/actions/create-inbox/create-inbox.mjs (1 hunks)
  • components/frontapp/actions/create-message-template/create-message-template.mjs (1 hunks)
  • components/frontapp/actions/create-message/create-message.mjs (1 hunks)
  • components/frontapp/actions/delete-message-template/delete-message-template.mjs (1 hunks)
  • components/frontapp/actions/download-article-attachment/download-article-attachment.mjs (1 hunks)
  • components/frontapp/actions/get-comment/get-comment.mjs (1 hunks)
  • components/frontapp/actions/get-conversation/get-conversation.mjs (1 hunks)
  • components/frontapp/actions/get-knowledge-base-article/get-knowledge-base-article.mjs (1 hunks)
  • components/frontapp/actions/get-knowledge-base/get-knowledge-base.mjs (1 hunks)
  • components/frontapp/actions/get-message-template-folder/get-message-template-folder.mjs (1 hunks)
  • components/frontapp/actions/get-message-template/get-message-template.mjs (1 hunks)
  • components/frontapp/actions/get-message/get-message.mjs (1 hunks)
  • components/frontapp/actions/get-teammate/get-teammate.mjs (1 hunks)
  • components/frontapp/actions/import-message/import-message.mjs (1 hunks)
  • components/frontapp/actions/list-comment-mentions/list-comment-mentions.mjs (1 hunks)
  • components/frontapp/actions/list-comments/list-comments.mjs (1 hunks)
  • components/frontapp/actions/list-conversations/list-conversations.mjs (1 hunks)
  • components/frontapp/actions/list-knowledge-base-articles/list-knowledge-base-articles.mjs (1 hunks)
  • components/frontapp/actions/list-knowledge-base-categories/list-knowledge-base-categories.mjs (1 hunks)
  • components/frontapp/actions/list-knowledge-bases/list-knowledge-bases.mjs (1 hunks)
  • components/frontapp/actions/list-message-template-folders/list-message-template-folders.mjs (1 hunks)
  • components/frontapp/actions/list-message-templates/list-message-templates.mjs (1 hunks)
  • components/frontapp/actions/list-teammates/list-teammates.mjs (1 hunks)
  • components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs (1 hunks)
  • components/frontapp/actions/reply-to-conversation/reply-to-conversation.mjs (1 hunks)
  • components/frontapp/actions/send-new-message/send-new-message.mjs (1 hunks)
  • components/frontapp/actions/tag-conversation/tag-conversation.mjs (1 hunks)
  • components/frontapp/actions/update-conversation/update-conversation.mjs (1 hunks)
  • components/frontapp/actions/update-teammate/update-teammate.mjs (1 hunks)
  • components/frontapp/frontapp.app.mjs (2 hunks)
  • components/frontapp/package.json (1 hunks)
  • components/frontapp/sources/new-conversation-created/new-conversation-created.mjs (1 hunks)
  • components/frontapp/sources/new-conversation-state-change/new-conversation-state-change.mjs (1 hunks)
  • components/frontapp/sources/new-conversation-tag/new-conversation-tag.mjs (1 hunks)
  • components/frontapp/sources/new-message-template-created/new-message-template-created.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 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/frontapp/actions/get-message/get-message.mjs
  • components/frontapp/actions/send-new-message/send-new-message.mjs
  • components/frontapp/actions/tag-conversation/tag-conversation.mjs
  • components/frontapp/actions/archive-conversation/archive-conversation.mjs
  • components/frontapp/actions/add-comment/add-comment.mjs
  • components/frontapp/actions/list-message-templates/list-message-templates.mjs
  • components/frontapp/actions/get-comment/get-comment.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/frontapp/actions/get-message/get-message.mjs
  • components/frontapp/actions/get-message-template-folder/get-message-template-folder.mjs
  • components/frontapp/actions/get-message-template/get-message-template.mjs
  • components/frontapp/actions/list-message-template-folders/list-message-template-folders.mjs
  • components/frontapp/actions/list-message-templates/list-message-templates.mjs
🧬 Code graph analysis (4)
components/frontapp/actions/list-knowledge-base-articles/list-knowledge-base-articles.mjs (1)
components/frontapp/actions/get-knowledge-base-article/get-knowledge-base-article.mjs (1)
  • article (33-36)
components/frontapp/actions/list-message-template-folders/list-message-template-folders.mjs (1)
components/frontapp/actions/list-knowledge-bases/list-knowledge-bases.mjs (1)
  • response (18-20)
components/frontapp/actions/download-article-attachment/download-article-attachment.mjs (5)
components/frontapp/actions/archive-conversation/archive-conversation.mjs (1)
  • response (24-30)
components/frontapp/actions/create-draft/create-draft.mjs (1)
  • response (101-120)
components/frontapp/actions/create-inbox/create-inbox.mjs (1)
  • response (44-47)
components/frontapp/actions/create-message/create-message.mjs (1)
  • response (67-71)
components/frontapp/actions/get-comment/get-comment.mjs (1)
  • response (33-36)
components/frontapp/actions/list-knowledge-bases/list-knowledge-bases.mjs (16)
components/frontapp/actions/add-comment/add-comment.mjs (1)
  • response (50-62)
components/frontapp/actions/archive-conversation/archive-conversation.mjs (1)
  • response (24-30)
components/frontapp/actions/assign-conversation/assign-conversation.mjs (1)
  • response (32-38)
components/frontapp/actions/create-draft-reply/create-draft-reply.mjs (1)
  • response (107-127)
components/frontapp/actions/create-draft/create-draft.mjs (1)
  • response (101-120)
components/frontapp/actions/create-inbox/create-inbox.mjs (1)
  • response (44-47)
components/frontapp/actions/create-message-template/create-message-template.mjs (1)
  • response (121-125)
components/frontapp/actions/create-message/create-message.mjs (1)
  • response (67-71)
components/frontapp/actions/delete-message-template/delete-message-template.mjs (1)
  • response (30-33)
components/frontapp/actions/download-article-attachment/download-article-attachment.mjs (1)
  • response (42-47)
components/frontapp/actions/get-comment/get-comment.mjs (1)
  • response (33-36)
components/frontapp/actions/get-message/get-message.mjs (1)
  • response (23-26)
components/frontapp/actions/get-teammate/get-teammate.mjs (1)
  • response (25-28)
components/frontapp/actions/import-message/import-message.mjs (1)
  • response (191-195)
components/frontapp/actions/list-message-template-folders/list-message-template-folders.mjs (1)
  • response (43-46)
components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs (1)
  • response (142-142)
⏰ 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). (3)
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (38)
components/frontapp/actions/update-teammate/update-teammate.mjs (1)

7-7: Version bump is consistent and non-breaking

Only the version metadata changed to "0.0.5" with no behavioral modifications. This is appropriate given the broader PR’s patch-level version bumps for actions.

components/frontapp/actions/create-inbox/create-inbox.mjs (1)

7-7: Version bump is appropriate.

The patch version increment aligns with the broader FrontApp package version update to 0.9.0 mentioned in the PR context.

components/frontapp/actions/list-comments/list-comments.mjs (2)

7-7: Version bump is appropriate for this release.

The version increment from 0.0.5 to 0.0.6 is consistent with the broader PR scope, which includes new FrontApp actions and a package version bump to 0.9.0.


29-46: LGTM!

The pagination and result collection logic is correct. The async iteration pattern is properly implemented, and the summary export with plural handling follows Pipedream conventions.

components/frontapp/actions/get-teammate/get-teammate.mjs (2)

7-7: Version bump is appropriate as part of the package release.

The version bump from 0.0.5 to 0.0.6 is consistent with the broader package version update (0.8.4 → 0.9.0) and aligns with adding new functionality to the FrontApp app.


1-32: Implementation is solid.

The action follows Pipedream conventions and best practices. Props are properly defined, the async run method is correct, and the summary export is well-formatted. No concerns with the existing logic or structure.

components/frontapp/actions/add-comment/add-comment.mjs (1)

8-8: Version bump is appropriate.

The patch version update (0.0.5 → 0.0.6) aligns with the broader FrontApp package release. Code logic remains unchanged and the implementation is solid.

components/frontapp/actions/assign-conversation/assign-conversation.mjs (2)

1-42: Code implementation looks sound.

The action logic remains functionally intact. The prop definitions are correct, the API call is properly structured, and error handling follows the existing patterns.


7-7: Verify version bump strategy for unchanged actions.

This action's logic is unchanged, yet the version has been bumped from 0.0.5 to 0.0.6 as part of the package version update to 0.9.0. Please confirm whether this coordinated version bump for all existing actions (even those with no functional changes) is intentional and aligns with Pipedream's versioning guidelines.

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

7-7: Version metadata updated.

The action version is incremented as part of the coordinated release.

components/frontapp/sources/new-conversation-created/new-conversation-created.mjs (1)

9-9: Version metadata updated.

The source version is incremented as part of the coordinated release.

components/frontapp/actions/list-teammates/list-teammates.mjs (1)

7-7: Version metadata updated.

The action version is incremented as part of the coordinated release.

components/frontapp/package.json (1)

3-3: Version bump reflects new feature additions.

The minor version increment (0.8.4 → 0.9.0) appropriately signals the addition of new FrontApp actions for knowledge bases, articles, and message templates as defined in PR objectives. Dependencies remain stable.

components/frontapp/actions/create-draft/create-draft.mjs (1)

8-8: Version metadata updated.

The action version is incremented as part of the coordinated release.

components/frontapp/actions/list-conversations/list-conversations.mjs (1)

7-7: Version metadata updated.

The action version is incremented as part of the coordinated release.

components/frontapp/actions/get-conversation/get-conversation.mjs (1)

7-7: Version metadata updated.

The action version is incremented as part of the coordinated release.

components/frontapp/actions/get-comment/get-comment.mjs (1)

7-7: Version metadata updated.

The action version is incremented as part of the coordinated release.

components/frontapp/actions/reply-to-conversation/reply-to-conversation.mjs (1)

8-8: LGTM!

Version bump aligns with the package-wide update to 0.9.0.

components/frontapp/actions/import-message/import-message.mjs (1)

8-8: LGTM!

Version bump aligns with the package-wide update to 0.9.0.

components/frontapp/actions/create-draft-reply/create-draft-reply.mjs (1)

8-8: LGTM!

Version bump aligns with the package-wide update to 0.9.0.

components/frontapp/actions/list-message-templates/list-message-templates.mjs (1)

7-7: LGTM!

Version bump aligns with the package-wide update to 0.9.0.

components/frontapp/actions/archive-conversation/archive-conversation.mjs (1)

7-7: LGTM!

Version bump aligns with the package-wide update to 0.9.0.

components/frontapp/actions/create-message-template/create-message-template.mjs (1)

9-9: LGTM!

Version bump aligns with the package-wide update to 0.9.0.

components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs (1)

8-8: LGTM!

Version bump aligns with the package-wide update to 0.9.0.

components/frontapp/sources/new-conversation-tag/new-conversation-tag.mjs (1)

9-9: LGTM!

Version bump aligns with the package-wide update to 0.9.0.

components/frontapp/actions/create-message/create-message.mjs (1)

7-7: Version metadata bump only; behavior unchanged

The version increment is consistent with the broader FrontApp package bump and does not affect runtime behavior.

components/frontapp/actions/delete-message-template/delete-message-template.mjs (1)

7-7: Patch version increment for delete-message-template

Version bump only; destructive behavior and props remain unchanged.

components/frontapp/actions/tag-conversation/tag-conversation.mjs (1)

7-7: Tag-conversation action version updated without behavior change

The new version value aligns with the global FrontApp component versioning; logic is intact.

components/frontapp/sources/new-message-template-created/new-message-template-created.mjs (1)

9-9: Source version bump only

The source version is incremented to 0.0.6 with no change to hooks or methods; this is safe.

components/frontapp/actions/list-comment-mentions/list-comment-mentions.mjs (1)

7-7: List-comment-mentions: metadata-only version update

Version bump keeps behavior and API usage identical; no issues spotted.

components/frontapp/actions/update-conversation/update-conversation.mjs (1)

8-8: Update-conversation: patch version increment

Only the action version changes; existing updateConversation call pattern and utils.parse usage remain as before.

components/frontapp/actions/send-new-message/send-new-message.mjs (1)

8-8: Send-new-message: metadata version bump

The change is limited to the version string; the send flow and summary export remain untouched.

components/frontapp/actions/get-message-template/get-message-template.mjs (1)

1-33: LGTM!

The action is well-structured, follows Pipedream conventions, and correctly implements the message template fetch functionality. The annotations accurately reflect the read-only nature of this operation, and the summary message is properly formatted.

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

326-351: LGTM!

The articleId prop definition correctly implements pagination and has an appropriate guard clause when knowledgeBaseId is not provided.


685-746: LGTM!

The new API methods follow the established patterns in this file. Path templates correctly use the destructured parameters, and the methods are consistent with existing implementations.

components/frontapp/sources/new-conversation-state-change/new-conversation-state-change.mjs (1)

10-10: LGTM!

Version bump aligns with the package-level version update to 0.9.0.

components/frontapp/actions/get-knowledge-base/get-knowledge-base.mjs (1)

3-32: Get Knowledge Base action aligns well with existing patterns.

Props, annotations, and the run implementation cleanly wrap frontapp.getKnowledgeBase, pass $ correctly, and export a useful summary before returning the retrieved object. This is consistent with other Front actions in the repo.

components/frontapp/actions/get-knowledge-base-article/get-knowledge-base-article.mjs (1)

3-41: Get Knowledge Base Article action is well-structured and props are wired coherently.

The action metadata, annotations, and run implementation look solid. Using knowledgeBaseId solely to scope the articleId options makes sense, and the call to this.frontapp.getKnowledgeBaseArticle({ $, articleId: this.articleId }) plus the summary export matches the expected Front pattern.

luancazarine
luancazarine previously approved these changes Nov 26, 2025
Copy link
Collaborator

@luancazarine luancazarine left a comment

Choose a reason for hiding this comment

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

Hi @jcortes, LGTM! Ready for QA!

@vunguyenhung
Copy link
Collaborator

Hello everyone, I have tested this PR and there're some test cases failed or needed improvement.

Please check test reports below for more information:

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

Caution

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

⚠️ Outside diff range comments (3)
components/frontapp/actions/list-teammates/list-teammates.mjs (1)

3-39: Version bump looks good; consider pluralizing the action name

The version update to "0.0.6" is consistent with the rest of the FrontApp actions and the existing implementation remains sound.
Minor UX nit: the name is "List Teammate" but the action and summary operate on multiple teammates; consider "List Teammates" for consistency.

components/frontapp/actions/update-teammate/update-teammate.mjs (1)

3-81: Version bump is fine; fix small description typo

The bump to "0.0.5" is appropriate and does not change behavior.
Minor nit: in the username prop description (Line 26), "can only contains" should be "can only contain" to read cleanly in the UI.

components/frontapp/actions/update-conversation/update-conversation.mjs (1)

4-88: Version bump ok; consider passing $ into updateConversation for consistency

The version change to "0.1.11" is straightforward and non-breaking.
For consistency with other FrontApp actions (e.g., updateTeammate, createMessageTemplate) that pass $ into app methods, consider updating:

await this.frontApp.updateConversation({
  conversationId,
  data,
  $,
});

to maintain uniform logging/metrics behavior across actions.

♻️ Duplicate comments (7)
components/frontapp/actions/get-message-template-folder/get-message-template-folder.mjs (1)

16-20: The folderId prop is marked as optional in the base definition, but is required for this action.

The folderId propDefinition in frontapp.app.mjs has optional: true, but this action cannot function without it. Override the optional flag to make it required.

Apply this diff to make the prop required:

     folderId: {
       propDefinition: [
         frontapp,
         "folderId",
       ],
+      optional: false,
     },
components/frontapp/actions/list-knowledge-bases/list-knowledge-bases.mjs (1)

17-24: Verify if pagination is needed for knowledge bases.

This action returns response._results directly without using the paginate helper. If the Front API's /knowledge_bases endpoint is paginated, this will only return the first page of results. Consider using the same pagination pattern as list-knowledge-base-categories and list-knowledge-base-articles for consistency.

Front API list knowledge bases pagination
components/frontapp/frontapp.app.mjs (1)

312-325: Consider pagination for knowledgeBaseId options.

This prop definition fetches all knowledge bases without pagination support, unlike articleId which uses paginateOptions. For consistency and to handle large result sets, consider using the same pagination pattern.

     knowledgeBaseId: {
       type: "string",
       label: "Knowledge Base ID",
       description: "The ID of the knowledge base",
-      async options() {
-        const { _results: bases } = await this.listKnowledgeBases();
-        return bases.map(({
-          id, type,
-        }) => ({
-          label: `${id} (${type})`,
-          value: id,
-        }));
+      async options({ prevContext }) {
+        return this.paginateOptions({
+          prevContext,
+          listResourcesFn: this.listKnowledgeBases,
+          mapper: ({
+            id, type,
+          }) => ({
+            label: `${id} (${type})`,
+            value: id,
+          }),
+        });
       },
     },
components/frontapp/actions/list-message-template-folders/list-message-template-folders.mjs (1)

16-21: Add options constraint for sortBy.

The sortBy prop is documented to accept only created_at or updated_at, but currently allows any string. Add explicit options for consistency with sortOrder and to prevent invalid inputs.

     sortBy: {
       type: "string",
       label: "Sort By",
       description: "Field used to sort the message template folders. Either `created_at` or `updated_at`.",
       optional: true,
+      options: [
+        "created_at",
+        "updated_at",
+      ],
     },
components/frontapp/actions/list-knowledge-base-articles/list-knowledge-base-articles.mjs (1)

32-38: Forward execution context $ to the paginate method.

The paginate call should receive the $ context parameter for proper execution tracking, consistent with other actions in this PR (e.g., get-knowledge-base-article.mjs passes $ to getKnowledgeBaseArticle).

Apply this diff:

     for await (const article of this.frontapp.paginate({
+      $,
       fn: this.frontapp.listKnowledgeBaseArticles,
       args: {
         knowledgeBaseId: this.knowledgeBaseId,
       },
       maxResults: this.maxResults,
     })) {
components/frontapp/actions/download-article-attachment/download-article-attachment.mjs (2)

44-48: Unused syncDir prop declared but never referenced.

The syncDir prop is defined but not used in the run method (line 62 uses hardcoded /tmp). Based on learnings, files written to /tmp with returned file path will sync properly, so the current implementation works. However, the unused syncDir prop is misleading.

Either remove the unused prop or use it:

-    const filePath = path.join("/tmp", fileName);
+    const filePath = path.join(this.syncDir, fileName);

Or remove it entirely:

-    syncDir: {
-      type: "dir",
-      accessMode: "write",
-      sync: true,
-    },

Based on learnings, the '/tmp' approach with returned filepath works for file sync.


58-62: Consider URL-decoding RFC 5987 encoded filenames.

The regex handles filename*=UTF-8''... format, but RFC 5987 filenames are percent-encoded. A filename like file%20name.pdf would remain encoded without decoding.

-    const headerFileName = contentDisposition?.match(/filename\*?=(?:UTF-8'')?([^;]+)/)?.[1]?.replace(/['"]/g, "");
+    let headerFileName = contentDisposition?.match(/filename\*?=(?:UTF-8'')?([^;]+)/)?.[1]?.replace(/['"]/g, "");
+    if (headerFileName) {
+      try {
+        headerFileName = decodeURIComponent(headerFileName);
+      } catch (e) {
+        // Keep original if decoding fails
+      }
+    }
     const fileName = this.filename || headerFileName || this.attachmentId;
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 968083e and d6c8d8a.

📒 Files selected for processing (40)
  • components/frontapp/actions/add-comment/add-comment.mjs (1 hunks)
  • components/frontapp/actions/archive-conversation/archive-conversation.mjs (1 hunks)
  • components/frontapp/actions/assign-conversation/assign-conversation.mjs (1 hunks)
  • components/frontapp/actions/create-draft-reply/create-draft-reply.mjs (1 hunks)
  • components/frontapp/actions/create-draft/create-draft.mjs (1 hunks)
  • components/frontapp/actions/create-inbox/create-inbox.mjs (1 hunks)
  • components/frontapp/actions/create-message-template/create-message-template.mjs (1 hunks)
  • components/frontapp/actions/create-message/create-message.mjs (1 hunks)
  • components/frontapp/actions/delete-message-template/delete-message-template.mjs (1 hunks)
  • components/frontapp/actions/download-article-attachment/download-article-attachment.mjs (1 hunks)
  • components/frontapp/actions/get-comment/get-comment.mjs (1 hunks)
  • components/frontapp/actions/get-conversation/get-conversation.mjs (1 hunks)
  • components/frontapp/actions/get-knowledge-base-article/get-knowledge-base-article.mjs (1 hunks)
  • components/frontapp/actions/get-knowledge-base/get-knowledge-base.mjs (1 hunks)
  • components/frontapp/actions/get-message-template-folder/get-message-template-folder.mjs (1 hunks)
  • components/frontapp/actions/get-message-template/get-message-template.mjs (1 hunks)
  • components/frontapp/actions/get-message/get-message.mjs (1 hunks)
  • components/frontapp/actions/get-teammate/get-teammate.mjs (1 hunks)
  • components/frontapp/actions/import-message/import-message.mjs (1 hunks)
  • components/frontapp/actions/list-comment-mentions/list-comment-mentions.mjs (1 hunks)
  • components/frontapp/actions/list-comments/list-comments.mjs (1 hunks)
  • components/frontapp/actions/list-conversations/list-conversations.mjs (1 hunks)
  • components/frontapp/actions/list-knowledge-base-articles/list-knowledge-base-articles.mjs (1 hunks)
  • components/frontapp/actions/list-knowledge-base-categories/list-knowledge-base-categories.mjs (1 hunks)
  • components/frontapp/actions/list-knowledge-bases/list-knowledge-bases.mjs (1 hunks)
  • components/frontapp/actions/list-message-template-folders/list-message-template-folders.mjs (1 hunks)
  • components/frontapp/actions/list-message-templates/list-message-templates.mjs (1 hunks)
  • components/frontapp/actions/list-teammates/list-teammates.mjs (1 hunks)
  • components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs (1 hunks)
  • components/frontapp/actions/reply-to-conversation/reply-to-conversation.mjs (1 hunks)
  • components/frontapp/actions/send-new-message/send-new-message.mjs (1 hunks)
  • components/frontapp/actions/tag-conversation/tag-conversation.mjs (1 hunks)
  • components/frontapp/actions/update-conversation/update-conversation.mjs (1 hunks)
  • components/frontapp/actions/update-teammate/update-teammate.mjs (1 hunks)
  • components/frontapp/frontapp.app.mjs (2 hunks)
  • components/frontapp/package.json (1 hunks)
  • components/frontapp/sources/new-conversation-created/new-conversation-created.mjs (1 hunks)
  • components/frontapp/sources/new-conversation-state-change/new-conversation-state-change.mjs (1 hunks)
  • components/frontapp/sources/new-conversation-tag/new-conversation-tag.mjs (1 hunks)
  • components/frontapp/sources/new-message-template-created/new-message-template-created.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📚 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/frontapp/actions/get-message/get-message.mjs
  • components/frontapp/actions/add-comment/add-comment.mjs
  • components/frontapp/actions/send-new-message/send-new-message.mjs
  • components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs
  • components/frontapp/actions/list-message-templates/list-message-templates.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/frontapp/actions/get-message/get-message.mjs
  • components/frontapp/actions/list-message-template-folders/list-message-template-folders.mjs
  • components/frontapp/actions/get-message-template/get-message-template.mjs
  • components/frontapp/actions/get-message-template-folder/get-message-template-folder.mjs
📚 Learning: 2025-07-01T16:56:20.177Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 17375
File: components/tinypng/actions/convert-image/convert-image.mjs:33-37
Timestamp: 2025-07-01T16:56:20.177Z
Learning: 'dir' props with sync functionality do not expose a path to the sync directory directly. For files to be synced, they must be either: (1) written to `process.env.STASH_DIR` (`/tmp/__stash`), or (2) written to `/tmp` and have their file path returned from the `run` method as a string, `[filepath]`, `[_, filepath]`, `{ filePath }`, `{ filepath }`, or `{ path }`.

Applied to files:

  • components/frontapp/actions/download-article-attachment/download-article-attachment.mjs
📚 Learning: 2025-07-01T17:01:46.327Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 17375
File: components/tinypng/actions/compress-image/compress-image.mjs:18-23
Timestamp: 2025-07-01T17:01:46.327Z
Learning: In TinyPNG compress-image action (components/tinypng/actions/compress-image/compress-image.mjs), the syncDir property uses accessMode: "read" because this action only reads input files and returns API responses without writing files to /tmp, unlike other TinyPNG actions that save processed files to disk.

Applied to files:

  • components/frontapp/actions/download-article-attachment/download-article-attachment.mjs
📚 Learning: 2025-07-01T17:07:48.193Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 17375
File: components/zerobounce/actions/get-validation-results-file/get-validation-results-file.mjs:23-27
Timestamp: 2025-07-01T17:07:48.193Z
Learning: For "dir" props in Pipedream components, whether to mark them as optional depends on the action's file I/O behavior - if an action always writes files as output, the "dir" prop should not be marked as optional.

Applied to files:

  • components/frontapp/actions/download-article-attachment/download-article-attachment.mjs
  • components/frontapp/actions/get-message-template-folder/get-message-template-folder.mjs
🧬 Code graph analysis (2)
components/frontapp/actions/list-message-template-folders/list-message-template-folders.mjs (1)
components/frontapp/actions/list-knowledge-bases/list-knowledge-bases.mjs (1)
  • response (18-20)
components/frontapp/actions/list-knowledge-base-articles/list-knowledge-base-articles.mjs (1)
components/frontapp/actions/get-knowledge-base-article/get-knowledge-base-article.mjs (1)
  • article (33-36)
⏰ 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: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
🔇 Additional comments (39)
components/frontapp/actions/delete-message-template/delete-message-template.mjs (1)

7-7: Version bump is appropriate.

The patch version increment (0.0.4 → 0.0.5) aligns with the broader package versioning updates across the PR (frontapp: 0.8.4 → 0.9.0).

Please verify that the frontApp.deleteMessageTemplate() method and the messageTemplateId propDefinition (imported from ../../frontapp.app.mjs) remain stable and are not affected by the new changes introduced in this PR. Given that reviewer vunguyenhung reported test failures, confirm this action's tests continue to pass and that no breaking changes were introduced to the app module.

components/frontapp/actions/create-draft-reply/create-draft-reply.mjs (1)

8-8: Version bump aligns with PR's coordinated versioning update.

The patch version increment (0.0.5 → 0.0.6) is consistent with the broader versioning updates across actions and the frontapp package version bump to 0.9.0 mentioned in the PR.

The PR objectives mention that test failures were reported by the reviewer. Please verify that this action still passes tests after the version bump.

components/frontapp/actions/get-conversation/get-conversation.mjs (1)

1-51: All referenced methods are properly implemented in the FrontApp app module.

Verification confirms that getConversation() (line 559), makeRequest() (line 390), and paginate() (line 795) are all implemented in frontapp.app.mjs. The action code correctly uses these methods with appropriate parameters. The version bump to 0.0.6 aligns with coordinated versioning across the FrontApp action suite per the PR objectives. No functional issues detected.

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

7-7: LGTM!

Version bump aligns with the package version update to 0.9.0. No logic changes.

components/frontapp/actions/archive-conversation/archive-conversation.mjs (1)

7-7: LGTM!

Version bump aligns with the package version update to 0.9.0. No logic changes.

components/frontapp/package.json (1)

3-3: LGTM!

Minor version bump to 0.9.0 is appropriate for the new knowledge base and message template actions being added in this PR.

components/frontapp/actions/add-comment/add-comment.mjs (1)

8-8: LGTM!

Version bump aligns with the package version update to 0.9.0. No logic changes.

components/frontapp/actions/create-draft/create-draft.mjs (1)

8-8: LGTM!

Version bump aligns with the package version update to 0.9.0. No logic changes.

components/frontapp/actions/list-message-templates/list-message-templates.mjs (1)

3-74: Metadata-only version bump; action logic still solid

The bump to "0.0.5" matches the broader FrontApp release. Sorting, pagination, and summary behavior remain correct and consistent with other list actions.

components/frontapp/actions/get-teammate/get-teammate.mjs (1)

3-31: Get teammate action version bump is safe

Updating the version to "0.0.6" preserves existing behavior; the props, getTeammate call, and summary remain consistent and correct.

components/frontapp/sources/new-conversation-state-change/new-conversation-state-change.mjs (1)

5-44: Source version increment only; behavior unchanged

The version update to "0.0.8" is aligned with the rest of the FrontApp package changes. The polling params and emit logic remain consistent with prior behavior.

components/frontapp/actions/create-message-template/create-message-template.mjs (1)

5-129: Create message template version bump preserves existing behavior

The change to "0.0.5" is metadata-only; the existing JSON vs multipart handling, attachment streaming, and summary export remain valid and consistent with other actions.

components/frontapp/actions/create-message/create-message.mjs (1)

3-75: Create message action version update is non-breaking

The version bump to "0.0.4" is consistent with the wider release. The payload construction and createMessage invocation are unchanged and look correct.

components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs (1)

8-8: LGTM!

Version bump aligns with the package-wide release for the new Articles functionality.

components/frontapp/sources/new-message-template-created/new-message-template-created.mjs (1)

9-9: LGTM!

Version bump is consistent with the coordinated release.

components/frontapp/sources/new-conversation-created/new-conversation-created.mjs (1)

9-9: LGTM!

Version bump aligns with the package release.

components/frontapp/actions/list-comments/list-comments.mjs (1)

7-7: LGTM!

Version bump is consistent with the release cadence.

components/frontapp/sources/new-conversation-tag/new-conversation-tag.mjs (1)

9-9: LGTM!

Version bump aligns with the coordinated release.

components/frontapp/actions/create-inbox/create-inbox.mjs (1)

7-7: LGTM!

Version bump is consistent with the package release.

components/frontapp/actions/assign-conversation/assign-conversation.mjs (1)

7-7: LGTM!

Version bump aligns with the release.

components/frontapp/actions/reply-to-conversation/reply-to-conversation.mjs (1)

8-8: LGTM!

Version bump is consistent with the coordinated package release.

components/frontapp/actions/import-message/import-message.mjs (1)

8-8: LGTM!

Version bump is consistent with the broader package release.

components/frontapp/actions/get-comment/get-comment.mjs (1)

7-7: LGTM!

Version bump aligns with the package release.

components/frontapp/actions/send-new-message/send-new-message.mjs (1)

8-8: LGTM!

Version bump is consistent with the package release.

components/frontapp/actions/list-conversations/list-conversations.mjs (1)

7-7: LGTM!

Version bump aligns with the broader release.

components/frontapp/actions/tag-conversation/tag-conversation.mjs (1)

7-7: LGTM!

Version bump is consistent with the package release.

components/frontapp/actions/list-comment-mentions/list-comment-mentions.mjs (1)

7-7: LGTM!

Version bump aligns with the broader release.

components/frontapp/actions/get-message-template-folder/get-message-template-folder.mjs (1)

23-32: LGTM!

The action implementation follows the standard pattern for FrontApp "get" actions.

components/frontapp/actions/get-message-template/get-message-template.mjs (2)

23-32: LGTM!

The action implementation follows the standard pattern and the summary message is correctly formatted.


16-20: Based on my verification, I can now rewrite the review comment:

The messageTemplateId prop is already required and does not need an override.

The base propDefinition in frontapp.app.mjs (lines 277–289) does not include optional: true, which means it defaults to required. Unlike folderId (which is marked as optional: true in the base definition), messageTemplateId is correctly configured as a required prop and will work as expected in this action without any changes.

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

326-351: LGTM!

The articleId prop definition correctly implements pagination with paginateOptions and properly handles the case when knowledgeBaseId is not provided by returning an empty array.


739-746: Original review concern is incorrect—binary response handling is already properly implemented.

The action file (line 55) already passes responseType: "arraybuffer" when calling downloadArticleAttachment. Since the method definition uses ...args, this parameter is automatically forwarded to makeRequest, allowing the method to handle binary downloads correctly. The action then processes the binary data as expected (lines 64-68). No changes are required.

components/frontapp/actions/list-knowledge-base-categories/list-knowledge-base-categories.mjs (1)

1-45: LGTM!

The action correctly implements pagination using this.frontapp.paginate, follows the established pattern for list actions, and includes appropriate annotations for a read-only operation.

components/frontapp/actions/get-knowledge-base/get-knowledge-base.mjs (1)

1-33: LGTM!

The action is well-structured, correctly uses the propDefinition for knowledgeBaseId, and follows the established pattern for get actions with proper context passing and summary export.

components/frontapp/actions/list-knowledge-base-articles/list-knowledge-base-articles.mjs (1)

1-28: Action metadata and props are well-structured.

The action follows standard conventions with appropriate annotations (destructiveHint: false, openWorldHint: true, readOnlyHint: true) and leverages propDefinitions for knowledgeBaseId and maxResults.

components/frontapp/actions/get-knowledge-base-article/get-knowledge-base-article.mjs (2)

1-31: Well-structured action with proper dynamic prop configuration.

The action metadata follows conventions, and the articleId prop correctly uses a resolver to pass knowledgeBaseId, enabling dynamic option loading based on the selected knowledge base.


32-41: Clean implementation with proper context handling.

The run method correctly passes the execution context $ to the API method and provides a clear summary of the operation.

components/frontapp/actions/download-article-attachment/download-article-attachment.mjs (2)

1-15: Appropriate imports and metadata for file download action.

The action correctly imports fs and path for file operations and uses proper annotations for a read-only download operation.


63-76: File write and return logic is correct.

The buffer handling accounts for both Buffer and ArrayBuffer responses, uses synchronous write appropriately, and returns the file path to enable file sync (per learnings, files written to /tmp with returned filepath will be synced).

Comment on lines +43 to +50
const response = await this.frontapp.listMessageTemplateFolders({
$,
params,
});

$.export("$summary", `Successfully retrieved ${response._results.length} message template folders`);

return response._results;
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's understand the structure of the codebase
git ls-files | head -20

Repository: PipedreamHQ/pipedream

Length of output: 1211


🏁 Script executed:

# Find the frontapp module and other list actions for comparison
fd "list-" components/frontapp/actions/ --type d

Repository: PipedreamHQ/pipedream

Length of output: 529


🏁 Script executed:

# Examine the file in question
cat -n components/frontapp/actions/list-message-template-folders/list-message-template-folders.mjs

Repository: PipedreamHQ/pipedream

Length of output: 1718


🏁 Script executed:

# Search for paginate helper usage in similar list actions
rg "paginate" components/frontapp/actions/ -A 2 -B 2 --type js

Repository: PipedreamHQ/pipedream

Length of output: 47


🏁 Script executed:

# Find the frontapp.app.mjs file
fd "frontapp.app.mjs" components/

Repository: PipedreamHQ/pipedream

Length of output: 101


🏁 Script executed:

# Check list-knowledge-bases for comparison
cat -n components/frontapp/actions/list-knowledge-bases/list-knowledge-bases.mjs

Repository: PipedreamHQ/pipedream

Length of output: 926


🏁 Script executed:

# Check list-conversations for comparison
cat -n components/frontapp/actions/list-conversations/list-conversations.mjs

Repository: PipedreamHQ/pipedream

Length of output: 1286


🏁 Script executed:

# Search for paginate usage across all frontapp actions
rg "paginate" components/frontapp/ --type js -B 3 -A 3

Repository: PipedreamHQ/pipedream

Length of output: 47


🏁 Script executed:

# Check the frontapp app module
wc -l components/frontapp/frontapp.app.mjs

Repository: PipedreamHQ/pipedream

Length of output: 105


🏁 Script executed:

# View the listMessageTemplateFolders method in frontapp.app.mjs
rg "listMessageTemplateFolders" components/frontapp/frontapp.app.mjs -A 10 -B 2

Repository: PipedreamHQ/pipedream

Length of output: 662


🏁 Script executed:

# View the listKnowledgeBases method for comparison
rg "listKnowledgeBases" components/frontapp/frontapp.app.mjs -A 10 -B 2

Repository: PipedreamHQ/pipedream

Length of output: 719


🏁 Script executed:

# View the listConversations method for comparison
rg "listConversations" components/frontapp/frontapp.app.mjs -A 10 -B 2

Repository: PipedreamHQ/pipedream

Length of output: 941


🏁 Script executed:

# Check if there's a paginate method definition
rg "paginate\s*\(" components/frontapp/frontapp.app.mjs -A 5 -B 2

Repository: PipedreamHQ/pipedream

Length of output: 253


🏁 Script executed:

# Find the makeRequest method implementation
rg "async makeRequest" components/frontapp/frontapp.app.mjs -A 20 -B 2

Repository: PipedreamHQ/pipedream

Length of output: 987


🏁 Script executed:

# Search for pagination-related code in the frontapp module
rg "pageToken|_links|pagination" components/frontapp/frontapp.app.mjs -B 2 -A 2

Repository: PipedreamHQ/pipedream

Length of output: 1376


🏁 Script executed:

# Look at more context around the paginate method
rg "async \*paginate" components/frontapp/frontapp.app.mjs -A 30

Repository: PipedreamHQ/pipedream

Length of output: 927


🏁 Script executed:

# Search for any test files or examples with message_template_folders responses
rg "_pagination" components/frontapp/ --type js -B 5 -A 5 | head -50

Repository: PipedreamHQ/pipedream

Length of output: 47


🏁 Script executed:

# Check if there are any message_template related tests
fd "test" components/frontapp/ -type f | grep -i template

Repository: PipedreamHQ/pipedream

Length of output: 235


🏁 Script executed:

# Look for any references to message_template_folders in docs or comments
rg "message_template_folders" components/frontapp/ -B 2 -A 2

Repository: PipedreamHQ/pipedream

Length of output: 717


🏁 Script executed:

# Check the Front API documentation URL mentioned in the action
rg "dev.frontapp.com" components/frontapp/actions/list-message-template-folders/ -A 1 -B 1

Repository: PipedreamHQ/pipedream

Length of output: 527


🌐 Web query:

Front API list message template folders pagination support dev.frontapp.com

💡 Result:

Short answer: Yes — Front’s Core API uses the page_token / _pagination pattern for list endpoints, and the message template endpoints (including message_template_folders) are part of the Core API surface added in the message-templates changelog. So call GET /message_template_folders with limit and page_token and inspect the response’s _pagination / next link to iterate pages. [1][2]

Sources:

  • Pagination docs (page_token / _pagination usage). [1]
  • Core API changelog listing the message_template_folders endpoints. [2]

Implement pagination support for the message template folders endpoint.

The Front API's /message_template_folders endpoint supports pagination via the page_token parameter and returns results in the _pagination structure. The current implementation returns only the first page of results. Add the maxResults prop and use the paginate helper, following the pattern used in list-conversations.mjs, to retrieve all available message template folders.

🤖 Prompt for AI Agents
In
components/frontapp/actions/list-message-template-folders/list-message-template-folders.mjs
around lines 43 to 50, the action only returns the first page of
/message_template_folders; implement pagination by accepting a maxResults prop
and using the existing paginate helper (same pattern as list-conversations.mjs)
to iterate using the page_token/_pagination structure from the API, aggregating
all _results into a single array, export a summary with the total combined
count, and return the full combined results array.

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] Front - Articles

4 participants