Analyze stocks in Warren Buffett style from Telegram with OpenAI and Gmail
Needs changesWhat this workflow does
This AI workflow has 13 nodes and runs on Telegram events (message). Along the way it connects Telegram, SerpApi (Google Search), Gmail and OpenAI Chat Model.
How it runs
Trigger: On Telegram events (message).
- 🔤 Extract Ticker & User (Edit Fields (Set)): sets 4 fields: ticker, chat_id, username…
- 🔎 Validate Ticker (If): checks a condition and branches into true / false
- 📨 Send Acknowledgement (Telegram): uses Telegram
- ⚠️ Invalid Ticker Reply (Telegram): uses Telegram
- 🧠 Buffett AI Agent (AI Agent): runs an AI agent, with model: 🤖 OpenAI GPT-4o-mini; 2 tools (🔍 SerpAPI Web Search, Calculator)
- 🔀 Check Agent Output (If): checks a condition and branches into true / false
- 📧 Send Gmail Report (Gmail): uses Gmail
- Telegram: uses Telegram
- Telegram: uses Telegram
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- SerpApi (Google Search) in 🔍 SerpAPI Web Search: no direct replacement: call the SerpApi REST API with an HTTP Request tool, or use a verified community node.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| SerpApi (Google Search) 🔍 SerpAPI Web Search | No direct replacement: call the SerpApi REST API with an HTTP Request tool, or use a verified community node |
Nodes used (9)
- Telegram Trigger
n8n-nodes-base.telegramTrigger - Edit Fields (Set)
n8n-nodes-base.set - Telegram
n8n-nodes-base.telegram - AI Agent
@n8n/n8n-nodes-langchain.agent - SerpApi (Google Search)
@n8n/n8n-nodes-langchain.toolSerpApi - Gmail
n8n-nodes-base.gmail - If
n8n-nodes-base.if - Calculator
@n8n/n8n-nodes-langchain.toolCalculator - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
From the author
This workflow turns a simple Telegram message into a full stock research report inspired by Warren Buffett’s value investing approach. A user sends a ticker symbol such as AAPL, MSFT, or AMZN, and the workflow validates the input, runs AI-powered research,…