Créer un chatbot d'analyse de données GPT-4 pour l'analyse en temps réel des feuilles de calcul Google
Ceci est unAI Chatbot, Multimodal AIworkflow d'automatisation du domainecontenant 17 nœuds.Utilise principalement des nœuds comme Merge, Aggregate, GoogleSheets, Agent, ChatTrigger. Créer un chatbot d'analyse de données GPT-4 pour une analyse en temps réel des Google Sheets
- •Informations d'identification Google Sheets API
- •Clé API OpenAI
Nœuds utilisés (17)
Catégorie
{
"meta": {
"instanceId": "d1786ab0d745a7498abf13a9c2cdabb1374c006e889b79eef64ce0386b8f8a41",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "c2a31cd3-1cb9-4268-b587-cf5f0462e4a4",
"name": "Modèle de chat OpenAI",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
960,
600
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-5",
"cachedResultName": "gpt-5"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "MGwGMKEkdcjzlYCw",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "6253a41e-be2d-4938-8658-1798f76282b7",
"name": "À la réception du message",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-200,
400
],
"webhookId": "e4a9a147-7a38-4027-b869-bdb13a89dc30",
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "b5db715e-c2a9-46af-a544-6ccf32f3cd11",
"name": "Fusionner",
"type": "n8n-nodes-base.merge",
"position": [
720,
400
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition",
"numberInputs": 3
},
"typeVersion": 3.1
},
{
"id": "c7317d56-e218-4544-b0fa-787280ea6ff3",
"name": "Simple Mémoire",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1120,
600
],
"parameters": {
"sessionKey": "={{ $('When chat message received').item.json.sessionId }}",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "0938975c-2dad-41a8-ae91-b61f7bea50b7",
"name": "Data Analyst Agent IA",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
960,
400
],
"parameters": {
"text": "=User Input:\n{{ $('When chat message received').item.json.chatInput }}",
"options": {
"systemMessage": "=You are a helpful AI Data Analyst. \nUse the provided JSON data to analyze and answer questions. \n\nProducts: \n{{ $json.products.map(item => item).toJsonString() }} \n\nCustomers: \n{{ $json.customers.map(item => item).toJsonString() }} \n\nOrders: \n{{ $json.orders.map(item => item).toJsonString() }} \n\nAlways use the data above when performing analysis. \n"
},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "96c91c7f-9111-43fc-b56d-2811ba18fdc9",
"name": "Google Sheets - Get Products Data",
"type": "n8n-nodes-base.googleSheets",
"position": [
160,
200
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Products"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/13QGuASZJE2MtpTvX83OUCz_dn-WRy4DggWLy5HjBvJk/edit?gid=1076558389#gid=1076558389"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "ypmzFxQFfAacuVVC",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "f6594bb6-8b89-41cc-8e72-8a970af4c982",
"name": "Google Sheets - Get Customers Data",
"type": "n8n-nodes-base.googleSheets",
"position": [
160,
400
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Customers"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/13QGuASZJE2MtpTvX83OUCz_dn-WRy4DggWLy5HjBvJk/edit?gid=1076558389#gid=1076558389"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "ypmzFxQFfAacuVVC",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "36deeb5c-7e7e-4ee2-b0a2-97e8c4b33c9a",
"name": "Google Sheets - Get Orders Data",
"type": "n8n-nodes-base.googleSheets",
"position": [
160,
620
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Orders"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/13QGuASZJE2MtpTvX83OUCz_dn-WRy4DggWLy5HjBvJk/edit?gid=1076558389#gid=1076558389"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "ypmzFxQFfAacuVVC",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "67ddb3e6-dacb-413c-afc4-832b6c6a2c53",
"name": "Agréger Data 1",
"type": "n8n-nodes-base.aggregate",
"position": [
400,
200
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData",
"destinationFieldName": "products"
},
"typeVersion": 1
},
{
"id": "847c0e0b-e519-4eaf-be0a-992d8f02cb18",
"name": "Agréger Data 2",
"type": "n8n-nodes-base.aggregate",
"position": [
400,
400
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData",
"destinationFieldName": "customers"
},
"typeVersion": 1
},
{
"id": "e72588a6-eac5-4015-a302-ff0a96747a71",
"name": "Agréger Data 3",
"type": "n8n-nodes-base.aggregate",
"position": [
400,
640
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData",
"destinationFieldName": "orders"
},
"typeVersion": 1
},
{
"id": "ca4b8f48-338c-480e-b0ca-f424044c50f3",
"name": "Note adhésive",
"type": "n8n-nodes-base.stickyNote",
"position": [
60,
-40
],
"parameters": {
"color": 4,
"width": 300,
"height": 860,
"content": "## Google Sheet - Get Data \nUpdate the document URL \nUpdate the sheet name \nAdjust the number of Google Sheets nodes based on your use case \n"
},
"typeVersion": 1
},
{
"id": "af0947bb-3e99-4eac-8186-32a506581366",
"name": "Note adhésive1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-780,
140
],
"parameters": {
"color": 4,
"width": 520,
"height": 300,
"content": "Workflow Configurations: \n- Update the Google Sheets document ID in all Google Sheets nodes to point to your data source based on your use case \n- Example Google Sheets template you can copy: https://docs.google.com/spreadsheets/d/1-QTFO3TbGFjtYOMUfZb0aY66J_8G-R0Rb0JHLWrEZ90/edit?gid=0#gid=0 \n- Configure the sheet names to match your Google Sheets structure \n- Adjust the AI Agent system message to reflect your specific data schema and analysis requirements \n- Customize the chat trigger webhook ID for your specific implementation \n"
},
"typeVersion": 1
},
{
"id": "31d2d863-2087-4de6-b7d7-b845b44e40ef",
"name": "Note adhésive2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-800,
860
],
"parameters": {
"color": 4,
"width": 880,
"height": 320,
"content": "## 🤖 Build a Smart AI Data Analyst Chatbot with Google Sheet and GPT-5\n\nWhat This Template Does:\n\n- Creates an intelligent chatbot that can analyze data from Google Sheets in real time \n- Fetches live data from all Google Sheets whenever a chat message is received \n- Uses OpenAI's model to provide intelligent data analysis and insights \n- Maintains conversation memory to provide context-aware responses across chat sessions \n- Combines multiple data sources to provide comprehensive business intelligence answers \n"
},
"typeVersion": 1
},
{
"id": "39c68ef9-71c2-45a1-99e3-b88576d16c45",
"name": "Note adhésive3",
"type": "n8n-nodes-base.stickyNote",
"position": [
140,
860
],
"parameters": {
"color": 4,
"width": 820,
"height": 420,
"content": "## 📋 WORKFLOW PROCESS OVERVIEW\n\nStep 1: 💬 Chat Trigger receives incoming chat messages with session ID tracking \nStep 2: 📊 Data Retrieval (Parallel Processing) \nStep 3: 🔄 Data Aggregation combines data from all sources \nStep 4: 🤝 Merge Node combines all aggregated data streams into a single data object \nStep 5: 🧠 AI Analysis processes user input using: \n - OpenAI Model for intelligent responses \n - Simple Memory maintains conversation context using session ID \n - Data Analyst AI Agent analyzes the combined data and generates insights based on user queries \nStep 6: 📤 Response delivers analytical insights, charts, summaries, or answers back to the chat interface \n"
},
"typeVersion": 1
},
{
"id": "1ef90da5-29e6-4b21-9045-3db6d4bb7f78",
"name": "Note adhésive4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1400,
120
],
"parameters": {
"color": 4,
"width": 380,
"height": 760,
"content": "# 👋 Hi, I’m Billy\n\nI help businesses build **n8n workflows** & **AI automation projects**. \nNeed help with n8n or AI Automation projects? \nContact me and let’s build your automation together.\n\n📩 **Email:** billychartanto@gmail.com \n🤝 **n8n Creator:** [n8n.io/creators/billy](https://n8n.io/creators/billy/)\n🌐 **My n8n Projects:** [billychristi.com/n8n](https://www.billychristi.com/n8n) \n\n\n\n---\n💡 Feel free to get in touch if you’d like help on your next automation project or if you have any feedback or thoughts to share.\n"
},
"typeVersion": 1
},
{
"id": "27d66d12-5a60-45c8-a175-03fdea4db01d",
"name": "Note adhésive5",
"type": "n8n-nodes-base.stickyNote",
"position": [
860,
200
],
"parameters": {
"color": 4,
"width": 460,
"height": 640,
"content": "## Data Analyst AI Agent \nThis is where all data is processed based on user input \n\nConfiguration: \nUpdate the system message prompt data sources based on your use case \n"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Merge": {
"main": [
[
{
"node": "Data Analyst AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "Data Analyst AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Aggregate Data 1": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Aggregate Data 2": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Aggregate Data 3": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 2
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Data Analyst AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "36deeb5c-7e7e-4ee2-b0a2-97e8c4b33c9a",
"type": "main",
"index": 0
},
{
"node": "96c91c7f-9111-43fc-b56d-2811ba18fdc9",
"type": "main",
"index": 0
},
{
"node": "f6594bb6-8b89-41cc-8e72-8a970af4c982",
"type": "main",
"index": 0
}
]
]
},
"36deeb5c-7e7e-4ee2-b0a2-97e8c4b33c9a": {
"main": [
[
{
"node": "Aggregate Data 3",
"type": "main",
"index": 0
}
]
]
},
"96c91c7f-9111-43fc-b56d-2811ba18fdc9": {
"main": [
[
{
"node": "Aggregate Data 1",
"type": "main",
"index": 0
}
]
]
},
"f6594bb6-8b89-41cc-8e72-8a970af4c982": {
"main": [
[
{
"node": "Aggregate Data 2",
"type": "main",
"index": 0
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Avancé - Chatbot IA, IA Multimodale
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
Billy Christi
@billyI build scalable automation systems with n8n to help businesses save time and cut costs. 💼 n8n expert available for new projects 📩 billychartanto@gmail.com
Partager ce workflow