π Extract market cap data from Yahoo Finance with Bright Data & visualize in Telegram
β‘ 1,493 views Β· π Crypto Trading & Stock Market
π‘ Pro Tip β HTTP Request scraping tends to break when sites update their markup. If youβre scraping a major platform, check if ScraperNode covers it β it has maintained scrapers for LinkedIn, Instagram, TikTok, YouTube, and 20+ other platforms that return structured data.
Description
Financial Insight Automation: Market Cap to Telegram via Bright Data
π Description
An automated n8n workflow that scrapes financial data from Yahoo Finance using Bright Data, processes market cap information, generates visual charts, and sends comprehensive financial insights directly to Telegram for instant notifications.
π How It Works
This workflow operates through a simple three-zone process:
1. Data Input & Trigger
User submits a keyword (e.g., βAIβ, βCryptoβ, βMSFTβ) through a form trigger that initiates the financial data collection process.
2. Data Scraping & Processing
Bright Data API discovers and scrapes comprehensive financial data from Yahoo Finance, including market cap, stock prices, company profiles, and financial metrics.
3. Visualization & Delivery
The system generates interactive market cap charts, saves data to Google Sheets for record-keeping, and sends visual insights to Telegram as PNG images.
β‘ Setup Steps
> β±οΈ Estimated Setup Time: 15-20 minutes
Prerequisites
- Active n8n instance (self-hosted or cloud)
- Bright Data account with Yahoo Finance dataset access
- Google account for Sheets integration
- Telegram bot token and chat ID
Step 1: Import the Workflow
- Copy the provided JSON workflow code
- In n8n: Go to Workflows β + Add workflow β Import from JSON
- Paste the JSON content and click Import
Step 2: Configure Bright Data Integration
Set up Bright Data Credentials:
- In n8n: Navigate to Credentials β + Add credential β HTTP Header Auth
- Add Authorization header with value:
Bearer BRIGHT_DATA_API_KEY - Replace
BRIGHT_DATA_API_KEYwith your actual API key - Test the connection to ensure it works properly
> Note: The workflow uses dataset ID gd_lmrpz3vxmz972ghd7 for Yahoo Finance data. Ensure you have access to this dataset in your Bright Data dashboard.
Step 3: Set up Google Sheets Integration
Create a Google Sheet:
- Go to Google Sheets and create a new spreadsheet
- Name it βFinancial Data Trackerβ or similar
- Copy the Sheet ID from the URL
Configure Google Sheets credentials:
- In n8n: Credentials β + Add credential β Google Sheets OAuth2 API
- Complete OAuth setup and test connection
Update the workflow:
- Open the βπ Filtered Output & Save to Sheetβ node
- Replace
YOUR_SHEET_IDwith your actual Sheet ID - Select your Google Sheets credential
Step 4: Configure Telegram Bot
Set up Telegram Integration:
- Create a Telegram bot using @BotFather
- Get your bot token and chat ID
- In n8n: Credentials β + Add credential β Telegram API
- Enter your bot token
- Update the βπ€ Send Chart on Telegramβ node with your chat ID
- Replace
YOUR_TELEGRAM_CHAT_IDwith your actual chat ID
Step 5: Test and Activate
Test the workflow:
- Use the form trigger with a test keyword (e.g., βAAPLβ)
- Monitor the execution in n8n
- Verify data appears in Google Sheets
- Check for chart delivery on Telegram
Activate the workflow:
- Turn on the workflow using the toggle switch
- The form trigger will be accessible via the provided webhook URL
π Key Features
- π Keyword-Based Discovery: Search companies by keyword, ticker, or industry
- π° Comprehensive Financial Data: Market cap, stock prices, earnings, and company profiles
- π Visual Charts: Automatic generation of market cap comparison charts
- π± Telegram Integration: Instant delivery of insights to your mobile device
- πΎ Data Storage: Automatic backup to Google Sheets for historical tracking
- β‘ Real-time Processing: Fast data retrieval and processing with Bright Data
π Output Data Points
| Field | Description | Example |
|---|---|---|
| Company Name | Full company name | βApple Inc.β |
| Stock Ticker | Trading symbol | βAAPLβ |
| Market Cap | Total market capitalization | β$2.89Tβ |
| Current Price | Latest stock price | β$189.25β |
| Exchange | Stock exchange | βNASDAQβ |
| Sector | Business sector | βTechnologyβ |
| PE Ratio | Price to earnings ratio | β28.45β |
| 52 Week Range | Annual high and low prices | β$164.08 - $199.62β |
π§ Troubleshooting
Common Issues
Bright Data Connection Failed:
- Verify your API key is correct and active
- Check dataset permissions in Bright Data dashboard
- Ensure you have sufficient credits
Google Sheets Permission Denied:
- Re-authenticate Google Sheets OAuth
- Verify sheet sharing settings
- Check if the Sheet ID is correct
Telegram Not Receiving Messages:
- Verify bot token and chat ID
- Check if bot is added to the chat
- Test Telegram credentials manually
Performance Tips
- Use specific keywords for better data accuracy
- Monitor Bright Data usage to control costs
- Set up error handling for failed requests
- Consider rate limiting for high-volume usage
π― Use Cases
- Investment Research: Quick financial analysis of companies and sectors
- Market Monitoring: Track market cap changes and stock performance
- Competitive Analysis: Compare financial metrics across companies
- Portfolio Management: Monitor holdings and potential investments
- Financial Reporting: Generate automated financial insights for teams
π Additional Resources
For any questions or support, please contact:
info@incrementors.com
or fill out this form: https://www.incrementors.com/contact-us/
π Nodes Used
Google Sheets, HTTP Request, Telegram, n8n Form Trigger
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File