Use this powerful n8n workflow to automatically classify unassigned Zoho Desk support tickets using AI (Gemini via OpenRouter). Features advanced pagination and filtering logic.
Download this n8n workflow template and start using it instantly.
Support Managers: Needing automated triage for high volumes of incoming tickets.
Automation Specialists: Seeking sophisticated examples of AI integration within an n8n workflow.
Zoho Desk Users: Who require custom fields (like 'classification') to be populated automatically.
n8n Developers: Looking for n8n templates demonstrating robust API pagination and error handling in an n8n node setup.
Managing high volumes of support tickets often requires manual effort to correctly assign categories, leading to delays and human error. This comprehensive n8n workflow solves this by fully automating the classification process using AI. This specific n8n workflow demonstrates best practices for integrating third-party AI services (via OpenRouter) with enterprise applications like Zoho Desk.
The automation begins by retrieving all tickets, using precise pagination logic tailored for the Zoho API. It then filters out any tickets that have already been classified, ensuring efficiency. For each remaining ticket, the full thread content is retrieved and passed to the large language model. The core of this solution lies in the chainLlm n8n node, which uses a defined prompt and categorization list to output a single, accurate classification label. Finally, an n8n node updates the ticket in Zoho Desk. This robust n8n workflow serves as an excellent foundation for other complex classification or data enrichment tasks.
This n8n workflow operates in a sequential, highly structured manner:
httpRequest n8n node, 'Fetch All Tickets', uses advanced pagination logic to retrieve all support tickets from the Zoho Desk API in batches of 100.httpRequest n8n nodes, 'Get threads' and 'Get first thread', dynamically retrieve the full plain text content of the initial ticket request from the Zoho Desk API, which is essential context for the AI.chainLlm n8n node takes the ticket subject and body and sends it to the 'OpenRouter Chat Model' n8n node (configured to use Gemini 2.5 Flash). It uses a defined prompt instructing the AI to select one category (e.g., 'Bug', 'Invoice', 'Content') and return only that single word.httpRequest n8n node performs a PUT request to the Zoho Desk API, using the Zoho ticket ID and the AI-generated classification text to update the ticket record. This entire n8n workflow demonstrates seamless data movement between enterprise CRM and external AI services.To deploy and utilize this powerful n8n workflow, follow these steps:
httpRequest n8n node instances. You must configure OAuth2 access following Zoho's specific instructions. Ensure the credential name is correctly linked to the four Zoho nodes. When clicking ‘Execute workflow’ (Manual Trigger): Serves as the starting point, acting as the primary n8n trigger for running the batch job.
Fetch All Tickets (HTTP Request): Responsible for contacting the Zoho Desk search API. Key configuration includes using generic OAuth2 authentication and advanced pagination parameters (e.g., from={{ $pageCount 100 }}) to iterate through all available tickets.
Filter classification = null (Code): A critical n8n node that uses custom JavaScript (filter(item => item.json.classification === null)) to selectively process only unclassified tickets.
Get threads / Get first thread (HTTP Request): These chained n8n nodes perform dynamic lookups using expressions (e.g., {{ $json.data[0].id }}) to retrieve the full, unformatted text of the initial customer request.
OpenRouter Chat Model (LLM Node): The underlying AI service, configured to use the google/gemini-2.5-flash-lite-preview model. This n8n node handles the communication with the LLM API.
Classify (LangChain LLM Chain): This powerful n8n node wraps the LLM call with a detailed, structured prompt. It takes ticket metadata as input and forces the AI to output a clean, single-category response.
Update Ticket (HTTP Request): The final n8n node, executing a PUT request. It uses an expression ({{ $json.text }}) to extract the AI-generated classification and update the classification field on the corresponding Zoho Desk ticket.
Use this advanced n8n workflow to automatically categorize and label incoming Gmail emails using OpenAI GPT-5. Simplify inbox management with powerful n8n automation and intelligent classification.

Use this efficient n8n workflow to automatically categorize incoming Gmail messages into categories like Business, Sales, or Meetings using an advanced OpenAI Chat Model and apply specific actions.

Automate WordPress content inventory using this robust n8n workflow. Schedule quarterly checks to find and archive published posts older than 12 months, ensuring fresh content management.

Use this robust n8n workflow to automatically classify incoming Gmail emails using Google Gemini AI and instantly apply organization labels. Accelerate your inbox zero efforts with this efficient n8n templates.

Automate the closure of cold HubSpot deals using this powerful n8n workflow. It filters inactive leads, updates the CRM status, sends personalized Gmail feedback requests, and notifies your sales team via Slack.

Use this powerful n8n workflow to automatically scrape Google News RSS feeds for targeted topics (like AI/Automation), clean the data, remove duplicates, and log all unique articles directly into Google Sheets. Perfect for market research and content monitoring.

Full Stack Developer turned AI & Automation Engineer, implementing intelligent solutions with custom code, LLMs & n8n. Use my link to book a free 30-minute call to discuss your AI challenges and see if my services might be a good fit for your needs.







































