Workflow Name: ☎️ Demo Call Center
Template was created in n8n v1.90.2
Skill Level: High
Categories: n8n, Chatbot
Stacks
- Execute Sub-workflow Trigger node
- Chat Trigger node
- Redis node
- Postgres node
- AI Agent node
- If node, Switch node, Code node, Edit Fields (Set)
Prerequisite
- Execute Sub-workflow Trigger: Telegram Call In Workflow (or your own node)
- Sub-workflow: Taxi Service (or your own node)
- Sub-workflow: Taxi Booking Worker (or your own node)
- Sub-workflow: Demo Call Back (or your own node)
Production Features
- Scaling Design for n8n Queue mode in production environment
- Optional Rate Limit design to prevent overused
- Optional Long Terms Memory design
- Multi-Service design
- Testing Flow with or without dependance on other workflow.
- Error Management
What this workflow does?
This is a n8n Demo Call Center Workflow demo. It is the main entry node for a Multiple Services Chatbot. It will receive message from the Call In Workflow , and decide which service should be use, or which service provider should be process the selected result.
How it works
- The Flow Trigger node will wait for the message from the Call In Workflow or other Sub-workflow.
- When message is received, it will first check for the Rate Limit.
- If ok, load the Session Data from Cache.
- Next, check the current Session for the channel_no (default is chat).
- if channel_no is chat , continue to the AI Agent for chit-chat.
- if channel_no is taxi or others, pass to the Service Input (i.e. Taxi Service) or Service Worker (i.e. Taxi Booking Worker) to handle it directly.
- The AI Agent should decide which service (i.e. taxi) will be used at some point and update the channel_no in Session, and pass to the Service Node (i.e. Taxi Service) at once.
- In case of any error, reply the error in Call Back.
Set up instructions
- Pull and Set up the required SQL from our Github repository.
- Create you Redis credentials , refer to n8n integration documentation for more information.
- Select your Credentials in Rate Limit, Session, Provider and New Session.
- Create you Postgres credentials , refer to n8n integration documentation for more information.
- Select your Credentials in Postgres Chat Memory, Load User Memory and Save User Memory.
- Modify the AI Agent prompt to fit your need
How to adjust it to your needs
- In Session, we have a timestamp fields which is created at the Input node. The usage of this is combined to use with the session id to create a unique session, since some media, such as Telegram, do not have a unique session along with the chat.
- You can use any AI Model for the AI Agent node
- Learn we use the prompt for the Load/Save User Memory on demand.
- Include is our prompt for the taxi service. You can add more service similar to this.