Customer authentication for chat support with OpenAI and Redis session management
Needs changesWhat this workflow does
This AI workflow has 14 nodes and runs when a chat message arrives (plus 2 other triggers). Along the way it connects OpenAI Chat Model and Redis.
How it runs
Trigger: When a chat message arrives (plus 2 other triggers).
- Get Session (Redis): get
- Switch: routes items into 1 branches
- Customer Support Agent (AI Agent): runs an AI agent, with model: LLM; 1 tool (Get Auth URL); memory: Memory
- Get Auth Url Response (Edit Fields (Set)): sets 1 field: auth_url
- Get Customer Profile (Edit Fields (Set)): sets or maps fields
- Update Session (Redis): set
- Confirm Login Success (n8n Form): shows the next form page
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in Customer Support Agent (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Customer Support Agent (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (12)
- Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Redis
n8n-nodes-base.redis - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Switch
n8n-nodes-base.switch - Edit Fields (Set)
n8n-nodes-base.set - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - n8n Form
n8n-nodes-base.form - AI Agent
@n8n/n8n-nodes-langchain.agent - No Operation, do nothing
n8n-nodes-base.noOp - n8n Form Trigger
n8n-nodes-base.formTrigger
From the author
This n8n template demonstrates one approach to customer authentication via chat agents. Unlike approaches where you have to authenticate users prior to interacting with the agent, this approach allows guest users to authenticate at any time during the session…