The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "Website Live Chat AI",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "live-chat",
"responseMode": "responseNode",
"options": {
"allowedOrigins": "*"
}
},
"id": "d4e5f6a7-4444-4000-8000-000000000001",
"name": "Chat Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
240,
300
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "set-msg",
"name": "userMessage",
"value": "={{ $json.body.message }}",
"type": "string"
},
{
"id": "set-session",
"name": "sessionId",
"value": "={{ $json.body.sessionId || 'anonymous-' + Date.now() }}",
"type": "string"
},
{
"id": "set-page",
"name": "currentPage",
"value": "={{ $json.body.pageUrl || 'unknown' }}",
"type": "string"
}
]
},
"options": {}
},
"id": "d4e5f6a7-4444-4000-8000-000000000002",
"name": "Parse Chat Input",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
460,
300
]
},
{
"parameters": {
"resource": "chat",
"operation": "message",
"model": "gpt-4o",
"messages": {
"values": [
{
"role": "system",
"content": "You are a live chat support agent for a website. Be helpful, professional, and concise. The user is currently on page: {{ $json.currentPage }}. If you cannot answer a question, offer to connect them with a human agent. Format responses in plain text suitable for a chat widget. Keep responses under 200 words."
},
{
"role": "user",
"content": "={{ $json.userMessage }}"
}
]
},
"options": {
"temperature": 0.6,
"maxTokens": 500
}
},
"id": "d4e5f6a7-4444-4000-8000-000000000003",
"name": "OpenAI Chat Response",
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.6,
"position": [
680,
300
],
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ JSON.stringify({ reply: $json.message.content, sessionId: $('Parse Chat Input').item.json.sessionId, timestamp: new Date().toISOString() }) }}",
"options": {
"responseCode": 200,
"responseHeaders": {
"entries": [
{
"name": "Access-Control-Allow-Origin",
"value": "*"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
}
}
},
"id": "d4e5f6a7-4444-4000-8000-000000000004",
"name": "Respond to Chat",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
900,
300
]
}
],
"connections": {
"Chat Webhook": {
"main": [
[
{
"node": "Parse Chat Input",
"type": "main",
"index": 0
}
]
]
},
"Parse Chat Input": {
"main": [
[
{
"node": "OpenAI Chat Response",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Response": {
"main": [
[
{
"node": "Respond to Chat",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
openAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Website Live Chat AI. Uses openAi. Webhook trigger; 4 nodes.
Source: https://github.com/mlnjsh/n8n-workflows-mega/blob/main/workflows/ai-chatbots/04-website-live-chat-ai.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Text Automations Using Apple Shortcuts. Uses stickyNote, respondToWebhook, openAi. Webhook trigger; 10 nodes.
The Recap AI - Lovable Calorie App Backend. Uses openAi, chainLlm, lmChatOpenAi, outputParserStructured. Webhook trigger; 8 nodes.
Main: Submit Assignment. Uses readBinaryFile, httpRequest, openAi. Webhook trigger; 22 nodes.
Contact-Us. Uses emailSend, httpRequest, nocoDb, openAi. Webhook trigger; 7 nodes.
PDF Q&A System with Pinecone RAG. Uses openAi, httpRequest. Webhook trigger; 7 nodes.