🤖 Financial data Q&A chatbot with Google Finance, SerpAPI, and OpenAI

953 views · 🤖 AI Chatbots & Agents

Description

Replace YOUR_API_KEY with your actual SerpApi key.

2️⃣ Set Up OpenAI Connection

  1. Go to OpenAI Platform
  2. Navigate to Billing and ensure your account has credits/funding
  3. Copy your API Key into the OpenAI credentials in n8n

🧠 Workflow Breakdown

  1. Chat Trigger → User enters a financial question (e.g., “What’s the current price of Tesla?”).
  2. HTTP Request (SerpApi Finance Search) → Fetches the latest market data for the requested ticker or index.
  3. OpenAI Node → Takes both the raw financial data and the user’s query, then formulates a natural language response.
  4. Output → Returns a clear, conversational answer that can be displayed in chat, Slack, or another integration.

🎛️ Customization Guidance


💬 Example Questions & Responses

Question: “What’s the current price of the S&P 500?”
Expected Response:
“The S&P 500 (^GSPC) is currently trading at 4,725.13, down 0.8% today.”

Question: “Summarize the performance of Tesla and Apple today.”
Expected Response:

Question: “Give me a quick market recap.”
Expected Response:
“Markets are mixed today — the S&P 500 is slightly down, while tech stocks like Tesla are showing gains. Apple dipped slightly after earnings news.”


📬 Contact

Need help customizing this workflow (e.g., multiple tickers, daily summaries, or integrating into dashboards)?

📧 robert@ynteractive.com
🔗 Robert Breen
🌐 ynteractive.com

🔗 Nodes Used

HTTP Request, AI Agent, OpenAI Chat Model, Simple Memory

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup