GPT-4を活用したリアルタイムGoogleスプレッドシート分析用のチャットボット作成

上級

これはAI Chatbot, Multimodal AI分野の自動化ワークフローで、17個のノードを含みます。主にMerge, Aggregate, GoogleSheets, Agent, ChatTriggerなどのノードを使用。 リアルタイム Google シート分析のための GPT-4 データ分析チャットボット作成

前提条件
  • Google Sheets API認証情報
  • OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "d1786ab0d745a7498abf13a9c2cdabb1374c006e889b79eef64ce0386b8f8a41",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "c2a31cd3-1cb9-4268-b587-cf5f0462e4a4",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        960,
        600
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5",
          "cachedResultName": "gpt-5"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "MGwGMKEkdcjzlYCw",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "6253a41e-be2d-4938-8658-1798f76282b7",
      "name": "チャットメッセージ受信時",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -200,
        400
      ],
      "webhookId": "e4a9a147-7a38-4027-b869-bdb13a89dc30",
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "b5db715e-c2a9-46af-a544-6ccf32f3cd11",
      "name": "マージ",
      "type": "n8n-nodes-base.merge",
      "position": [
        720,
        400
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition",
        "numberInputs": 3
      },
      "typeVersion": 3.1
    },
    {
      "id": "c7317d56-e218-4544-b0fa-787280ea6ff3",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1120,
        600
      ],
      "parameters": {
        "sessionKey": "={{ $('When chat message received').item.json.sessionId }}",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.3
    },
    {
      "id": "0938975c-2dad-41a8-ae91-b61f7bea50b7",
      "name": "Data Analyst AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        960,
        400
      ],
      "parameters": {
        "text": "=User Input:\n{{ $('When chat message received').item.json.chatInput }}",
        "options": {
          "systemMessage": "=You are a helpful AI Data Analyst.  \nUse the provided JSON data to analyze and answer questions.  \n\nProducts:  \n{{ $json.products.map(item => item).toJsonString() }}  \n\nCustomers:  \n{{ $json.customers.map(item => item).toJsonString() }}  \n\nOrders:  \n{{ $json.orders.map(item => item).toJsonString() }}  \n\nAlways use the data above when performing analysis.  \n"
        },
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "96c91c7f-9111-43fc-b56d-2811ba18fdc9",
      "name": "Google Sheets - 製品データ取得",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        160,
        200
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Products"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://docs.google.com/spreadsheets/d/13QGuASZJE2MtpTvX83OUCz_dn-WRy4DggWLy5HjBvJk/edit?gid=1076558389#gid=1076558389"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "ypmzFxQFfAacuVVC",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "f6594bb6-8b89-41cc-8e72-8a970af4c982",
      "name": "Google Sheets - 顧客データ取得",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        160,
        400
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Customers"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://docs.google.com/spreadsheets/d/13QGuASZJE2MtpTvX83OUCz_dn-WRy4DggWLy5HjBvJk/edit?gid=1076558389#gid=1076558389"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "ypmzFxQFfAacuVVC",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "36deeb5c-7e7e-4ee2-b0a2-97e8c4b33c9a",
      "name": "Google Sheets - 注文データ取得",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        160,
        620
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Orders"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://docs.google.com/spreadsheets/d/13QGuASZJE2MtpTvX83OUCz_dn-WRy4DggWLy5HjBvJk/edit?gid=1076558389#gid=1076558389"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "ypmzFxQFfAacuVVC",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "67ddb3e6-dacb-413c-afc4-832b6c6a2c53",
      "name": "データ集計1",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        400,
        200
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "products"
      },
      "typeVersion": 1
    },
    {
      "id": "847c0e0b-e519-4eaf-be0a-992d8f02cb18",
      "name": "データ集計2",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        400,
        400
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "customers"
      },
      "typeVersion": 1
    },
    {
      "id": "e72588a6-eac5-4015-a302-ff0a96747a71",
      "name": "データ集計3",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        400,
        640
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "orders"
      },
      "typeVersion": 1
    },
    {
      "id": "ca4b8f48-338c-480e-b0ca-f424044c50f3",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        60,
        -40
      ],
      "parameters": {
        "color": 4,
        "width": 300,
        "height": 860,
        "content": "## Google Sheet - Get Data  \nUpdate the document URL  \nUpdate the sheet name  \nAdjust the number of Google Sheets nodes based on your use case  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "af0947bb-3e99-4eac-8186-32a506581366",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -780,
        140
      ],
      "parameters": {
        "color": 4,
        "width": 520,
        "height": 300,
        "content": "Workflow Configurations:  \n- Update the Google Sheets document ID in all Google Sheets nodes to point to your data source based on your use case  \n- Example Google Sheets template you can copy: https://docs.google.com/spreadsheets/d/1-QTFO3TbGFjtYOMUfZb0aY66J_8G-R0Rb0JHLWrEZ90/edit?gid=0#gid=0  \n- Configure the sheet names to match your Google Sheets structure  \n- Adjust the AI Agent system message to reflect your specific data schema and analysis requirements  \n- Customize the chat trigger webhook ID for your specific implementation  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "31d2d863-2087-4de6-b7d7-b845b44e40ef",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        860
      ],
      "parameters": {
        "color": 4,
        "width": 880,
        "height": 320,
        "content": "## 🤖 Build a Smart AI Data Analyst Chatbot with Google Sheet and GPT-5\n\nWhat This Template Does:\n\n- Creates an intelligent chatbot that can analyze data from Google Sheets in real time  \n- Fetches live data from all Google Sheets whenever a chat message is received  \n- Uses OpenAI's model to provide intelligent data analysis and insights  \n- Maintains conversation memory to provide context-aware responses across chat sessions  \n- Combines multiple data sources to provide comprehensive business intelligence answers  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "39c68ef9-71c2-45a1-99e3-b88576d16c45",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        140,
        860
      ],
      "parameters": {
        "color": 4,
        "width": 820,
        "height": 420,
        "content": "## 📋 WORKFLOW PROCESS OVERVIEW\n\nStep 1: 💬 Chat Trigger receives incoming chat messages with session ID tracking  \nStep 2: 📊 Data Retrieval (Parallel Processing)  \nStep 3: 🔄 Data Aggregation combines data from all sources  \nStep 4: 🤝 Merge Node combines all aggregated data streams into a single data object  \nStep 5: 🧠 AI Analysis processes user input using:  \n - OpenAI Model for intelligent responses  \n - Simple Memory maintains conversation context using session ID  \n - Data Analyst AI Agent analyzes the combined data and generates insights based on user queries  \nStep 6: 📤 Response delivers analytical insights, charts, summaries, or answers back to the chat interface  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "1ef90da5-29e6-4b21-9045-3db6d4bb7f78",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1400,
        120
      ],
      "parameters": {
        "color": 4,
        "width": 380,
        "height": 760,
        "content": "# 👋 Hi, I’m Billy\n\nI help businesses build **n8n workflows** & **AI automation projects**.  \nNeed help with n8n or AI Automation projects? \nContact me and let’s build your automation together.\n\n📩 **Email:** billychartanto@gmail.com  \n🤝 **n8n Creator:** [n8n.io/creators/billy](https://n8n.io/creators/billy/)\n🌐 **My n8n Projects:** [billychristi.com/n8n](https://www.billychristi.com/n8n)  \n\n\n\n---\n💡 Feel free to get in touch if you’d like help on your next automation project or if you have any feedback or thoughts to share.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "27d66d12-5a60-45c8-a175-03fdea4db01d",
      "name": "付箋5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        860,
        200
      ],
      "parameters": {
        "color": 4,
        "width": 460,
        "height": 640,
        "content": "## Data Analyst AI Agent  \nThis is where all data is processed based on user input  \n\nConfiguration:  \nUpdate the system message prompt data sources based on your use case  \n"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "b5db715e-c2a9-46af-a544-6ccf32f3cd11": {
      "main": [
        [
          {
            "node": "0938975c-2dad-41a8-ae91-b61f7bea50b7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c7317d56-e218-4544-b0fa-787280ea6ff3": {
      "ai_memory": [
        [
          {
            "node": "0938975c-2dad-41a8-ae91-b61f7bea50b7",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "67ddb3e6-dacb-413c-afc4-832b6c6a2c53": {
      "main": [
        [
          {
            "node": "b5db715e-c2a9-46af-a544-6ccf32f3cd11",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "847c0e0b-e519-4eaf-be0a-992d8f02cb18": {
      "main": [
        [
          {
            "node": "b5db715e-c2a9-46af-a544-6ccf32f3cd11",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "e72588a6-eac5-4015-a302-ff0a96747a71": {
      "main": [
        [
          {
            "node": "b5db715e-c2a9-46af-a544-6ccf32f3cd11",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "c2a31cd3-1cb9-4268-b587-cf5f0462e4a4": {
      "ai_languageModel": [
        [
          {
            "node": "0938975c-2dad-41a8-ae91-b61f7bea50b7",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "6253a41e-be2d-4938-8658-1798f76282b7": {
      "main": [
        [
          {
            "node": "36deeb5c-7e7e-4ee2-b0a2-97e8c4b33c9a",
            "type": "main",
            "index": 0
          },
          {
            "node": "96c91c7f-9111-43fc-b56d-2811ba18fdc9",
            "type": "main",
            "index": 0
          },
          {
            "node": "f6594bb6-8b89-41cc-8e72-8a970af4c982",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "36deeb5c-7e7e-4ee2-b0a2-97e8c4b33c9a": {
      "main": [
        [
          {
            "node": "e72588a6-eac5-4015-a302-ff0a96747a71",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "96c91c7f-9111-43fc-b56d-2811ba18fdc9": {
      "main": [
        [
          {
            "node": "67ddb3e6-dacb-413c-afc4-832b6c6a2c53",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f6594bb6-8b89-41cc-8e72-8a970af4c982": {
      "main": [
        [
          {
            "node": "847c0e0b-e519-4eaf-be0a-992d8f02cb18",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

上級 - AIチャットボット, マルチモーダルAI

有料ですか?

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

関連ワークフロー

AI を活用した WhatsApp カスタマーサービス(GPT-4、スマートルーティング、ナレッジベース)
AI ベースの WhatsApp カスタマー サービス (GPT-4、インテリジェント ルーティング、ナレッジ ベース)
Set
Gmail
Merge
+
Set
Gmail
Merge
45 ノードPaul
AIチャットボット
GPT-5 Nano を使った多言語チャットボットによる EC 顧客サポートの自動化
GPT-5 Nano多言語チャットボットを使ってEC向け顧客サポートを自動化
Set
Merge
Split Out
+
Set
Merge
Split Out
13 ノードRobert Breen
AIチャットボット
Instagramカルーセル広告をAIチャットで自動化
AIとBlotatoを使用して5つのプラットフォームでソーシャルメディアのカルーセルを作成・配信
If
Wait
Merge
+
If
Wait
Merge
29 ノードSabrina Ramonov 🍄
その他
Google カレンダーとテーブルを使用して AI 駆動のバーチャルリセプションストラフを作成
Googleカレンダーとテーブルを使ってAI駆動のバーチャルリセプションストを作成
Google Sheets
Agent
Google Sheets Tool
+
Google Sheets
Agent
Google Sheets Tool
12 ノードRisper
その他
GPT-4oとSerpAPIに基づくAI駆動型のオンラインツール検索機
GPT-4oとSerpAPIを使ってオンラインツールを調査・比較
Merge
Aggregate
Agent
+
Merge
Aggregate
Agent
26 ノードAiAgent
市場調査
GPT-4o チャットで自然言語クエリから BigQuery SQL を生成
GPT-4o チャットを使って自然言語クエリから BigQuery SQL を生成する
Code
Merge
Aggregate
+
Code
Merge
Aggregate
13 ノードRobert Breen
内部Wiki
ワークフロー情報
難易度
上級
ノード数17
カテゴリー2
ノードタイプ8
難易度説明

上級者向け、16ノード以上の複雑なワークフロー

作成者
Billy Christi

Billy Christi

@billy

I build scalable automation systems with n8n to help businesses save time and cut costs. 💼 n8n expert available for new projects 📩 billychartanto@gmail.com

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34