あなたの最初の対話型AIチャットボットエージェントを構築

中級

これは自動化ワークフローで、15個のノードを含みます。主にCrypto, Telegram, GoogleSheets, GoogleDocsTool, Agentなどのノードを使用。 あなたの First AI アジェントを作成する

前提条件
  • Telegram Bot Token
  • Google Sheets API認証情報
  • ターゲットAPIの認証情報が必要な場合あり
  • Google Gemini API Key

カテゴリー

-
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "xh1yv1lvCFV3sHhH",
  "meta": {
    "instanceId": "cb9a1e5321767b6316634728341237e564b2587ab15b74ca0a89eb02a53484d6",
    "templateCredsSetupCompleted": true
  },
  "name": "Build Your First Conversational AI Chatbot Agent",
  "tags": [],
  "nodes": [
    {
      "id": "c5a03f02-86fa-42d4-83fd-7966b49f56ff",
      "name": "AIエージェント",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        0,
        0
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2.1
    },
    {
      "id": "5334a310-007f-43a7-9f85-f26c7928f5fd",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1472,
        -32
      ],
      "parameters": {
        "width": 1072,
        "height": 1392,
        "content": "# Overview\n\nThis **n8n** workflow listens for incoming chat messages, uses **Google Gemini (PaLM)** via **LangChain** to process or reply, optionally reads a **Google Docs** file if mentioned, and logs both the user input and the AI-generated response into a **Google Sheet**.\n\n## Features\n- Triggered when a chat message is received\n- Uses Google Gemini (PaLM/Gemini Pro) via LangChain Agent\n- Optionally processes a Google Docs document\n- Logs both user and AI messages in a Google Sheet\n- Modular design – easy to customize\n\n## ✅ Requirements\n\n### Tools & Services Needed\n- `n8n` instance (self-hosted or n8n.cloud)\n- Google Gemini API (PaLM or Gemini Pro)\n- Google Sheets and Google Docs access\n- OAuth2 credentials for Google APIs configured in n8n\n\n\n## 🚀 How to Use This Workflow\n### 1. Configure Webhook Chat Trigger\n**Node:** `When chat message received`\n- Connect your chat system (e.g., Telegram, Slack)\n- This node captures the user input message\n\n### 2. (Optional) Handle Google Docs Input\n\n**Node:** `Get a document in Google Docs`\n- If the user's message includes a link or ID of a Google Doc, this node retrieves and simplifies it\n- The LangChain Agent can call this automatically when it detects a document reference\n\n### 3. Generate AI Response\n\n**Node:** `Google Gemini Chat Model`\n- LangChain routes message through the Gemini model\n- It generates a smart, contextual response, optionally using tools (e.g., Docs reader)\n\n\n### 4. Log Conversation in Google Sheet\n\n**Node:** `Append row in sheet`\n- Automatically appends:\n- Timestamp\n- User's message\n- AI's response\n\n## 🙋 For Help & Community\n\n- 🌐 Website: [devcodejourney.com](https://devcodejourney.com)\n- 🔗 LinkedIn: [Connect with Shakil](https://www.linkedin.com/in/shakilpg/)\n- 📱 WhatsApp Channel: [Join Now](https://whatsapp.com/channel/0029Vb5l6JuDTkK5BRORNn0B)\n- 💬 Direct Chat: [Message Now](https://wa.me/8801316320957)\n\n\n> Happy Building with 🛠️ **n8n + Gemini + Google Sheets**! 🚀"
      },
      "typeVersion": 1
    },
    {
      "id": "092b6a15-91e6-4ee9-8be7-fc45d3fd7d0c",
      "name": "Gemini",
      "type": "@n8n/n8n-nodes-langchain.googleGeminiTool",
      "position": [
        144,
        272
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemini-2.5-flash",
          "cachedResultName": "models/gemini-2.5-flash"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "model",
              "content": "Give me user user-friendly reply. Don't give me a robotic type relay."
            }
          ]
        }
      },
      "credentials": {
        "googlePalmApi": {
          "id": "jwzRcxc2F7GPOYnY",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ffb50b58-3388-4504-b711-bf1b5c12bdbf",
      "name": "Docs",
      "type": "n8n-nodes-base.googleDocsTool",
      "position": [
        272,
        272
      ],
      "parameters": {
        "simple": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Simplify', ``, 'boolean') }}",
        "operation": "get",
        "documentURL": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Doc_ID_or_URL', ``, 'string') }}"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "id": "upoYuIvIHPZfgxay",
          "name": "Google Docs account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "b0f6e69c-c23b-4a6d-add0-5f7f181c0174",
      "name": "Request",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        32,
        272
      ],
      "parameters": {
        "url": "https://google.cm/",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "32a851d3-2e78-4be9-907d-81a6303399b0",
      "name": "Gemini Chat",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -160,
        272
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "jwzRcxc2F7GPOYnY",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "87a16b40-ae21-48b1-b1a5-1017c67f9a10",
      "name": "スプレッドシートに保存",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        608,
        80
      ],
      "parameters": {
        "columns": {
          "value": {
            "replay message": "={{ $json.output }}",
            "output data (Crypto)": "={{ $json.data }}"
          },
          "schema": [
            {
              "id": "replay message",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "replay message",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "output data (Crypto)",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "output data (Crypto)",
              "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/1IPjHgpBYSOeEgdfDk3DQxRrHPb1jUNNV9yIhkf7tWnQ/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1IPjHgpBYSOeEgdfDk3DQxRrHPb1jUNNV9yIhkf7tWnQ",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1IPjHgpBYSOeEgdfDk3DQxRrHPb1jUNNV9yIhkf7tWnQ/edit?usp=drivesdk",
          "cachedResultName": "Build a Personal Chatbot with Google Gemini & Auto Store Chats in Google Sheets"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "gFH3Wjq6yYqSEAei",
          "name": "Google Sheets"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "315446fa-9dbe-474e-870f-719e616f1d15",
      "name": "チャットメッセージ",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -304,
        0
      ],
      "webhookId": "956b525c-f9ae-4eac-8a2e-bd8d3d3d6946",
      "parameters": {
        "public": true,
        "options": {},
        "initialMessages": "Hi Nani! 👋"
      },
      "typeVersion": 1.1
    },
    {
      "id": "e0562f97-1298-4f0c-b953-4fed0b102e98",
      "name": "チャットに保存",
      "type": "n8n-nodes-base.telegram",
      "position": [
        384,
        -96
      ],
      "webhookId": "643e6dfc-0cdd-4a1f-bf6e-e162f2ec8cbc",
      "parameters": {
        "text": "=Your Qustion:\n{{ $('Chat message').item.json.chatInput }}\n\nReplay:\n{{ $json.output }}",
        "chatId": "your chat ID",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "awgkor9T3i1erkVJ",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "6ed87099-bffc-47cf-9c5a-b7439daf4978",
      "name": "Crypto",
      "type": "n8n-nodes-base.crypto",
      "position": [
        384,
        80
      ],
      "parameters": {
        "value": "={{ $json.output }}"
      },
      "typeVersion": 1
    },
    {
      "id": "0be1fa1e-e723-42bc-8374-7500f994180e",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        256
      ],
      "parameters": {
        "color": 7,
        "width": 448,
        "height": 336,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n---\n### Tools you can change/add another tool as your wish but need this modal API key and give some data what you want to give replay type"
      },
      "typeVersion": 1
    },
    {
      "id": "6691a7df-166f-4061-9409-6c2fe2d6d3c2",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        256
      ],
      "parameters": {
        "color": 7,
        "width": 224,
        "height": 336,
        "content": "\n\n\n\n\n\n\n\n\n\n\n---\n### chat modal you can change/add another modal as your wish but need this modal API key"
      },
      "typeVersion": 1
    },
    {
      "id": "bd570bf8-0627-4ef6-9d6c-18d98af57bd1",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        -240
      ],
      "parameters": {
        "color": 7,
        "width": 480,
        "height": 464,
        "content": "## optional \nuser can get notification message on telegram\nand store in google sheet"
      },
      "typeVersion": 1
    },
    {
      "id": "35dfef59-06e5-4542-87cd-83ad6b60fcb7",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "付箋12",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        -368,
        -96
      ],
      "parameters": {
        "color": 7,
        "width": 268,
        "height": 236,
        "content": "Activate this workflow and share the public chat URL to let others talk to your AI Agent!"
      },
      "typeVersion": 1
    },
    {
      "id": "499298ba-6976-4e30-b045-7cce8d20c4ee",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "付箋13",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        -80,
        -208
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 348,
        "content": "## Your AI agent can:\n1. **Receive** messages from the chat\n2. **Select** the right tools (e.g., weather, news, email)\n3. **Respond** with live, helpful answers\n\n\nAdjust your agent’s **System Message** thinking, behavior, and replies.\n\n\n\n\n\n\n\n\n\n\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "77ed68ae-0d01-4c5a-8ae4-03298eefb4c4",
  "connections": {
    "ffb50b58-3388-4504-b711-bf1b5c12bdbf": {
      "ai_tool": [
        [
          {
            "node": "c5a03f02-86fa-42d4-83fd-7966b49f56ff",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "6ed87099-bffc-47cf-9c5a-b7439daf4978": {
      "main": [
        [
          {
            "node": "87a16b40-ae21-48b1-b1a5-1017c67f9a10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "092b6a15-91e6-4ee9-8be7-fc45d3fd7d0c": {
      "ai_tool": [
        [
          {
            "node": "c5a03f02-86fa-42d4-83fd-7966b49f56ff",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "b0f6e69c-c23b-4a6d-add0-5f7f181c0174": {
      "ai_tool": [
        [
          {
            "node": "c5a03f02-86fa-42d4-83fd-7966b49f56ff",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "c5a03f02-86fa-42d4-83fd-7966b49f56ff": {
      "main": [
        [
          {
            "node": "e0562f97-1298-4f0c-b953-4fed0b102e98",
            "type": "main",
            "index": 0
          },
          {
            "node": "6ed87099-bffc-47cf-9c5a-b7439daf4978",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "32a851d3-2e78-4be9-907d-81a6303399b0": {
      "ai_languageModel": [
        [
          {
            "node": "c5a03f02-86fa-42d4-83fd-7966b49f56ff",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "315446fa-9dbe-474e-870f-719e616f1d15": {
      "main": [
        [
          {
            "node": "c5a03f02-86fa-42d4-83fd-7966b49f56ff",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

中級

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

関連ワークフロー

OpenAI、SerpAPI、LangChainを使ったニュース検索の自動化とTelegramブロードキャスト
OpenAI、SerpAPI、LangChainを使用したニュース検索の自動化とTelegramブロードキャス
If
Set
Wait
+
If
Set
Wait
23 ノードDevCode Journey
ソーシャルメディア
AI 検索と SerpAPI を使ってニュースを自動のにソーシャルメディアに投稿する
AI 検索と SerpAPI を使ってニュースを Telegram、Facebook、Twitter、WordPress に自動投稿する
If
Set
Wait
+
If
Set
Wait
20 ノードDevCode Journey
ソーシャルメディア
Telegramチャットボットの構築:Gemini Pro AIとGoogle Docsを統合
TelegramチャットボットにGemini Pro AIとGoogle Docsを統合
Wait
Telegram
Google Docs Tool
+
Wait
Telegram
Google Docs Tool
9 ノードDevCode Journey
サポートチャットボット
AIを使用したランディングページコンバージョン分析と自動最適化
GPT、Gemini、およびマルチチャネル配信を使用したランディングページコンバージョン率最適化分析と最適化
Rapiwa
Gmail
Telegram
+
Rapiwa
Gmail
Telegram
16 ノードDevCode Journey
市場調査
Facebookページコメント管理ボット:返信、削除、利用制限、通知
AI駆動のFacebookコメント管理:自動返信、削除、利用制限、通知
If
Set
Code
+
If
Set
Code
59 ノードSpaGreen Creative
ソーシャルメディア
n8nノードの探索(可視化リファレンスライブラリ内)
n8nノードを可視化リファレンスライブラリで探索
If
Ftp
Set
+
If
Ftp
Set
113 ノードI versus AI
その他
ワークフロー情報
難易度
中級
ノード数15
カテゴリー-
ノードタイプ10
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

作成者
DevCode Journey

DevCode Journey

@devcodejourney

I build intelligent systems that automate tasks, streamline workflows, and enhance user experiences using tools like n8n, AI chatbots, and modern automation platforms. With a passion for solving real-world problems through smart technology, I create custom solutions that help individuals and businesses save time, scale faster, and work smarter. Whether it's integrating APIs, building no-code/low-code automations, or developing conversational AI, I'm always exploring the edge of what's possible.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34