RAG、GPT-4o、Telegram を使用した 顧客サポートおよびリード獲得チャットボット
中級
これはSupport Chatbot分野の自動化ワークフローで、14個のノードを含みます。主にTelegramTool, Agent, GoogleSheetsTool, ChatTrigger, LmChatOpenAiなどのノードを使用。 RAG、GPT-4o、Sheets、Telegramを使用したカスタマーサポートおよびリード獲得チャットボット
前提条件
- •Telegram Bot Token
- •Google Sheets API認証情報
- •OpenAI API Key
- •Pinecone API Key
使用ノード (14)
カテゴリー
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"id": "gH7TgPzRzkONOivn",
"meta": {
"instanceId": "a244e08ca65e768d1cee097a486ef066f1968b077e055f21a34efe4e78c40e76",
"templateCredsSetupCompleted": true
},
"name": "Customer Support & Lead Collection Chatbot with RAG, GPT-4o & Telegram",
"tags": [
{
"id": "AOZlNztgqiOQKd6j",
"name": "n8n Creators",
"createdAt": "2025-09-28T11:02:15.227Z",
"updatedAt": "2025-09-28T11:02:15.227Z"
}
],
"nodes": [
{
"id": "0cd4236d-fa91-405f-bbd9-a816098202f5",
"name": "チャットメッセージ受信時",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
0,
0
],
"webhookId": "73cc5ea3-7518-488b-955e-df5e78ee12b3",
"parameters": {
"options": {}
},
"typeVersion": 1.3
},
{
"id": "da8b3e29-20c2-4f16-a01e-b7ae45bb0efa",
"name": "AIエージェント",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
384,
0
],
"parameters": {
"options": {
"systemMessage": "=## Role:\nYou are a friendly assistant for a company named **[INSERT_YOUR_COMPANY_NAME_HERE]**.\n\n## Task:\nYou answer questions about the business.\n\n## Details:\nYou have access to various tools, which you use correctly.\n\n## Tools:\n- **Company Q&A** \n Use this tool to answer questions with knowledge about the company.\n\n- **Google Sheets Agentic Tool** \n Use this tool to store contact information such as name, email, interested in and phone number.\n\n- **Telegram Agentic Tool**\n Use this tool to send a notification with the user's contact information and a summary of the conversation.\n\nAfter a customer asks about opening hours, products, location, or business information, ask them for their name, email, specific interests and phone number."
}
},
"typeVersion": 2.2
},
{
"id": "33f3d156-d41d-44e2-af46-d29cb9fe7832",
"name": "会話メモリ",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
368,
224
],
"parameters": {
"contextWindowLength": 12
},
"typeVersion": 1.3
},
{
"id": "d205da7f-7acc-4709-9878-331a70218ce7",
"name": "企業Q&A",
"type": "@n8n/n8n-nodes-langchain.toolVectorStore",
"position": [
432,
400
],
"parameters": {
"description": "Gives answers related to the company."
},
"typeVersion": 1.1
},
{
"id": "ab524ffa-cce1-4dee-938e-fbdee31b353c",
"name": "Pineconeベクトルストア(企業ナレッジベース)",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
384,
560
],
"parameters": {
"options": {
"pineconeNamespace": "Q&A"
},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "company",
"cachedResultName": "company"
}
},
"credentials": {
"pineconeApi": {
"id": "lJsLCGEJnS6Ij994",
"name": "PineconeApi account"
}
},
"typeVersion": 1.3
},
{
"id": "28bd6bd0-bedc-47a0-b345-a18f7d2e7831",
"name": "埋め込み生成(OpenAI)",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
464,
704
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "1rHbxq7xrWlOZ6zj",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "98dcb3ff-693a-47d3-9031-502dfe49becf",
"name": "トリガー - 公開方法",
"type": "n8n-nodes-base.stickyNote",
"position": [
-96,
-144
],
"parameters": {
"width": 256,
"height": 304,
"content": "## Trigger\n\nYou can switch to Publicly Available to be able to share this chatbot interface with a link. \n"
},
"typeVersion": 1
},
{
"id": "55791e26-65d8-4af8-ad8b-d321044583de",
"name": "AIエージェント - フロー",
"type": "n8n-nodes-base.stickyNote",
"position": [
176,
-240
],
"parameters": {
"width": 736,
"height": 608,
"content": "## AI Agent\n\nPowered with OpenAI API (GPT-4o) -- you can replace it with your favourite LLM.\n\nThe agent, after providing information requested by the user, asks for contact information and stores it in Google Sheets. \n\nThen sends a notification to Telegram with the contact information and a summary of the conversation.\n\n"
},
"typeVersion": 1
},
{
"id": "d71bbe39-776a-465d-a463-84d6fcaa6f70",
"name": "RAGデータベース - セットアップ",
"type": "n8n-nodes-base.stickyNote",
"position": [
256,
384
],
"parameters": {
"width": 656,
"height": 592,
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## RAG Database\n\nConnect a Pinecone RAG database with knowledge about your company. An OpenAI text-embedding-3-small model handles data retrieval.\n"
},
"typeVersion": 1
},
{
"id": "f9e798e4-771f-47f6-8fc6-87379e5c388c",
"name": "リードをTelegramへ送信",
"type": "n8n-nodes-base.telegramTool",
"position": [
624,
224
],
"webhookId": "3d40f03b-9560-4c2a-b64d-bca5736f148b",
"parameters": {
"text": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Text', ``, 'string') }}",
"chatId": "[INSERT_YOUR_CHAT_ID]",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "xV3Qf8JA7DE2hn9V",
"name": "Telegram test"
}
},
"typeVersion": 1.2
},
{
"id": "f045418b-84c6-4476-8a06-0538fe7eb191",
"name": "リードをGoogleシートに保存",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
768,
224
],
"parameters": {
"columns": {
"value": {
"Name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Name', ``, 'string') }}",
"Email": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Email', ``, 'string') }}",
"Phone": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Phone', ``, 'string') }}",
"Interested in": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Interested_in', ``, 'string') }}"
},
"schema": [
{
"id": "Name",
"type": "string",
"display": true,
"required": false,
"displayName": "Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Phone",
"type": "string",
"display": true,
"required": false,
"displayName": "Phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email",
"type": "string",
"display": true,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Interested in",
"type": "string",
"display": true,
"required": false,
"displayName": "Interested in",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ccKn1a35BDW3Vqe6cCjoiWlDTl5XIY48PUFYUREVZeM/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ccKn1a35BDW3Vqe6cCjoiWlDTl5XIY48PUFYUREVZeM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ccKn1a35BDW3Vqe6cCjoiWlDTl5XIY48PUFYUREVZeM/edit?usp=drivesdk",
"cachedResultName": "NovaCore Solutions Leads"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "3CWHe6cifmQtahz8",
"name": "SmartCamp.AI Google Sheets"
}
},
"typeVersion": 4.7
},
{
"id": "c08fa915-6a60-453b-a663-058c92c1355f",
"name": "企業応答モデル",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
672,
608
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "1rHbxq7xrWlOZ6zj",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "54007e6f-bf76-4811-950e-b2bd316d75c1",
"name": "メインチャットモデル",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
224,
224
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "1rHbxq7xrWlOZ6zj",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "guide-sticky-001",
"name": "テンプレートガイド",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
-160
],
"parameters": {
"width": 736,
"height": 736,
"content": "## Template Guide (Overview, Prerequisites & Customization)\n\n**What it does:** This workflow delivers a production-ready customer support and lead collection chatbot.\nIt answers company questions using Retrieval-Augmented Generation (RAG) and then captures lead details\n(name, email, phone, interest) to Google Sheets, while instantly notifying your team on Telegram with a\nshort summary of the conversation.\n\n**Target audience:** SMBs, startups, agencies and internal teams that want a 24/7 assistant which reduces\nrepetitive Q&A, improves response time and centralizes leads for follow-up.\n\n**How it works (high level):**\n1) A visitor sends a message to the chat interface (Trigger).\n2) The **Main Chat Model (GPT‑4o)** manages the conversation and tool usage.\n3) For company facts, the agent calls **Company Q&A**, which performs RAG over your **Pinecone Vector Store**.\n4) After answering, the agent politely asks for **Name / Email / Phone / Interested in**.\n5) The lead is appended to **Google Sheets** and your team receives a Telegram notification.\n6) **Conversation Memory** keeps short-term context for a smoother chat experience.\n\n**Prerequisites:**\n- OpenAI API key (GPT‑4o + text-embedding-3‑small for retrieval)\n- Pinecone project/index with your company knowledge (FAQs, docs, pricing, policies)\n- Google account with a Sheet for storing leads (columns: Name, Email, Phone, Interested in)\n- Telegram Bot Token and chat/group ID for notifications\n\n**Customization:**\n- Replace `[INSERT_YOUR_COMPANY_NAME_HERE]` in the Agent’s system message.\n- Point the Pinecone node to your index/namespace.\n- Update the Google Sheets node to your Sheet ID and tab.\n- Set your Telegram `chatId`.\n- Adjust the **context window** and **prompt tone** to match your brand.\n\n**Notes & tips:**\n- Keep your knowledge base concise and up to date to improve RAG accuracy.\n- Use validation in Sheets (optional) to ensure clean lead data.\n- Consider adding duplicate checks, CRM sync, or email follow-ups as next steps."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "d216f344-bdc5-4b44-916f-8eaec439de1f",
"connections": {
"da8b3e29-20c2-4f16-a01e-b7ae45bb0efa": {
"main": [
[]
]
},
"d205da7f-7acc-4709-9878-331a70218ce7": {
"ai_tool": [
[
{
"node": "da8b3e29-20c2-4f16-a01e-b7ae45bb0efa",
"type": "ai_tool",
"index": 0
}
]
]
},
"54007e6f-bf76-4811-950e-b2bd316d75c1": {
"ai_languageModel": [
[
{
"node": "da8b3e29-20c2-4f16-a01e-b7ae45bb0efa",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"33f3d156-d41d-44e2-af46-d29cb9fe7832": {
"ai_memory": [
[
{
"node": "da8b3e29-20c2-4f16-a01e-b7ae45bb0efa",
"type": "ai_memory",
"index": 0
}
]
]
},
"f9e798e4-771f-47f6-8fc6-87379e5c388c": {
"ai_tool": [
[
{
"node": "da8b3e29-20c2-4f16-a01e-b7ae45bb0efa",
"type": "ai_tool",
"index": 0
}
]
]
},
"c08fa915-6a60-453b-a663-058c92c1355f": {
"ai_languageModel": [
[
{
"node": "d205da7f-7acc-4709-9878-331a70218ce7",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"f045418b-84c6-4476-8a06-0538fe7eb191": {
"ai_tool": [
[
{
"node": "da8b3e29-20c2-4f16-a01e-b7ae45bb0efa",
"type": "ai_tool",
"index": 0
}
]
]
},
"0cd4236d-fa91-405f-bbd9-a816098202f5": {
"main": [
[
{
"node": "da8b3e29-20c2-4f16-a01e-b7ae45bb0efa",
"type": "main",
"index": 0
}
]
]
},
"28bd6bd0-bedc-47a0-b345-a18f7d2e7831": {
"ai_embedding": [
[
{
"node": "ab524ffa-cce1-4dee-938e-fbdee31b353c",
"type": "ai_embedding",
"index": 0
}
]
]
},
"ab524ffa-cce1-4dee-938e-fbdee31b353c": {
"ai_vectorStore": [
[
{
"node": "d205da7f-7acc-4709-9878-331a70218ce7",
"type": "ai_vectorStore",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
中級 - サポートチャットボット
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
AIベースのWhatsAppサポートボット(Googleスプレッドシートでのチケット作成)
AIベースのWhatsAppサポートボット(Google シートチケット作成)
Set
Xml
Code
+
Set
Xml
Code
35 ノードZain Khan
サポートチャットボット
AIチャットボットによるリード獲得と業務への質問応答
GPT-4o、Pinecone、および Google Sheets を基にした自動化されたリードキャプチャとビジネス関連 Q&A
Google Drive
Agent
Google Sheets Tool
+
Google Drive
Agent
Google Sheets Tool
17 ノードBelgacem Dhiflaoui
リードナーチャリング
n8nノードの探索(可視化リファレンスライブラリ内)
n8nノードを可視化リファレンスライブラリで探索
If
Ftp
Set
+
If
Ftp
Set
113 ノードI versus AI
その他
基于AIのMISエージェント
基于AIの管理信息系统エージェント
If
Set
Code
+
If
Set
Code
129 ノードKumar Shivam
サポート
RAG(PineconeとOpenAI)を使ってGitHub OpenAPI仕様と会話する
GitHub APIドキュメントと対話:PineconeとOpenAIを使用したRAGベースのチャットボット
Http Request
Manual Trigger
Agent
+
Http Request
Manual Trigger
Agent
17 ノードMihai Farcas
エンジニアリング
あなたのDriveフォルダーでRAG対话
GPT、Pinecone、RAGを使ってGoogle Driveドキュメントと対話
Google Drive
Agent
Google Drive Trigger
+
Google Drive
Agent
Google Drive Trigger
20 ノードMarko
AI RAG検索拡張