Financial Market Cap Extraction, Visualization, and Telegram Reporting - n8n Workflow

Use this robust n8n workflow to automatically scrape Yahoo Finance market data via Bright Data, store results in Google Sheets, and generate visual market cap charts sent directly to Telegram.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Financial analysts needing timely market data without manual scraping.
Market researchers requiring structured market cap data for multiple keywords.
Technical users looking for advanced examples of polling loops within an n8n workflow.
Individuals wanting to deploy automated, visualized financial reports using n8n templates.

Overview

Manually tracking market capitalization data across various companies or sectors can be extremely time-consuming and error-prone. This advanced n8n workflow solves this by fully automating the data pipeline, leveraging specialized tools to ensure high-quality, structured results.

This n8n automation utilizes a user-input keyword to initiate a powerful web scraping job through Bright Data, targeting specific financial information (like Market Cap, EPS, Volume) often found on Yahoo Finance. Once the scraping job is complete, the data is pulled back into the n8n environment, cleaned, stored in Google Sheets for archiving, and immediately processed into a dynamic chart. The final visualization is then sent instantly to a designated Telegram chat, providing zero-touch, visual reporting. This complex n8n template demonstrates effective use of APIs for scraping, asynchronous job monitoring, data transformation using a Code n8n node, and final delivery.

How it Works

This powerful n8n workflow is initiated by the ๐ŸŸฉ Form Trigger n8n node. The user provides a keyword (e.g., 'MSFT', 'Crypto') via the form, which serves as the input for the scraping job.


  1. Scraping Initiation: The ๐Ÿš€ Trigger Scraping1 HTTP Request n8n node immediately calls the Bright Data API, passing the user-supplied keyword to start the scraping process for the specified dataset.

  2. Status Check Loop: The n8n workflow then enters a crucial monitoring phase. It calls the Bright Data progress API (๐ŸŸก Check Delivery Status) to check the job status. The ๐Ÿ• Wait 1 minute1 n8n node introduces a polling delay. The ๐ŸŸข Check Final Status If n8n node validates if the job status is 'ready'. If not, the flow loops back to the Wait n8n node, creating a robust, self-correcting automation.

  3. Data Retrieval: Once the status is 'ready', the ๐Ÿ”ฝ final data given (Snapshot Fetch) HTTP Request n8n node pulls the final, structured JSON data snapshot containing all financial metrics.

  4. Storage: The ๐Ÿ“Š Filtered Output & Save to Sheet Google Sheets n8n node appends all extracted data (including market cap, volume, and EPS) to a designated spreadsheet row for persistence and further analysis.

  5. Visualization: The ๐Ÿงฎ Generate Chart Payload Code n8n node transforms the raw market cap strings (handling 'T', 'B', 'M' suffixes) into numerical values in billions and formats the data into a QuickChart JSON structure.

  6. Chart Generation: The ๐ŸŒ Generate PNG from Chart HTTP Request n8n node sends the chart JSON to the QuickChart API, resulting in a binary PNG image output.

  7. Reporting: Finally, the ๐Ÿ“ค Send Chart on Telegram Telegram n8n node takes the binary image data and sends the resulting market cap visualization directly to the configured Telegram chat, completing the automated reporting cycle. This entire process demonstrates the power of a combined data extraction and reporting n8n workflow.

Installation Guide

To utilize this n8n workflow template, follow these setup steps:


  1. Import: Copy the provided JSON into your n8n instance using the 'Import Workflow' function.

  2. Credentials Setup:

Bright Data: Configure the HTTP Request n8n nodes (๐Ÿš€ Trigger Scraping1, ๐ŸŸก Check Delivery Status, ๐Ÿ”ฝ final data given) by replacing BRIGHTDATAAPIKEY with your actual Bright Data bearer token.
Google Sheets: Set up your Google Sheets credential in the ๐Ÿ“Š Filtered Output & Save to Sheet n8n node, ensuring you link to the correct spreadsheet URL and sheet name.
* Telegram: Set up your Telegram credential in the ๐Ÿ“ค Send Chart on Telegram n8n node and update the chatId parameter to your target chat ID.

  1. Webhook Activation: Ensure the ๐ŸŸฉ Form Trigger n8n trigger is active. You can execute the n8n workflow manually for testing by clicking 'Execute Workflow' and submitting test data through the generated form URL.

  2. Dataset ID: Verify the datasetid in the initial Bright Data HTTP Request n8n node matches your expected Yahoo Finance dataset ID.

Node Details

๐ŸŸฉ Form Trigger (n8n trigger): This is the starting point of the n8n workflow. It is configured to accept a keyword input from the user via a submission form, initiating the data retrieval for that specific keyword.
๐Ÿš€ Trigger Scraping1 (HTTP Request n8n node): Responsible for starting the web scraping job on the Bright Data platform. Key configurations include using a POST method, specifying the target datasetid, and passing the user's keyword as the input body.
๐ŸŸก Check Delivery Status of Snap ID1 (HTTP Request n8n node): Used within the polling mechanism to query the Bright Data API using the snapshotid to determine if the data extraction job is complete.
๐Ÿ• Wait 1 minute1 (Wait n8n node): A core logic n8n node that pauses the n8n workflow execution for 60 seconds, preventing excessive API calls during the polling phase.
๐ŸŸข Check Final Status (If n8n node): Implements flow control. It checks if the status returned by Bright Data equals 'ready'. If true, the n8n workflow proceeds; otherwise, it loops back to the Wait n8n node.
๐Ÿ”ฝ final data given (Snapshot Fetch) (HTTP Request n8n node): This fetches the final structured JSON data when the Bright Data job is 'ready'.
๐Ÿ“Š Filtered Output & Save to Sheet (Google Sheets n8n node): Performs the data persistence step. It uses the 'append' operation to save various metrics like market_cap, name, eps, and volume into the specified Google Sheet.
๐Ÿงฎ Generate Chart Payload (Code n8n node): This customization n8n node cleans and transforms the market cap data (converting T, B, M notations to numerical values in Billions) and creates the JSON structure necessary for QuickChart.io visualization.
๐ŸŒ Generate PNG from Chart (HTTP Request n8n node): Calls the QuickChart service, embedding the generated chart JSON in the URL query parameter to render the resulting chart image as binary data.
๐Ÿ“ค Send Chart on Telegram (Telegram n8n node): The final output n8n node. It uses the binary data feature to send the generated PNG chart directly to the configured Telegram chat ID, providing an immediate visual report from this n8n template.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by

Featured*