Skip to content

Add Zendesk Help Center article search and retrieval actions #16978

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kevinschultz
Copy link
Contributor

@kevinschultz kevinschultz commented Jun 5, 2025

Adds four actions based off of the Zendesk API docs, following the format of the existing actions. The current actions are for tickets only, these are for knowledge articles.

  • search-articles: Search help center articles by keywords and labels
  • get-article: Retrieve full article content by ID
  • list-help-center-sections: List all help center sections
  • list-articles-in-section: List articles within a specific section

These actions enable access to Zendesk's Help Center knowledge base for knowledge workflows.

WHY

I want to leverage Zendesk article content in my workflows. The current integration only considers tickets.

These API docs were used to develop:

https://developer.zendesk.com/api-reference/help_center/help-center-api/articles/#show-article
https://developer.zendesk.com/api-reference/help_center/help-center-api/articles/#list-articles

Summary by CodeRabbit

  • New Features
    • Added the ability to retrieve detailed information for a specific Zendesk help center article by ID.
    • Introduced an option to list all articles within a specific Zendesk help center section, with sorting and locale options.
    • Enabled listing of all sections in the Zendesk help center, supporting sorting and locale customization.
    • Added a feature to search Zendesk help center articles using various filters such as query, labels, sorting, and locale.

- search-articles: Search help center articles by keywords and labels
- get-article: Retrieve full article content by ID
- list-help-center-sections: List all help center sections
- list-articles-in-section: List articles within a specific section

These actions enable access to Zendesk's Help Center knowledge base
for knowledge management and customer support automation workflows.
Copy link

vercel bot commented Jun 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jun 5, 2025 0:50am

Copy link

vercel bot commented Jun 5, 2025

@kevinschultz is attempting to deploy a commit to the Pipedreamers Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Jun 5, 2025

Walkthrough

Four new Zendesk action modules have been added: retrieving a specific article, listing articles in a section, listing help center sections, and searching articles. Each module defines input parameters, constructs API requests to the Zendesk Help Center, and returns the relevant data, including summary messages indicating the results.

Changes

Files/Paths Change Summary
components/zendesk/actions/get-article/get-article.mjs New module: Action to retrieve a specific article by ID, with options for locale, translations, and subdomain.
components/zendesk/actions/list-articles-in-section/list-articles-in-section.mjs New module: Action to list all articles in a specified section, with sorting, locale, and subdomain options.
components/zendesk/actions/list-help-center-sections/list-help-center-sections.mjs New module: Action to list all help center sections, supporting sorting, locale, and custom subdomain options.
components/zendesk/actions/search-articles/search-articles.mjs New module: Action to search articles with filters for query, labels, sorting, locale, and subdomain.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ActionModule
    participant ZendeskAPI

    User->>ActionModule: Provide input parameters
    ActionModule->>ZendeskAPI: Send API request with parameters
    ZendeskAPI-->>ActionModule: Return data (article(s) or section(s))
    ActionModule-->>User: Return results and summary
Loading

Poem

In the warren of knowledge, new tunnels appear,
Four actions for Zendesk now hop in with cheer.
Search, list, or fetch, with a query or two,
Sections and articles, all fresh as the dew.
🥕 CodeRabbit smiles, for the help center grew!

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/zendesk/actions/list-articles-in-section/list-articles-in-section.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:799:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:723:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:706:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:307:38)
at #link (node:internal/modules/esm/module_job:170:49)

components/zendesk/actions/get-article/get-article.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:799:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:723:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:706:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:307:38)
at #link (node:internal/modules/esm/module_job:170:49)

components/zendesk/actions/list-help-center-sections/list-help-center-sections.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:799:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:723:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:706:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:307:38)
at #link (node:internal/modules/esm/module_job:170:49)

  • 1 others
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@adolfo-pd adolfo-pd added the User submitted Submitted by a user label Jun 5, 2025
@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: 4

🧹 Nitpick comments (2)
components/zendesk/actions/search-articles/search-articles.mjs (1)

110-110: Remove redundant comment.

The comment is unnecessary and doesn't add value beyond what's already clear from the code structure.

-// This code defines a Pipedream action that allows users to search for articles in Zendesk's Help Center.
components/zendesk/actions/get-article/get-article.mjs (1)

79-79: Remove redundant comment.

The comment is unnecessary and doesn't add value beyond what's already clear from the action definition.

-// This code defines a Zendesk action to retrieve a specific help center article by its ID.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9c33a97 and 90bfe09.

📒 Files selected for processing (4)
  • components/zendesk/actions/get-article/get-article.mjs (1 hunks)
  • components/zendesk/actions/list-articles-in-section/list-articles-in-section.mjs (1 hunks)
  • components/zendesk/actions/list-help-center-sections/list-help-center-sections.mjs (1 hunks)
  • components/zendesk/actions/search-articles/search-articles.mjs (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (3)
components/zendesk/actions/list-articles-in-section/list-articles-in-section.mjs (1)

56-70: LGTM - Clean API method implementation.

The method correctly constructs the API request path and passes through parameters appropriately.

components/zendesk/actions/list-help-center-sections/list-help-center-sections.mjs (1)

50-63: LGTM - Correct API endpoint and parameter handling.

The method implementation is clean and follows the established pattern correctly.

components/zendesk/actions/get-article/get-article.mjs (1)

38-52: LGTM - Clean implementation with proper error handling path.

The method correctly constructs the API request with the article ID and handles parameters appropriately.

Comment on lines +75 to +88
locale,
sortBy,
sortOrder,
customSubdomain,
} = this;

const params = {};

if (sortBy) {
params.sort_by = sortBy;
}
if (sortOrder) {
params.sort_order = sortOrder;
}
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

Fix missing locale parameter in API request.

The locale parameter is extracted from props but never added to the params object. This means the locale setting will be ignored in the API request.

Apply this diff to include the locale parameter:

 const params = {};
 
+if (locale) {
+  params.locale = locale;
+}
 if (sortBy) {
   params.sort_by = sortBy;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
locale,
sortBy,
sortOrder,
customSubdomain,
} = this;
const params = {};
if (sortBy) {
params.sort_by = sortBy;
}
if (sortOrder) {
params.sort_order = sortOrder;
}
locale,
sortBy,
sortOrder,
customSubdomain,
} = this;
const params = {};
if (locale) {
params.locale = locale;
}
if (sortBy) {
params.sort_by = sortBy;
}
if (sortOrder) {
params.sort_order = sortOrder;
}
🤖 Prompt for AI Agents
In
components/zendesk/actions/list-articles-in-section/list-articles-in-section.mjs
around lines 75 to 88, the locale parameter is extracted but not added to the
params object, causing it to be omitted from the API request. To fix this, add a
condition to check if locale exists and then assign it to params.locale so the
API request includes the locale setting properly.

Comment on lines +67 to +80
locale,
sortBy,
sortOrder,
customSubdomain,
} = this;

const params = {};

if (sortBy) {
params.sort_by = sortBy;
}
if (sortOrder) {
params.sort_order = sortOrder;
}
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

Fix missing locale parameter in API request.

Same issue as in the articles listing action - the locale parameter is extracted but never added to the params object.

Apply this diff to include the locale parameter:

 const params = {};
 
+if (locale) {
+  params.locale = locale;
+}
 if (sortBy) {
   params.sort_by = sortBy;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
locale,
sortBy,
sortOrder,
customSubdomain,
} = this;
const params = {};
if (sortBy) {
params.sort_by = sortBy;
}
if (sortOrder) {
params.sort_order = sortOrder;
}
locale,
sortBy,
sortOrder,
customSubdomain,
} = this;
const params = {};
if (locale) {
params.locale = locale;
}
if (sortBy) {
params.sort_by = sortBy;
}
if (sortOrder) {
params.sort_order = sortOrder;
}
🤖 Prompt for AI Agents
In
components/zendesk/actions/list-help-center-sections/list-help-center-sections.mjs
around lines 67 to 80, the locale parameter is extracted but not added to the
params object sent in the API request. To fix this, add a condition to check if
locale is defined and then assign it to params.locale so that the API request
includes the locale parameter properly.

Comment on lines +79 to +98
const {
searchQuery,
labelNames,
sortBy,
sortOrder,
locale,
customSubdomain,
} = this;

const params = {};

if (labelNames) {
params.label_names = labelNames;
}
if (sortBy) {
params.sort_by = sortBy;
}
if (sortOrder) {
params.sort_order = sortOrder;
}
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

Fix missing search query and locale parameters.

Two critical parameters are missing from the API request:

  1. searchQuery - the main search functionality is not implemented
  2. locale - extracted but not used

Apply this diff to include both parameters:

 const params = {};
 
+if (searchQuery) {
+  params.query = searchQuery;
+}
 if (labelNames) {
   params.label_names = labelNames;
 }
+if (locale) {
+  params.locale = locale;
+}
 if (sortBy) {
   params.sort_by = sortBy;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const {
searchQuery,
labelNames,
sortBy,
sortOrder,
locale,
customSubdomain,
} = this;
const params = {};
if (labelNames) {
params.label_names = labelNames;
}
if (sortBy) {
params.sort_by = sortBy;
}
if (sortOrder) {
params.sort_order = sortOrder;
}
const {
searchQuery,
labelNames,
sortBy,
sortOrder,
locale,
customSubdomain,
} = this;
const params = {};
if (searchQuery) {
params.query = searchQuery;
}
if (labelNames) {
params.label_names = labelNames;
}
if (locale) {
params.locale = locale;
}
if (sortBy) {
params.sort_by = sortBy;
}
if (sortOrder) {
params.sort_order = sortOrder;
}
🤖 Prompt for AI Agents
In components/zendesk/actions/search-articles/search-articles.mjs around lines
79 to 98, the API request parameters object is missing the critical searchQuery
and locale parameters. To fix this, add searchQuery as a parameter named 'query'
and locale as 'locale' to the params object, ensuring both are included in the
API request payload to enable proper search functionality and locale filtering.

Comment on lines +55 to +66
const {
articleId,
locale,
includeTranslations,
customSubdomain,
} = this;

const params = {};

if (includeTranslations) {
params.include = "translations";
}
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

Fix missing locale parameter in API request.

The locale parameter is extracted but never added to the params object, following the same pattern as the other actions.

Apply this diff to include the locale parameter:

 const params = {};
 
+if (locale) {
+  params.locale = locale;
+}
 if (includeTranslations) {
   params.include = "translations";
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const {
articleId,
locale,
includeTranslations,
customSubdomain,
} = this;
const params = {};
if (includeTranslations) {
params.include = "translations";
}
const {
articleId,
locale,
includeTranslations,
customSubdomain,
} = this;
const params = {};
if (locale) {
params.locale = locale;
}
if (includeTranslations) {
params.include = "translations";
}
🤖 Prompt for AI Agents
In components/zendesk/actions/get-article/get-article.mjs around lines 55 to 66,
the locale parameter is extracted but not added to the params object for the API
request. To fix this, add a line to include locale in the params object, similar
to how includeTranslations is handled, ensuring the locale is passed correctly
in the API call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
User submitted Submitted by a user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants