View as Markdown
Zoho Desk icon

Zoho Desk ACTION

List Departments

Lists the departments configured in the organization, with optional filtering by enabled/disabled state. Use this to drive workflows by department name lookups instead of hardcoded department IDs. See the documentation
  • Action
  • Read only
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Zoho Desk account once, then configure and run List Departments from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "zoho_desk-list-departments",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    zoho_desk: { authProvisionId: "apn_xxxxxxx" },
    orgId: "Organization ID",
    searchStr: "Search String",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

List Departments inputs
Property Type Description
orgId Organization ID string
The ID of the organization
Required Dynamic
searchStr Search String string
Free-text search across department name and description (max 100 chars). Leave blank to skip search filtering.
Optional
isEnabled Is Enabled boolean
Set to true to return only enabled departments, false to return only disabled departments. Leave blank to return both.
Optional
chatStatus Chat Status string
Filter departments by chat status. ${UNAVAILABLE} refers to departments which are not available for chat.
Optional
maxResults Max Results integer
Maximum number of results to return. Set to blank to return everything.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
zoho_desk-list-departments
Version
0.0.3
App
Zoho Desk
Authentication
OAuth
Read-only
Yes
Destructive
No
Open world
Yes