Skip to main content

Analyze stocks in Warren Buffett style from Telegram with OpenAI and Gmail

Workflow preview

Workflow preview
100%
Analyze stocks in Warren Buffett style from Telegram with OpenAI and Gmail preview
Open on n8n.io

1. Workflow Overview

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 ...

Best for

  • Crypto Trading automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.telegramtrigger, n8n-nodes-base.set, n8n-nodes-base.telegram, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.toolserpapi, n8n-nodes-base.gmail, n8n-nodes-base.if, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Sankar Battula.

Original n8n.io source

1.1 Workflow description

Title
Analyze stocks in Warren Buffett style from Telegram with OpenAI and Gmail
Workflow name
Analyze stocks in Warren Buffett style from Telegram with OpenAI and Gmail

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, performs discounted cash flow calculations, and sends a polished HTML report to Gmail with a final verdict.

It is designed as a reusable finance analysis template for creators, developers, and automation builders who want to combine Telegram, AI agents, live research, and email delivery in one workflow. Templates in n8n are intended to help users learn, reuse best practices, and quickly adapt a workflow to their own setup, so this version is structured to be easy to follow and reconfigure after import.

What this workflow does

  • Receives a stock ticker from Telegram and cleans the input before processing.

  • Validates the ticker format and stops invalid requests early with a helpful reply.

  • Uses an AI agent to generate a Buffett-style investment analysis.

  • Uses SerpAPI for live company and market research.

  • Uses a calculator tool for DCF and margin-of-safety math.

  • Sends the final HTML report to Gmail and confirms completion in Telegram.

Setup instructions

  1. Import the workflow into n8n and reconnect your credentials for Telegram, OpenAI, SerpAPI, and Gmail. n8n templates are designed to be imported and then configured in the user’s own environment.

  2. Open the Extract Ticker, Chat ID & Email node and replace [email protected] with your destination email address.

  3. Create or connect your Telegram bot credentials, then test by sending a stock ticker like AAPL or MSFT.

  4. Connect your Gmail OAuth2 account so the workflow can send the HTML report email.

  5. Activate the workflow and run a live test from Telegram.

Requirements

  • Telegram Bot API credentials
  • OpenAI API credentials
  • SerpAPI credentials
  • Gmail OAuth2 credentials

Best for

  • Finance research demos
  • AI agent workflow examples
  • Telegram-to-email automations
  • Value investing and stock analysis use cases

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - 📱 Telegram Trigger

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.1

Block 2 - 🔤 Extract Ticker & User

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.3

Block 3 - 📨 Send Acknowledgement

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 4 - 🧠 Buffett AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 5 - 🔍 SerpAPI Web Search

Type / Role
@n8n/n8n-nodes-langchain.toolSerpApi - toolSerpApi
Config choices
Version 1

Block 6 - 📧 Send Gmail Report

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 7 - ✅ Telegram Confirmation

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 8 - ❌ Telegram Error Handler

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 9 - 🔎 Validate Ticker

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 10 - ⚠️ Invalid Ticker Reply

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 11 - 🔀 Check Agent Output

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 12 - 📌 Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - 📌 Setup Required

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - 📌 Step 1 - Input

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - 📌 Step 2 - AI Engine

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - 📌 Step 3 - Output

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - 📌 Error Handling

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - 📌 Email Config

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - 🧮 Calculator (DCF Math)

Type / Role
@n8n/n8n-nodes-langchain.toolCalculator - toolCalculator
Config choices
Version 1

Block 20 - 🤖 OpenAI GPT-4o-mini

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

3. Summary Table

Workflow Analyze stocks in Warren Buffett style from Telegram with OpenAI and Gmail
Complexity advanced
Nodes 20
Categories Crypto Trading, AI Chatbot
Author Sankar Battula
Published 07 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/14843/14843.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Analyze stocks in Warren Buffett style from Telegram with OpenAI and Gmail do?

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 ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Crypto Trading, AI Chatbot use case.