Chatbot de questions-réponses sur les données financières basé sur Google Finance, SerpAPI et OpenAI

Intermédiaire

Ceci est unAI Chatbot, Multimodal AIworkflow d'automatisation du domainecontenant 9 nœuds.Utilise principalement des nœuds comme Set, HttpRequest, Agent, LmChatOpenAi, MemoryBufferWindow. intégration Google Finance、SerpAPI et OpenAI de财务données问答chatbot

Prérequis
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
  • Clé API OpenAI
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
{
  "meta": {
    "instanceId": "ad0113c344ee237399e44e9f11798b05baeb83a6196d514a9ae9d2ad71c3b5c9"
  },
  "nodes": [
    {
      "id": "19113e71-3a28-4741-b036-efc473d6c804",
      "name": "Modèle de chat OpenAI5",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        3216,
        8592
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-nano",
          "cachedResultName": "gpt-5-nano"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "4l6TDfLZVFS24g3X",
          "name": "OpenAi account 4"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "44ad0df9-a6d0-417c-ab3e-4d20aa3c41c3",
      "name": "Mémoire simple1",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        3536,
        8448
      ],
      "parameters": {
        "sessionKey": "={{ $('Sample Chatbot').item.json.sessionId }}",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.3
    },
    {
      "id": "7af7f3d7-f9b2-488a-a418-fbbe1a909ff3",
      "name": "Conversion d'objets en texte1",
      "type": "n8n-nodes-base.set",
      "position": [
        3008,
        8128
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "9578adb8-b0e3-4629-a375-8ac9585022f2",
              "name": "data",
              "type": "string",
              "value": "={{ $json.markets }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "85db5e3f-b21c-4cf4-814c-4d7312a9eed4",
      "name": "Note adhésive60",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2272,
        7936
      ],
      "parameters": {
        "color": 7,
        "width": 1488,
        "height": 928,
        "content": "# 📊 Chat with Google Finance  \n\nThis workflow connects a chatbot to **live financial data** from SerpApi and uses OpenAI to answer questions.  \n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "a5719b06-a39b-4661-98cc-892b895128d6",
      "name": "Note adhésive17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        7936
      ],
      "parameters": {
        "width": 400,
        "height": 928,
        "content": "\n\n## ⚙️ Setup Instructions  \n\n### 1️⃣ Add Your SerpApi Key  \n1. Create a free account at [SerpApi](https://serpapi.com/)  \n2. Copy your **API Key** from the dashboard  \n3. In the **HTTP Request (Finance Search)** node, update the URL:  \nhttps://serpapi.com/search.json?engine=google_finance&q=^GSPC&api_key=YOUR_API_KEY\n\nReplace `YOUR_API_KEY` with your actual SerpApi key.  \n\n### 2️⃣ Set Up OpenAI Connection  \n1. Go to [OpenAI Platform](https://platform.openai.com/api-keys)  \n2. Navigate to [OpenAI Billing](https://platform.openai.com/settings/organization/billing/overview)  \n3. Add funds to your billing account  \n4. Copy your API key into the **OpenAI credentials** in n8n  \n\n---\n\n\n## 📬 Contact  \nNeed help customizing this (e.g., multiple tickers, daily summaries, or sending reports to Google Sheets)?  \n\n📧 **robert@ynteractive.com**  \n🔗 **[Robert Breen](https://www.linkedin.com/in/robert-breen-29429625/)**  \n🌐 **[ynteractive.com](https://ynteractive.com)**\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "b2603c21-3c4b-45fb-9e8c-7e730b2f9519",
      "name": "Recherche financière SerpAPI1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2704,
        8544
      ],
      "parameters": {
        "url": "https://serpapi.com/search.json?engine=google_finance&q=^GSPC&api_key=yourapikey",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "28d8c26f-e9a1-4480-94b7-1fb114086ad9",
      "name": "Chat avec Google Finance",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3328,
        8096
      ],
      "parameters": {
        "text": "=question: {{ $('Sample Chatbot').item.json.chatInput }} market data: {{ $json.data }}",
        "options": {
          "systemMessage": "=You are a helpful assistant. Take questions from the user and answer based on the market data. \n"
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "6f6507fe-fcc2-462c-a9ab-e8adb6e956e8",
      "name": "Note adhésive31",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3104,
        8416
      ],
      "parameters": {
        "color": 3,
        "width": 288,
        "height": 304,
        "content": "### 2️⃣ Set Up OpenAI Connection\n1. Go to [OpenAI Platform](https://platform.openai.com/api-keys)  \n2. Navigate to [OpenAI Billing](https://platform.openai.com/settings/organization/billing/overview)  \n3. Add funds to your billing account  \n4. Copy your API key into the **OpenAI credentials** in n8n  "
      },
      "typeVersion": 1
    },
    {
      "id": "10e3b585-6d7d-4fb3-aedd-9c0fb56d0062",
      "name": "Note adhésive32",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2608,
        8256
      ],
      "parameters": {
        "color": 3,
        "width": 272,
        "height": 432,
        "content": "### 1️⃣ Add Your SerpApi Key  \n1. Create a free account at [SerpApi](https://serpapi.com/)  \n2. Copy your **API Key** from the dashboard  \n3. In the **HTTP Request (Finance Search)** node, update the URL:  \nhttps://serpapi.com/search.json?engine=google_finance&q=^GSPC&api_key=YOUR_API_KEY\n\n👉 Replace `YOUR_API_KEY` with your actual SerpApi key.  \n"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "44ad0df9-a6d0-417c-ab3e-4d20aa3c41c3": {
      "ai_memory": [
        [
          {
            "node": "28d8c26f-e9a1-4480-94b7-1fb114086ad9",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "19113e71-3a28-4741-b036-efc473d6c804": {
      "ai_languageModel": [
        [
          {
            "node": "28d8c26f-e9a1-4480-94b7-1fb114086ad9",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "7af7f3d7-f9b2-488a-a418-fbbe1a909ff3": {
      "main": [
        [
          {
            "node": "28d8c26f-e9a1-4480-94b7-1fb114086ad9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b2603c21-3c4b-45fb-9e8c-7e730b2f9519": {
      "main": [
        [
          {
            "node": "7af7f3d7-f9b2-488a-a418-fbbe1a909ff3",
            "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é ?

Intermédiaire - Chatbot IA, IA Multimodale

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é
Intermédiaire
Nombre de nœuds9
Catégorie2
Types de nœuds6
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
Robert Breen

Robert Breen

@rbreen

Professional services consultant with over 10 years of experience solving complex business problems across industries. I specialize in n8n and process automation—designing custom workflows that integrate tools like Google Calendar, Airtable, GPT, and internal systems. Whether you need to automate scheduling, sync data, or streamline operations, I build solutions that save time and drive results.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34