Chatbot d'assistance IA Telegram (entrée multimodale)

Avancé

Ceci est unSupport Chatbot, AI RAGworkflow d'automatisation du domainecontenant 51 nœuds.Utilise principalement des nœuds comme If, Set, Code, Switch, Telegram. Utiliser GPT-4 et la base de données Supabase RAG pour créer un robot d'assistance multimodal pour Telegram

Prérequis
  • Token Bot Telegram
  • Informations d'identification Google Drive API
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
  • Clé API OpenAI
  • Informations de connexion à la base de données PostgreSQL
  • URL et Clé API Supabase
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "pE6f3n6i6GUmSTgE",
  "meta": {
    "instanceId": "9f0f18185ff67394d162d12e4c08dd0fcafc744c1f810dda24cdefd72c8a1df1",
    "templateCredsSetupCompleted": true
  },
  "name": "Telegram AI Support Chatbot with Multi-Modal Inputs",
  "tags": [
    {
      "id": "Hsf1ZjQwJBHNaX1m",
      "name": "telegram",
      "createdAt": "2025-06-30T13:02:48.515Z",
      "updatedAt": "2025-06-30T13:02:48.515Z"
    },
    {
      "id": "b0xPsiva0fSoITZd",
      "name": "Ai agent",
      "createdAt": "2025-06-30T13:02:48.451Z",
      "updatedAt": "2025-06-30T13:02:48.451Z"
    },
    {
      "id": "fvM6EUbE34rR2wmT",
      "name": "customer support",
      "createdAt": "2025-06-30T13:02:48.420Z",
      "updatedAt": "2025-06-30T13:02:48.420Z"
    },
    {
      "id": "w2QpLU5syMOj79qo",
      "name": "chatbot",
      "createdAt": "2025-06-30T13:02:48.473Z",
      "updatedAt": "2025-06-30T13:02:48.473Z"
    }
  ],
  "nodes": [
    {
      "id": "2bcc338a-d519-42dd-bffd-9b5854b3a456",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        860,
        489.5
      ],
      "webhookId": "5dfaa8fa-e242-4581-9ba4-a8dd27fdb5cd",
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "WCLbjm37GUpYDc78",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ebc22166-b749-42c7-9d91-9fef170c6b65",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3896,
        1156.5
      ],
      "webhookId": "3f88dafc-b70c-4241-9960-d02d8e5c76d4",
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "WCLbjm37GUpYDc78",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "343b5290-d805-4136-a609-b12025df5339",
      "name": "Télécharger l'audio",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2840,
        500
      ],
      "webhookId": "d3e9d36d-6402-45d6-9f56-5886e616f9fa",
      "parameters": {
        "fileId": "={{ $json.message.voice.file_id }}",
        "resource": "file"
      },
      "credentials": {
        "telegramApi": {
          "id": "WCLbjm37GUpYDc78",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8d5bd08c-5b59-4bff-97b1-ffca75262d1b",
      "name": "Traduire en texte",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        3060,
        500
      ],
      "parameters": {
        "options": {},
        "resource": "audio",
        "operation": "translate"
      },
      "credentials": {
        "openAiApi": {
          "id": "SFP1ZJopx1UD494m",
          "name": "n8n free OpenAI API credits"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "3def7806-cf50-4fc8-a2c6-ea966cd0bd4e",
      "name": "Télécharger PDF",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2620,
        1050
      ],
      "webhookId": "c9a95ea8-9864-4bfe-9bc4-36ad917741ec",
      "parameters": {
        "fileId": "={{ $json.message.document.file_id }}",
        "resource": "file"
      },
      "credentials": {
        "telegramApi": {
          "id": "WCLbjm37GUpYDc78",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "29624835-cc63-489f-8913-ece65ecf46f2",
      "name": "Télécharger image",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2180,
        1250
      ],
      "webhookId": "38d23405-f59b-4dbc-a69e-b1101e198908",
      "parameters": {
        "fileId": "={{ $json.message.document.file_id }}",
        "resource": "file"
      },
      "credentials": {
        "telegramApi": {
          "id": "WCLbjm37GUpYDc78",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "11755226-785d-4719-9d75-d82518ed615b",
      "name": "Corriger mimeType",
      "type": "n8n-nodes-base.code",
      "position": [
        2400,
        1250
      ],
      "parameters": {
        "jsCode": "for (const item of items) {\n  if (item.binary && item.binary['data']) {\n    const fileName = item.binary['data'].fileName || '';\n    const lowerName = fileName.toLowerCase();\n\n    if (lowerName.endsWith('.png')) {\n      item.binary['data'].mimeType = 'image/png';\n    } else if (lowerName.endsWith('.jpg') || lowerName.endsWith('.jpeg')) {\n      item.binary['data'].mimeType = 'image/jpeg';\n    } else if (lowerName.endsWith('.webp')) {\n      item.binary['data'].mimeType = 'image/webp';\n    }\n  }\n}\nreturn items;\n\n\n\n\n"
      },
      "typeVersion": 2
    },
    {
      "id": "2d7fe3f6-d152-4b6d-8184-96f1073c73c6",
      "name": "Télécharger photo",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2180,
        700
      ],
      "webhookId": "b4a21f4c-e6a6-4c83-9e8e-af73cb7cc96a",
      "parameters": {
        "fileId": "={{ $json.message.photo[0].file_id }}",
        "resource": "file"
      },
      "credentials": {
        "telegramApi": {
          "id": "WCLbjm37GUpYDc78",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "802f819c-9d11-4720-a63f-0d3bada509bf",
      "name": "Corriger mimeType1",
      "type": "n8n-nodes-base.code",
      "position": [
        2400,
        700
      ],
      "parameters": {
        "jsCode": "for (const item of items) {\n  if (item.binary && item.binary['data']) {\n    const fileName = item.binary['data'].fileName || '';\n    const lowerName = fileName.toLowerCase();\n\n    if (lowerName.endsWith('.png')) {\n      item.binary['data'].mimeType = 'image/png';\n    } else if (lowerName.endsWith('.jpg') || lowerName.endsWith('.jpeg')) {\n      item.binary['data'].mimeType = 'image/jpeg';\n    } else if (lowerName.endsWith('.webp')) {\n      item.binary['data'].mimeType = 'image/webp';\n    } else if (lowerName.endsWith('.gif')) {\n      item.binary['data'].mimeType = 'image/gif';\n    }\n  }\n}\nreturn items;\n\n\n\n/** This is for jpeg. Delete later\nfor (const item of items) {\n  if (item.binary && item.binary['data']) {\n    item.binary['data'].mimeType = 'image/jpeg';\n  }\n}\nreturn items;\n**/\n\n"
      },
      "typeVersion": 2
    },
    {
      "id": "e245a098-08ba-4cf1-a3aa-3134070016ae",
      "name": "Photo en texte",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2620,
        700
      ],
      "parameters": {
        "text": "Describe the contents of this photo/image",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "resource": "image",
        "inputType": "base64",
        "operation": "analyze"
      },
      "credentials": {
        "openAiApi": {
          "id": "SFP1ZJopx1UD494m",
          "name": "n8n free OpenAI API credits"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "74df7c06-f07f-4504-a246-33665d355d70",
      "name": "Si",
      "type": "n8n-nodes-base.if",
      "position": [
        1520,
        1350
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "95deb83e-1d69-46b6-92e3-59e667d698fe",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.is_supported }}",
              "rightValue": ""
            },
            {
              "id": "5d9924b8-b8e7-4640-9675-8123e1562fa8",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.reason }}",
              "rightValue": "supported_file_type"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "531826bd-e8ab-4e56-9f56-4e0dd8847c2f",
      "name": "Télécharger feuille de calcul",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2620,
        1650
      ],
      "webhookId": "fa2ada79-935b-4ea4-9a0c-a452d13c7a0c",
      "parameters": {
        "fileId": "={{ $json.message.document.file_id }}",
        "resource": "file"
      },
      "credentials": {
        "telegramApi": {
          "id": "WCLbjm37GUpYDc78",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "6ffa7f95-c506-40ff-a320-f2b8b35db632",
      "name": "Extraire de PDF",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        2840,
        1050
      ],
      "parameters": {
        "options": {},
        "operation": "pdf"
      },
      "typeVersion": 1
    },
    {
      "id": "795a57de-78c6-44e8-a89b-a45c354988c9",
      "name": "Extraire de feuille de calcul",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        2840,
        1650
      ],
      "parameters": {
        "options": {},
        "operation": "xlsx"
      },
      "typeVersion": 1
    },
    {
      "id": "f567e9a4-e043-4431-b574-b217b4fa2656",
      "name": "En train d'écrire…",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1080,
        379
      ],
      "webhookId": "412793ca-7cad-4a84-acea-98debbbfa2ac",
      "parameters": {
        "chatId": "={{ $json.message.chat.id }}",
        "operation": "sendChatAction"
      },
      "credentials": {
        "telegramApi": {
          "id": "WCLbjm37GUpYDc78",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "67edb91b-880e-4542-88e7-fc7bde727a75",
      "name": "Types de fichiers documents supportés",
      "type": "n8n-nodes-base.code",
      "position": [
        1300,
        1350
      ],
      "parameters": {
        "jsCode": "const supportedExtensions = ['.jpg', '.jpeg', '.png', '.webp', '.pdf', '.doc', '.docx', '.xls', '.xlsx', '.json', '.xml'];\n\nreturn $input.all().map(item => {\n  // Try to extract file name from binary first, else fall back to message.document\n  const fileName = item.binary?.data?.fileName || item.json?.message?.document?.file_name || '';\n  const lowerName = fileName.toLowerCase();\n\n  const isSupported = supportedExtensions.some(ext => lowerName.endsWith(ext));\n\n  if (!isSupported) {\n    return {\n       json: {\n        is_supported: false,\n        reason: \"unsupported_file_type\",\n        message: '❌ The uploaded file type is not supported. Please submit one of the following formats: .jpg, jpeg, .png, .webp, .pdf, .doc, .docx, .xls, .xlsx, .json, .xml',\n        fileName: fileName || 'Unknown file'\n      }\n    };\n  }\n\n  // File is supported – pass it forward untouched\n  return {\n    ...item,\n    json: {\n      ...(item.json || {}),\n      is_supported: true,\n      reason: \"supported_file_type\"\n    }\n  };\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "5c13b643-22c6-49cb-9055-54826f49fd13",
      "name": "Grouper documents similaires",
      "type": "n8n-nodes-base.code",
      "position": [
        1740,
        1550
      ],
      "parameters": {
        "jsCode": "const results = [];\nfor (const item of $input.all()) {\nconst fileName = item.json?.fileName || item.json?.message?.document?.file_name || '';\nconst ext = fileName.toLowerCase().split('.').pop();\n\nlet type = 'unknown';\nif (['jpg', 'jpeg', 'png', 'webp'].includes(ext)) {\ntype = 'image';\n} else if (['pdf'].includes(ext)) {\ntype = 'pdf';\n} else if (['doc', 'docx'].includes(ext)) {\ntype = 'word document';\n} else if (['xls', 'xlsx'].includes(ext)) {\ntype = 'spreadsheet';\n} else if (['json'].includes(ext)) {\ntype = 'json';\n} else if (['xml'].includes(ext)) {\ntype = 'xml file'\n}\nitem.json.fileTypeCategory = type;\nresults.push(item);\n}\nreturn results;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "1923a439-9f1c-4df1-9360-a41250e61931",
      "name": "Routeur de messages d'entrée",
      "type": "n8n-nodes-base.switch",
      "position": [
        1080,
        579
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Text",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "fcb767ee-565e-4b56-a54e-6f97f739fc24",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.message.text }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Audio",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "c1016c40-f8f2-4e08-8ec8-5cdb88f5c87a",
                    "operator": {
                      "type": "object",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.message.voice }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Photo",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "4f28ab72-33ae-45fa-b3ba-51cefe600434",
                    "operator": {
                      "type": "array",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.message.photo }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Document",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "47b17a80-c23f-4b7c-9761-f045715334f4",
                    "operator": {
                      "type": "object",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.message.document }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "510a0800-4323-4372-9f8a-3b3c26d8a455",
      "name": "Routeur de documents",
      "type": "n8n-nodes-base.switch",
      "position": [
        1960,
        1487
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Image",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "b688a3fb-8070-4506-9c9d-526d74c2605b",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.fileTypeCategory }}",
                    "rightValue": "image"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "PDF",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "157a49a2-d5fb-425d-bb23-6ac16bdc45a2",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.fileTypeCategory }}",
                    "rightValue": "pdf"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Word Document",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "41b0d6a4-89a7-4e3b-9e4a-00689def90aa",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.fileTypeCategory }}",
                    "rightValue": "word document"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Spreadsheet",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "478f9497-7fc8-46e9-b834-22c78bbc7b05",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.fileTypeCategory }}",
                    "rightValue": "spreadsheet"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "JSON",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "d90c32c0-9d28-40d1-b11c-4fa9a14b7df5",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.fileTypeCategory }}",
                    "rightValue": "json"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "XML File",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "4d4f7af7-ca8f-4a22-9af1-b3c93f51958f",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.fileTypeCategory }}",
                    "rightValue": "xml file"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "8c04ffbb-9a63-4089-8877-c0c668eeabcc",
      "name": "Télécharger JSON",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2620,
        1850
      ],
      "webhookId": "a364075a-9edc-4624-b867-15710db87e8d",
      "parameters": {
        "fileId": "={{ $json.message.document.file_id }}",
        "resource": "file"
      },
      "credentials": {
        "telegramApi": {
          "id": "WCLbjm37GUpYDc78",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "06a353d1-1ead-4973-aeff-4991ae2ca29f",
      "name": "Extraire de JSON",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        2840,
        1850
      ],
      "parameters": {
        "options": {},
        "operation": "fromJson"
      },
      "typeVersion": 1
    },
    {
      "id": "376ab859-3a6a-4f2d-80da-f0ab8c5149f6",
      "name": "Télécharger XML",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2620,
        2050
      ],
      "webhookId": "db40435f-f201-4156-aa2d-9c5285dabbe4",
      "parameters": {
        "fileId": "={{ $json.message.document.file_id }}",
        "resource": "file"
      },
      "credentials": {
        "telegramApi": {
          "id": "WCLbjm37GUpYDc78",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a4c890b7-d858-42aa-9e60-746ce6b6d17b",
      "name": "Extraire de XML",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        2840,
        2050
      ],
      "parameters": {
        "options": {},
        "operation": "xml"
      },
      "typeVersion": 1
    },
    {
      "id": "d91df63b-926b-43f5-9846-14cdde235b8d",
      "name": "Télécharger document Word",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2180,
        1450
      ],
      "webhookId": "559f8f6c-743e-415a-bdbf-45360dd5f115",
      "parameters": {
        "fileId": "={{ $json.message.document.file_id }}",
        "resource": "file"
      },
      "credentials": {
        "telegramApi": {
          "id": "WCLbjm37GUpYDc78",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8a4fecf9-c50e-44ce-a4ce-c60713805f71",
      "name": "Fichier en Base64",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        2400,
        1450
      ],
      "parameters": {
        "options": {},
        "operation": "binaryToPropery"
      },
      "typeVersion": 1
    },
    {
      "id": "b40a6b1f-0a8e-4788-ae3a-17138cf5918e",
      "name": "Convertir en texte (convertapi.com)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2620,
        1450
      ],
      "parameters": {
        "url": "https://v2.convertapi.com/convert/docx/to/txt",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"Parameters\": [\n        {\n            \"Name\": \"File\",\n            \"FileValue\": {\n                \"Name\": \"{{ $('Download Word Document').item.binary.data.fileName }}\",\n                \"Data\": \"{{ $json.data }}\"\n            }\n        },\n        {\n            \"Name\": \"StoreFile\",\n            \"Value\": true\n        }\n    ]\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY_HERE"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "59fad9e4-dbfc-4f6b-bfad-156b821e78dd",
      "name": "Télécharger texte",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2840,
        1450
      ],
      "parameters": {
        "url": "={{ $json.Files[0].Url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "914ab0ed-f102-4fa3-9db3-cf097b92c0ec",
      "name": "Photo en texte1",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2620,
        1250
      ],
      "parameters": {
        "text": "Describe the content of this image.",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {
          "detail": "auto"
        },
        "resource": "image",
        "inputType": "base64",
        "operation": "analyze"
      },
      "credentials": {
        "openAiApi": {
          "id": "SFP1ZJopx1UD494m",
          "name": "n8n free OpenAI API credits"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "9f4e250c-fb80-4b96-a9c6-d4fd47382985",
      "name": "Note adhésive4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        1280
      ],
      "parameters": {
        "color": 4,
        "width": 620,
        "height": 260,
        "content": "\n\n## Requirement/Credentials\n1. Google drive API Key\n2. Telegram Bot Token. [Guide](https://docs.n8n.io/integrations/builtin/credentials/telegram/?utm_source=n8n_app&utm_medium=credential_settings&utm_campaign=create_new_credentials_modal)\n3. OpenAI API Key.\n4. Supabase API Key + Environment.\n5. ConvertAPI Key.\n6. Cohere API Key\n6. Postgres API Key. Or you can use n8n default simple memory node."
      },
      "typeVersion": 1
    },
    {
      "id": "f38669dd-5f21-4bb6-9f4d-1768e629eb0e",
      "name": "Note adhésive5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        440
      ],
      "parameters": {
        "width": 620,
        "height": 800,
        "content": "## ⚙️ How It Works \n### 🔁 Message Routing\n1. **Telegram Trigger** captures the user message (Text, Image, Voice, Document)\n2. **Message Router** routes input by type using a Switch node\n3. Each type is handled separately:\n     - **Voice** → Translate recording to text (.ogg, .mp3)\n     - **Image** → Analyze image to text.\n     -  **Text** → Sent directly to AI Agent (.txt).\n     - **Document** → Parsed (e.g. .docx to .txt) accordingly.\n\n         #### 📎 Document Type Routing\n         Before routing documents by type, the **Supported  Document File Types** node first checks if the file extension is allowed. If not supported, it exits early with an error message — preventing unnecessary processing.\nSupported documents are then routed using the **Document Router** node, and converted to text for further processing.\n\n         #### Supported Document File Types\n         **.jpg**   **.jpeg**   **.png**   **.webp**   **.pdf**   **.doc**   **.docx**   **.xls**   **.xlsx**   **.json**   **.xml**.\n\n4. The text content is combined with stored memory and embedded knowledge using a **RAG** approach, enabling the AI to respond based on real uploaded data.\n   ### 🧠 RAG via Supabase\n   Uploaded documents are vectorized using OpenAI Embeddings. Embeddings are stored in Supabase with metadata. On new questions, the chatbot:\n   - Extracts question intent\n   - Queries Supabase for semantically similar chunks\n   - Injects them into the prompt for OpenAI. \n   - OpenAI generates a grounded response based on actual document content.\n\n5. Response is sent to the Telegram user with content awareness."
      },
      "typeVersion": 1
    },
    {
      "id": "ca3a50ef-8148-4bb7-810c-a14422791866",
      "name": "Quand on clique sur 'Exécuter le workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        860,
        -160
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5f8a25d8-a8bb-4b01-a7b0-7ad7d58ab0c9",
      "name": "Télécharger fichier",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1080,
        -160
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "list",
          "value": "19mt-vKtgLTvoqhR8TgbN9eSyGIkrrBjqjWfj8EDlZpU",
          "cachedResultUrl": "https://docs.google.com/document/d/19mt-vKtgLTvoqhR8TgbN9eSyGIkrrBjqjWfj8EDlZpU/edit?usp=drivesdk",
          "cachedResultName": "Conor's Cleaning - Knowledge Base Document"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "FVIK3OQQWPOoLCQq",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "3020c220-4e42-4c80-8bc8-7b93bc9a56e6",
      "name": "Chargeur de données par défaut1",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        1420,
        62.5
      ],
      "parameters": {
        "options": {},
        "dataType": "binary",
        "textSplittingMode": "custom"
      },
      "typeVersion": 1.1
    },
    {
      "id": "cc3f97fa-842d-45ae-ac51-6def07bfed1e",
      "name": "Séparateur de texte récursif1",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        1508,
        260
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "c448b82d-7145-4d46-a0e6-f2a01234331f",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        3280,
        1376.5
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "SFP1ZJopx1UD494m",
          "name": "n8n free OpenAI API credits"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5c1f5765-6d8e-429d-80d6-c9b3b15d4525",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1300,
        60
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "SFP1ZJopx1UD494m",
          "name": "n8n free OpenAI API credits"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "0e500c88-38e1-4388-b0ef-116f95cf609c",
      "name": "Embeddings OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        3548,
        1576.5
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "SFP1ZJopx1UD494m",
          "name": "n8n free OpenAI API credits"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "3ecaba71-3c29-42dd-8440-cd5c574241b9",
      "name": "Mémoire de chat Postgres",
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "position": [
        3400,
        1376.5
      ],
      "parameters": {
        "sessionKey": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "sessionIdType": "customKey",
        "contextWindowLength": 3
      },
      "credentials": {
        "postgres": {
          "id": "1uobuv6Ly2ne6tEo",
          "name": "Postgres account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "086a122b-ffa3-43d5-9551-a8a9888c4bba",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        -140
      ],
      "parameters": {
        "color": 3,
        "width": 340,
        "height": 220,
        "content": "## ⚙️ Before using the Telegram chatbot:\nManually run this workflow to import your **Knowledge base** from Google drive into **Supabase** with vector embeddings.\nThis enables the Telegram chatbot to answer your questions based on real content."
      },
      "typeVersion": 1
    },
    {
      "id": "4d151254-2466-4c9b-9099-16f78cdf939f",
      "name": "Reranker Cohere",
      "type": "@n8n/n8n-nodes-langchain.rerankerCohere",
      "position": [
        3668,
        1576.5
      ],
      "parameters": {},
      "credentials": {
        "cohereApi": {
          "id": "I0Z04D8unX86r60W",
          "name": "CohereApi account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "744219e9-66ef-45da-8d7c-a216862aca43",
      "name": "Extraire texte",
      "type": "n8n-nodes-base.set",
      "position": [
        3060,
        300
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "74f774a8-e230-44fe-8d46-7a0ce7f34b42",
              "name": "text",
              "type": "string",
              "value": "={{ $json.message.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "76e0a4d6-8e34-4a87-9809-832c03d22097",
      "name": "Extraire texte et contenu",
      "type": "n8n-nodes-base.set",
      "position": [
        2840,
        700
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "5a6a5c34-c6bf-4d00-bb51-2ec5cd4af9e9",
              "name": "text",
              "type": "string",
              "value": "=Photo content: {{ $json.content }}\n\nPhoto caption: {{ $('Telegram Trigger').item.json.message.caption }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c366d6dc-bcf0-4bf8-952e-e4565e198c3a",
      "name": "Extraire message d'erreur",
      "type": "n8n-nodes-base.set",
      "position": [
        3060,
        850
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "cd3cb375-33a8-479e-b320-6d43e23c906e",
              "name": "text",
              "type": "string",
              "value": "={{ $json.message }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "89aa2812-0952-4ab5-8e3c-63e9ee7b9128",
      "name": "Extraire texte1",
      "type": "n8n-nodes-base.set",
      "position": [
        3060,
        1650
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "35b5e034-cf94-499c-967c-1aeb4edf1b58",
              "name": "text",
              "type": "string",
              "value": "={{ $json }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "5313c3b4-ecc9-47d0-a15d-33b4f7bb1b5b",
      "name": "Extraire texte2",
      "type": "n8n-nodes-base.set",
      "position": [
        3060,
        1850
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "d480f972-a046-4ff1-9d19-ac586c372cbd",
              "name": "text",
              "type": "string",
              "value": "={{ $json }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "676253d8-dc18-4915-9cff-8081bcb33f63",
      "name": "Extraire texte3",
      "type": "n8n-nodes-base.set",
      "position": [
        3060,
        2050
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "f7d3f22b-cca6-4d5d-9e70-b4075e542979",
              "name": "text",
              "type": "string",
              "value": "={{ $json }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c3807fa7-c537-4454-a2ac-baa8996d2808",
      "name": "Extraire texte4",
      "type": "n8n-nodes-base.set",
      "position": [
        3060,
        1050
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "6bb76f62-7f3e-432d-9c96-4c1d1c3e15f1",
              "name": "text",
              "type": "string",
              "value": "={{ $json.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "428f828e-bef8-425a-90dc-b53ef786216e",
      "name": "Extraire texte5",
      "type": "n8n-nodes-base.set",
      "position": [
        3060,
        1450
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "d26a3dd0-8bb2-4f25-9c7d-3542dc039861",
              "name": "text",
              "type": "string",
              "value": "={{ $json.data }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "9fe5eac7-98a4-40d4-8896-5af7ea86a278",
      "name": "Ajouter à Supabase Vector DB",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "position": [
        1316,
        -160
      ],
      "parameters": {
        "mode": "insert",
        "options": {},
        "tableName": {
          "__rl": true,
          "mode": "list",
          "value": "documents",
          "cachedResultName": "documents"
        }
      },
      "credentials": {
        "supabaseApi": {
          "id": "3RkTGbP6tJA6ruj6",
          "name": "Supabase account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "e080e0a0-053a-4648-87cf-ac322b423280",
      "name": "Agent IA de base de connaissances",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3312,
        1156.5
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "options": {
          "systemMessage": ""
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "d5cf1a5a-a84d-491e-922e-ce1628ab08db",
      "name": "Supabase Vector Store Search",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "position": [
        3520,
        1379
      ],
      "parameters": {
        "mode": "retrieve-as-tool",
        "topK": 10,
        "options": {},
        "tableName": {
          "__rl": true,
          "mode": "list",
          "value": "documents",
          "cachedResultName": "documents"
        },
        "useReranker": true,
        "toolDescription": "Retrieve information about Conor’s Cleaning from the Supabase vector store."
      },
      "credentials": {
        "supabaseApi": {
          "id": "3RkTGbP6tJA6ruj6",
          "name": "Supabase account"
        }
      },
      "typeVersion": 1.3
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "2fa6bed8-34b0-43c2-9ac0-6a77a9e60381",
  "connections": {
    "74df7c06-f07f-4504-a246-33665d355d70": {
      "main": [
        [
          {
            "node": "5c13b643-22c6-49cb-9055-54826f49fd13",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "c366d6dc-bcf0-4bf8-952e-e4565e198c3a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ebc22166-b749-42c7-9d91-9fef170c6b65": {
      "main": [
        []
      ]
    },
    "3def7806-cf50-4fc8-a2c6-ea966cd0bd4e": {
      "main": [
        [
          {
            "node": "6ffa7f95-c506-40ff-a320-f2b8b35db632",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "376ab859-3a6a-4f2d-80da-f0ab8c5149f6": {
      "main": [
        [
          {
            "node": "a4c890b7-d858-42aa-9e60-746ce6b6d17b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "744219e9-66ef-45da-8d7c-a216862aca43": {
      "main": [
        [
          {
            "node": "e080e0a0-053a-4648-87cf-ac322b423280",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "11755226-785d-4719-9d75-d82518ed615b": {
      "main": [
        [
          {
            "node": "914ab0ed-f102-4fa3-9db3-cf097b92c0ec",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8c04ffbb-9a63-4089-8877-c0c668eeabcc": {
      "main": [
        [
          {
            "node": "06a353d1-1ead-4973-aeff-4991ae2ca29f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "59fad9e4-dbfc-4f6b-bfad-156b821e78dd": {
      "main": [
        [
          {
            "node": "428f828e-bef8-425a-90dc-b53ef786216e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5f8a25d8-a8bb-4b01-a7b0-7ad7d58ab0c9": {
      "main": [
        [
          {
            "node": "9fe5eac7-98a4-40d4-8896-5af7ea86a278",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "89aa2812-0952-4ab5-8e3c-63e9ee7b9128": {
      "main": [
        [
          {
            "node": "e080e0a0-053a-4648-87cf-ac322b423280",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5313c3b4-ecc9-47d0-a15d-33b4f7bb1b5b": {
      "main": [
        [
          {
            "node": "e080e0a0-053a-4648-87cf-ac322b423280",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "676253d8-dc18-4915-9cff-8081bcb33f63": {
      "main": [
        [
          {
            "node": "e080e0a0-053a-4648-87cf-ac322b423280",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c3807fa7-c537-4454-a2ac-baa8996d2808": {
      "main": [
        [
          {
            "node": "e080e0a0-053a-4648-87cf-ac322b423280",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "428f828e-bef8-425a-90dc-b53ef786216e": {
      "main": [
        [
          {
            "node": "e080e0a0-053a-4648-87cf-ac322b423280",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "802f819c-9d11-4720-a63f-0d3bada509bf": {
      "main": [
        [
          {
            "node": "e245a098-08ba-4cf1-a3aa-3134070016ae",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e245a098-08ba-4cf1-a3aa-3134070016ae": {
      "main": [
        [
          {
            "node": "76e0a4d6-8e34-4a87-9809-832c03d22097",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "343b5290-d805-4136-a609-b12025df5339": {
      "main": [
        [
          {
            "node": "8d5bd08c-5b59-4bff-97b1-ffca75262d1b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "29624835-cc63-489f-8913-ece65ecf46f2": {
      "main": [
        [
          {
            "node": "11755226-785d-4719-9d75-d82518ed615b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2d7fe3f6-d152-4b6d-8184-96f1073c73c6": {
      "main": [
        [
          {
            "node": "802f819c-9d11-4720-a63f-0d3bada509bf",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8a4fecf9-c50e-44ce-a4ce-c60713805f71": {
      "main": [
        [
          {
            "node": "b40a6b1f-0a8e-4788-ae3a-17138cf5918e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "914ab0ed-f102-4fa3-9db3-cf097b92c0ec": {
      "main": [
        [
          {
            "node": "76e0a4d6-8e34-4a87-9809-832c03d22097",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "510a0800-4323-4372-9f8a-3b3c26d8a455": {
      "main": [
        [
          {
            "node": "29624835-cc63-489f-8913-ece65ecf46f2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "3def7806-cf50-4fc8-a2c6-ea966cd0bd4e",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "d91df63b-926b-43f5-9846-14cdde235b8d",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "531826bd-e8ab-4e56-9f56-4e0dd8847c2f",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "8c04ffbb-9a63-4089-8877-c0c668eeabcc",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "376ab859-3a6a-4f2d-80da-f0ab8c5149f6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4d151254-2466-4c9b-9099-16f78cdf939f": {
      "ai_reranker": [
        [
          {
            "node": "d5cf1a5a-a84d-491e-922e-ce1628ab08db",
            "type": "ai_reranker",
            "index": 0
          }
        ]
      ]
    },
    "6ffa7f95-c506-40ff-a320-f2b8b35db632": {
      "main": [
        [
          {
            "node": "c3807fa7-c537-4454-a2ac-baa8996d2808",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a4c890b7-d858-42aa-9e60-746ce6b6d17b": {
      "main": [
        [
          {
            "node": "676253d8-dc18-4915-9cff-8081bcb33f63",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2bcc338a-d519-42dd-bffd-9b5854b3a456": {
      "main": [
        [
          {
            "node": "1923a439-9f1c-4df1-9360-a41250e61931",
            "type": "main",
            "index": 0
          },
          {
            "node": "f567e9a4-e043-4431-b574-b217b4fa2656",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5c1f5765-6d8e-429d-80d6-c9b3b15d4525": {
      "ai_embedding": [
        [
          {
            "node": "9fe5eac7-98a4-40d4-8896-5af7ea86a278",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "06a353d1-1ead-4973-aeff-4991ae2ca29f": {
      "main": [
        [
          {
            "node": "5313c3b4-ecc9-47d0-a15d-33b4f7bb1b5b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8d5bd08c-5b59-4bff-97b1-ffca75262d1b": {
      "main": [
        [
          {
            "node": "e080e0a0-053a-4648-87cf-ac322b423280",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0e500c88-38e1-4388-b0ef-116f95cf609c": {
      "ai_embedding": [
        [
          {
            "node": "d5cf1a5a-a84d-491e-922e-ce1628ab08db",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "c448b82d-7145-4d46-a0e6-f2a01234331f": {
      "ai_languageModel": [
        [
          {
            "node": "e080e0a0-053a-4648-87cf-ac322b423280",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "3020c220-4e42-4c80-8bc8-7b93bc9a56e6": {
      "ai_document": [
        [
          {
            "node": "9fe5eac7-98a4-40d4-8896-5af7ea86a278",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "531826bd-e8ab-4e56-9f56-4e0dd8847c2f": {
      "main": [
        [
          {
            "node": "795a57de-78c6-44e8-a89b-a45c354988c9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1923a439-9f1c-4df1-9360-a41250e61931": {
      "main": [
        [
          {
            "node": "744219e9-66ef-45da-8d7c-a216862aca43",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "343b5290-d805-4136-a609-b12025df5339",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "2d7fe3f6-d152-4b6d-8184-96f1073c73c6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "67edb91b-880e-4542-88e7-fc7bde727a75",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3ecaba71-3c29-42dd-8440-cd5c574241b9": {
      "ai_memory": [
        [
          {
            "node": "e080e0a0-053a-4648-87cf-ac322b423280",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "c366d6dc-bcf0-4bf8-952e-e4565e198c3a": {
      "main": [
        [
          {
            "node": "e080e0a0-053a-4648-87cf-ac322b423280",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d91df63b-926b-43f5-9846-14cdde235b8d": {
      "main": [
        [
          {
            "node": "8a4fecf9-c50e-44ce-a4ce-c60713805f71",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "76e0a4d6-8e34-4a87-9809-832c03d22097": {
      "main": [
        [
          {
            "node": "e080e0a0-053a-4648-87cf-ac322b423280",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5c13b643-22c6-49cb-9055-54826f49fd13": {
      "main": [
        [
          {
            "node": "510a0800-4323-4372-9f8a-3b3c26d8a455",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e080e0a0-053a-4648-87cf-ac322b423280": {
      "main": [
        [
          {
            "node": "ebc22166-b749-42c7-9d91-9fef170c6b65",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "795a57de-78c6-44e8-a89b-a45c354988c9": {
      "main": [
        [
          {
            "node": "89aa2812-0952-4ab5-8e3c-63e9ee7b9128",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d5cf1a5a-a84d-491e-922e-ce1628ab08db": {
      "ai_tool": [
        [
          {
            "node": "e080e0a0-053a-4648-87cf-ac322b423280",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "67edb91b-880e-4542-88e7-fc7bde727a75": {
      "main": [
        [
          {
            "node": "74df7c06-f07f-4504-a246-33665d355d70",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b40a6b1f-0a8e-4788-ae3a-17138cf5918e": {
      "main": [
        [
          {
            "node": "59fad9e4-dbfc-4f6b-bfad-156b821e78dd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cc3f97fa-842d-45ae-ac51-6def07bfed1e": {
      "ai_textSplitter": [
        [
          {
            "node": "3020c220-4e42-4c80-8bc8-7b93bc9a56e6",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "ca3a50ef-8148-4bb7-810c-a14422791866": {
      "main": [
        [
          {
            "node": "5f8a25d8-a8bb-4b01-a7b0-7ad7d58ab0c9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

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 de support, RAG IA

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.

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds51
Catégorie2
Types de nœuds20
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Auteur
Ezema Kingsley Chibuzo

Ezema Kingsley Chibuzo

@kingsley

Automation developer and AI workflow specialist with experience building end-to-end systems using n8n, OpenAI, Supabase, and other modern tools. I help businesses save time and scale operations through smart automation, AI agents, and no-code integrations.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34