Skip to main content
Glama
JurreBrandsenInfoSupport

Zendesk API MCP Server

create_automation

Create automated workflows in Zendesk by defining conditions and actions to manage tickets and improve support processes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesAutomation title
descriptionNoAutomation description
conditionsYesConditions for the automation
actionsYesActions to perform when automation conditions are met

Implementation Reference

  • The main handler function for the 'create_automation' tool. It constructs the automation data from input parameters and delegates to zendeskClient.createAutomation(), handling success and error responses.
    handler: async ({ title, description, conditions, actions }) => { try { const automationData = { title, description, conditions, actions }; const result = await zendeskClient.createAutomation(automationData); return { content: [{ type: "text", text: `Automation created successfully!\n\n${JSON.stringify(result, null, 2)}` }] }; } catch (error) { return { content: [{ type: "text", text: `Error creating automation: ${error.message}` }], isError: true }; } }
  • Zod schema for input validation of the 'create_automation' tool, defining required title, optional description, complex conditions object, and actions array.
    schema: { title: z.string().describe("Automation title"), description: z.string().optional().describe("Automation description"), conditions: z.object({ all: z.array(z.object({ field: z.string().describe("Field to check"), operator: z.string().describe("Operator for comparison"), value: z.any().describe("Value to compare against") })).optional(), any: z.array(z.object({ field: z.string().describe("Field to check"), operator: z.string().describe("Operator for comparison"), value: z.any().describe("Value to compare against") })).optional() }).describe("Conditions for the automation"), actions: z.array(z.object({ field: z.string().describe("Field to modify"), value: z.any().describe("Value to set") })).describe("Actions to perform when automation conditions are met") },
  • The complete tool definition object for 'create_automation', including name, description, schema, and handler. This object is part of the exported automationsTools array, which is imported and registered in src/server.js.
    { name: "create_automation", description: "Create a new automation", schema: { title: z.string().describe("Automation title"), description: z.string().optional().describe("Automation description"), conditions: z.object({ all: z.array(z.object({ field: z.string().describe("Field to check"), operator: z.string().describe("Operator for comparison"), value: z.any().describe("Value to compare against") })).optional(), any: z.array(z.object({ field: z.string().describe("Field to check"), operator: z.string().describe("Operator for comparison"), value: z.any().describe("Value to compare against") })).optional() }).describe("Conditions for the automation"), actions: z.array(z.object({ field: z.string().describe("Field to modify"), value: z.any().describe("Value to set") })).describe("Actions to perform when automation conditions are met") }, handler: async ({ title, description, conditions, actions }) => { try { const automationData = { title, description, conditions, actions }; const result = await zendeskClient.createAutomation(automationData); return { content: [{ type: "text", text: `Automation created successfully!\n\n${JSON.stringify(result, null, 2)}` }] }; } catch (error) { return { content: [{ type: "text", text: `Error creating automation: ${error.message}` }], isError: true }; } }
  • ZendeskClient helper method invoked by the tool handler to perform the actual API POST request to create an automation.
    async createAutomation(data) { return this.request("POST", "/automations.json", { automation: data }); }
  • src/server.js:48-52 (registration)
    The registration loop in the main server file that registers all tools, including 'create_automation' from automationsTools, by calling server.tool() for each.
    allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JurreBrandsenInfoSupport/zendesk-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server