Answer shop chat questions on products, orders and returns with GPT-4o
Ready for 3.0What this workflow does
This AI workflow has 33 nodes and runs when a chat message arrives (plus 1 other trigger). Along the way it connects OpenAI Chat Model.
How it runs
Trigger: When a chat message arrives (plus 1 other trigger).
- Settings (Edit Fields (Set)): sets 5 fields: shopName, supportEmail, fromEmail…
- Return policy (Edit Fields (Set)): sets 1 field: returnDays
- Returns table (Data table): create (table)
- Sample orders (Code): runs custom JavaScript code
- Back to the message (Edit Fields (Set)): sets or maps fields
- Matching order (Code): runs custom JavaScript code
- Answer (AI Agent): runs an AI agent, with model: Chat model; 3 tools (Find products, Find the order, Request a return); memory: Conversation memory
- Return asked? (Code): runs custom JavaScript code
- Asked? (If): checks a condition and branches into true / false
- Check the order again (Execute Sub-workflow): calls another n8n workflow
…plus 16 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (15)
- Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Edit Fields (Set)
n8n-nodes-base.set - Data table
n8n-nodes-base.dataTable - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - Code Tool
@n8n/n8n-nodes-langchain.toolCode - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Chat
@n8n/n8n-nodes-langchain.chat - Execute Sub-workflow
n8n-nodes-base.executeWorkflow - Send Email
n8n-nodes-base.emailSend - Chat Memory Manager
@n8n/n8n-nodes-langchain.memoryManager - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger
From the author
Quick overview This workflow powers a website chat that uses OpenAI to answer product questions, look up order status, and guide visitors through opening return requests, saving confirmed returns to an n8n Data Table and notifying your support team by email.…