Dialogue avec les données : Convertir du texte en requêtes SQL et graphiques de visualisation
Ceci est unEngineering, Product, AIworkflow d'automatisation du domainecontenant 36 nœuds.Utilise principalement des nœuds comme If, Set, Merge, Postgres, ConvertToFile, combinant la technologie d'intelligence artificielle pour une automatisation intelligente. Dialogue avec les données : Convertir le texte en requêtes SQL et graphiques de visualisation
- •Informations de connexion à la base de données PostgreSQL
- •Clé API OpenAI
Nœuds utilisés (36)
{
"id": "mLHcEKvtCu6m9nYi",
"meta": {
"instanceId": "1fc85153dfc4ea22a8172f0d7347fa9f591f71e2064dc331f7bdc1d7ee422e7a",
"templateCredsSetupCompleted": true
},
"name": "Conversing with Data: Transforming Text into SQL Queries and Visual Curves",
"tags": [
{
"id": "xSQPh84nO2kyMj3e",
"name": "Talk to data",
"createdAt": "2025-02-25T10:55:43.575Z",
"updatedAt": "2025-02-25T10:55:43.575Z"
}
],
"nodes": [
{
"id": "5207b91b-5a29-4786-93e2-c7ba4bd1d0f1",
"name": "Mémoire tampon de fenêtre",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
340,
360
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "8571a134-1a79-4858-aa22-82a037a3a5f8",
"name": "Aucune opération, ne rien faire",
"type": "n8n-nodes-base.noOp",
"position": [
1080,
460
],
"parameters": {},
"typeVersion": 1
},
{
"id": "967fd040-bb82-4e97-a979-b1e91ef54b8f",
"name": "Ajouter le nom de la table à la sortie",
"type": "n8n-nodes-base.set",
"position": [
-380,
-60
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "80d47d3e-476e-43fd-a021-609cdad537c8",
"name": "Enregistrer le fichier localement",
"type": "n8n-nodes-base.readWriteFile",
"position": [
-40,
-60
],
"parameters": {},
"typeVersion": 1
},
{
"id": "8e715321-38a3-4ba6-abac-efe2ad54a039",
"name": "Extraire les données du fichier",
"type": "n8n-nodes-base.extractFromFile",
"position": [
-360,
460
],
"parameters": {},
"typeVersion": 1
},
{
"id": "d0f9eb57-2226-4b4a-b7e7-b09074f5c410",
"name": "Déclencheur de chat",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-860,
460
],
"webhookId": "c308dec7-655c-4b79-832e-991bd8ea891f",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "b05e11f0-f957-4067-85fc-35bded780b59",
"name": "Agent IA",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
220,
140
],
"parameters": {},
"typeVersion": 1.6
},
{
"id": "f91029ec-27e5-4f1d-aec8-711ef5a7e0e4",
"name": "Note autocollante",
"type": "n8n-nodes-base.stickyNote",
"position": [
-940,
-340
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "95f41622-0ff4-4841-a83d-265864599f2f",
"name": "Note autocollante 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-200,
-320
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "b12dbb8a-48fe-4627-b209-916191aef4e6",
"name": "Lors du clic sur \"Tester le workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-900,
-60
],
"parameters": {},
"typeVersion": 1
},
{
"id": "3044a292-9596-40dd-96a5-caeed0204630",
"name": "Note autocollante 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-940,
180
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "a6691f03-8688-4844-85be-b4344e9010bf",
"name": "Note autocollante 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
140,
-320
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "002bf810-5408-40a1-a05d-9bdcab64a14c",
"name": "Combiner les données de schéma et l'entrée du chat",
"type": "n8n-nodes-base.set",
"position": [
-120,
460
],
"parameters": {},
"executeOnce": true,
"typeVersion": 3.4
},
{
"id": "64b73d55-e01a-4777-a07c-6fb047d22666",
"name": "Charger le schéma depuis le fichier local",
"type": "n8n-nodes-base.readWriteFile",
"position": [
-620,
460
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c016cffe-669b-418f-818f-cb3692c7dcdb",
"name": "Extraire la requête SQL",
"type": "n8n-nodes-base.set",
"position": [
680,
380
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "3a9d2623-751d-4b62-9fb7-68d5d9c8facf",
"name": "Vérifier si la requête existe",
"type": "n8n-nodes-base.if",
"position": [
840,
380
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "552385b5-1086-419d-b0b8-f7fa2479c13f",
"name": "Note autocollante 4",
"type": "n8n-nodes-base.stickyNote",
"position": [
660,
-60
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "4ea865a5-7988-4563-9d5a-a7f4a4f9c31f",
"name": "Note autocollante 5",
"type": "n8n-nodes-base.stickyNote",
"position": [
660,
-60
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "0a25db4f-cc81-46f1-93cb-9e3d4028516d",
"name": "Note autocollante 7",
"type": "n8n-nodes-base.stickyNote",
"position": [
340,
560
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "66492a65-1553-4286-80ea-d03e631a0995",
"name": "Note autocollante 8",
"type": "n8n-nodes-base.stickyNote",
"position": [
1100,
-40
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "73839265-f77a-4856-b1fb-b2be7f6ebe27",
"name": "Formater les résultats de la requête",
"type": "n8n-nodes-base.set",
"position": [
1180,
180
],
"parameters": {},
"executeOnce": true,
"typeVersion": 3.4
},
{
"id": "e9220e4e-8bdc-48ed-b29b-a2fe124b8b72",
"name": "Préparer la sortie finale",
"type": "n8n-nodes-base.set",
"position": [
2140,
580
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "81a292e1-c5e9-40df-a181-66f767c60215",
"name": "Combiner le résultat de la requête et la réponse du chat",
"type": "n8n-nodes-base.merge",
"position": [
1880,
580
],
"parameters": {},
"typeVersion": 3
},
{
"id": "4a35ebb4-37cb-4a7c-b005-70315c6f684c",
"name": "Lister toutes les tables d'une base de données",
"type": "n8n-nodes-base.postgres",
"position": [
-740,
-60
],
"parameters": {},
"typeVersion": 2.5
},
{
"id": "22da4137-af07-4c03-9c2d-6b8178571ff4",
"name": "Convertir les données en Json",
"type": "n8n-nodes-base.convertToFile",
"position": [
-200,
-60
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "0d7d1e90-224b-4159-8930-4470b140305d",
"name": "Extracteur de schéma",
"type": "n8n-nodes-base.postgres",
"position": [
-560,
-60
],
"parameters": {},
"typeVersion": 2.5
},
{
"id": "ddba033b-aca0-42a0-b553-3edf4d93cd1f",
"name": "Résultat final SQL",
"type": "n8n-nodes-base.postgres",
"position": [
1000,
180
],
"parameters": {},
"typeVersion": 2.5
},
{
"id": "3c2b1a0d-4a50-44b2-ada9-00d3b23b3c61",
"name": "Modifier les champs",
"type": "n8n-nodes-base.set",
"position": [
1440,
180
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "4ad38866-185e-4cd3-b0b0-b1e744d52204",
"name": "Analyseur de sortie structurée",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1900,
420
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "744b6680-310b-4a89-a84c-dc59145fe73f",
"name": "Modifier les champs 1",
"type": "n8n-nodes-base.set",
"position": [
2120,
180
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "196473ba-78c5-412c-8940-121a0e1f28d2",
"name": "Agent de tracé",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1700,
180
],
"parameters": {},
"typeVersion": 1.7
},
{
"id": "9e03e081-0de2-4b8e-bcaa-adc0d2240272",
"name": "deepseek-chat",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1700,
380
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "376d0712-00c4-4132-a429-b36234e75316",
"name": "Deepseek-chat",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
200,
360
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "43d27038-22c0-41ec-b2b5-507c311b23f1",
"name": "Note autocollante 9",
"type": "n8n-nodes-base.stickyNote",
"position": [
1600,
-60
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "c206c591-5826-4285-900a-c082587bfbaa",
"name": "Note autocollante 10",
"type": "n8n-nodes-base.stickyNote",
"position": [
1600,
-40
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "57bbe158-4ddc-4f46-b871-d22735e3f720",
"name": "Note autocollante 11",
"type": "n8n-nodes-base.stickyNote",
"position": [
1260,
580
],
"parameters": {
"content": ""
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "93ee6099-65dc-47bc-ba35-15f2e22b1412",
"connections": {
"b05e11f0-f957-4067-85fc-35bded780b59": {
"main": [
[
{
"node": "c016cffe-669b-418f-818f-cb3692c7dcdb",
"type": "main",
"index": 0
}
]
]
},
"196473ba-78c5-412c-8940-121a0e1f28d2": {
"main": [
[
{
"node": "744b6680-310b-4a89-a84c-dc59145fe73f",
"type": "main",
"index": 0
}
]
]
},
"3c2b1a0d-4a50-44b2-ada9-00d3b23b3c61": {
"main": [
[
{
"node": "196473ba-78c5-412c-8940-121a0e1f28d2",
"type": "main",
"index": 0
}
]
]
},
"d0f9eb57-2226-4b4a-b7e7-b09074f5c410": {
"main": [
[
{
"node": "64b73d55-e01a-4777-a07c-6fb047d22666",
"type": "main",
"index": 0
}
]
]
},
"744b6680-310b-4a89-a84c-dc59145fe73f": {
"main": [
[
{
"node": "81a292e1-c5e9-40df-a181-66f767c60215",
"type": "main",
"index": 2
}
]
]
},
"376d0712-00c4-4132-a429-b36234e75316": {
"ai_languageModel": [
[
{
"node": "b05e11f0-f957-4067-85fc-35bded780b59",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"9e03e081-0de2-4b8e-bcaa-adc0d2240272": {
"ai_languageModel": [
[
{
"node": "196473ba-78c5-412c-8940-121a0e1f28d2",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"ddba033b-aca0-42a0-b553-3edf4d93cd1f": {
"main": [
[
{
"node": "73839265-f77a-4856-b1fb-b2be7f6ebe27",
"type": "main",
"index": 0
}
]
]
},
"0d7d1e90-224b-4159-8930-4470b140305d": {
"main": [
[
{
"node": "967fd040-bb82-4e97-a979-b1e91ef54b8f",
"type": "main",
"index": 0
}
]
]
},
"c016cffe-669b-418f-818f-cb3692c7dcdb": {
"main": [
[
{
"node": "3a9d2623-751d-4b62-9fb7-68d5d9c8facf",
"type": "main",
"index": 0
}
]
]
},
"22da4137-af07-4c03-9c2d-6b8178571ff4": {
"main": [
[
{
"node": "80d47d3e-476e-43fd-a021-609cdad537c8",
"type": "main",
"index": 0
}
]
]
},
"73839265-f77a-4856-b1fb-b2be7f6ebe27": {
"main": [
[
{
"node": "81a292e1-c5e9-40df-a181-66f767c60215",
"type": "main",
"index": 0
},
{
"node": "3c2b1a0d-4a50-44b2-ada9-00d3b23b3c61",
"type": "main",
"index": 0
}
]
]
},
"5207b91b-5a29-4786-93e2-c7ba4bd1d0f1": {
"ai_memory": [
[
{
"node": "b05e11f0-f957-4067-85fc-35bded780b59",
"type": "ai_memory",
"index": 0
}
]
]
},
"3a9d2623-751d-4b62-9fb7-68d5d9c8facf": {
"main": [
[
{
"node": "81a292e1-c5e9-40df-a181-66f767c60215",
"type": "main",
"index": 1
},
{
"node": "ddba033b-aca0-42a0-b553-3edf4d93cd1f",
"type": "main",
"index": 0
}
],
[
{
"node": "8571a134-1a79-4858-aa22-82a037a3a5f8",
"type": "main",
"index": 0
}
]
]
},
"8e715321-38a3-4ba6-abac-efe2ad54a039": {
"main": [
[
{
"node": "002bf810-5408-40a1-a05d-9bdcab64a14c",
"type": "main",
"index": 0
}
]
]
},
"967fd040-bb82-4e97-a979-b1e91ef54b8f": {
"main": [
[
{
"node": "22da4137-af07-4c03-9c2d-6b8178571ff4",
"type": "main",
"index": 0
}
]
]
},
"4ad38866-185e-4cd3-b0b0-b1e744d52204": {
"ai_outputParser": [
[
{
"node": "196473ba-78c5-412c-8940-121a0e1f28d2",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"4a35ebb4-37cb-4a7c-b005-70315c6f684c": {
"main": [
[
{
"node": "0d7d1e90-224b-4159-8930-4470b140305d",
"type": "main",
"index": 0
}
]
]
},
"b12dbb8a-48fe-4627-b209-916191aef4e6": {
"main": [
[
{
"node": "4a35ebb4-37cb-4a7c-b005-70315c6f684c",
"type": "main",
"index": 0
}
]
]
},
"002bf810-5408-40a1-a05d-9bdcab64a14c": {
"main": [
[
{
"node": "b05e11f0-f957-4067-85fc-35bded780b59",
"type": "main",
"index": 0
}
]
]
},
"64b73d55-e01a-4777-a07c-6fb047d22666": {
"main": [
[
{
"node": "8e715321-38a3-4ba6-abac-efe2ad54a039",
"type": "main",
"index": 0
}
]
]
},
"81a292e1-c5e9-40df-a181-66f767c60215": {
"main": [
[
{
"node": "e9220e4e-8bdc-48ed-b29b-a2fe124b8b72",
"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é - Ingénierie, Produit, Intelligence Artificielle
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
hippolyte-hu
@hippolyte-huPartager ce workflow