Create ServiceNow L1 Triage Agent with n8n | AI Chat Classifier, Incident & Request Handling
3 min read
5 days ago
Published on Aug 31, 2025
This response is partially generated with the help of AI. It may contain inaccuracies.
Table of Contents
Introduction
This tutorial will guide you through the process of creating a ServiceNow L1 Triage Agent using n8n. The goal is to automatically triage incoming chat messages into Incidents, Service Requests, or other categories using a large language model (LLM)-powered classifier. This setup will streamline incident and request handling, enhancing efficiency in support operations.
Step 1: Set Up n8n Workflow
- Create a New Workflow: Log into your n8n instance and create a new workflow.
- Add Chat Trigger:
- Select the "Chat Trigger" node.
- Configure it to listen for incoming messages from your chat platform (e.g., Slack, Microsoft Teams).
Step 2: Integrate Text Classifier
- Add Text Classifier Node:
- Connect the output of the Chat Trigger to the Text Classifier node.
- This classifier will use a small LLM prompt to categorize messages.
- Configure Classifier:
- Set it up to return one of three labels:
- Incident
- Request
- Everything Else.
- Set it up to return one of three labels:
Step 3: Create Incident in ServiceNow
- Add ServiceNow Node:
- Include a ServiceNow connector node in your workflow.
- Connect it to the Text Classifier output where the label is identified as "Incident".
- Configure Incident Creation:
- Specify the required fields:
short_description
description
priority
caller
- Specify the required fields:
Step 4: Submit General Requests
- Add HTTP Request Node:
- For messages classified as "Request", connect an HTTP Request node.
- Configure API Call:
- Set it to POST to your Service Catalog API endpoint.
- Include necessary parameters such as request details and catalog item ID.
Step 5: Route to AI Agent
- Add AI Agent Node:
- Connect this node to handle messages labeled as "Everything Else".
- Configure AI Agent:
- Use an OpenAI chat model for generating contextual replies.
- Set up the agent to consult SerpAPI for web searches.
- Implement Simple Memory to save relevant context for future conversations.
Step 6: Optional Summarization Chain
- Add Summarization Node:
- Include an optional chain to summarize long chat threads.
- Configure Summarization:
- Ensure this node processes messages before creating incidents or requests.
- Aim for concise output for the
short_description
anddescription
fields.
Step 7: Implement Error Handling
- Add a Catch Node:
- Include a catch node to log failures and notify administrators.
- Configuration:
- Ensure it captures errors from any previous node and sends alerts appropriately.
Conclusion
In this tutorial, you learned how to create an automated triage agent using n8n and ServiceNow. By setting up a workflow that classifies chat messages and routes them efficiently, you can enhance your support desk operations. Consider testing the workflow thoroughly and iterating on it based on user feedback to continuously improve the triage process.