delete_automation
Delete Zendesk automations by ID to remove outdated or unnecessary automated workflows from your support system.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Automation ID to delete |
Implementation Reference
- src/tools/automations.js:154-169 (handler)Handler function that invokes the Zendesk client to delete the automation by ID and returns formatted success or error response.handler: async ({ id }) => { try { await zendeskClient.deleteAutomation(id); return { content: [{ type: "text", text: `Automation ${id} deleted successfully!` }] }; } catch (error) { return { content: [{ type: "text", text: `Error deleting automation: ${error.message}` }], isError: true }; } }
- src/tools/automations.js:151-153 (schema)Input schema using Zod, requiring a numeric 'id' parameter for the automation to delete.schema: { id: z.number().describe("Automation ID to delete") },
- src/server.js:47-52 (registration)Registration code that dynamically registers all tools, including 'delete_automation' from automationsTools spread into allTools.// Register each tool with the server allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
- src/zendesk-client.js:245-247 (helper)ZendeskClient helper method performing the actual HTTP DELETE request to the Zendesk automations API endpoint.async deleteAutomation(id) { return this.request("DELETE", `/automations/${id}.json`); }