π Stock market daily digest with Bright Data scraping & Gemini AI email reports
β‘ 10,510 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
This workflow makes it easier to keep track of the stocks market and get an email with a summary of the daily highlights on what happened, key insights and trends
Setup Guide
-
Define the schedule (days, times, intervals).
-
Replace sample stock data with your desired stock list (ticker, name, etc.) in JSON format.
-
Split Out the fields to have a clean list of the stocks to monitor
-
set keyword node Extracts the stock ticker from each item and sets it to the
keywordproperty. -
Financial times scraper Triggers the Bright Data Datasets API to scrape financial data. Set the node as below
- Method:
POST - URL:
https://api.brightdata.com/datasets/v3/trigger - Query Parameters:
dataset_id: Replace with your Bright Data dataset ID.include_errors:truetype:discover_newdiscover_by:keyword
- Headers:
Authorization:Bearer YOUR_BRIGHTDATA_API_KEYReplace with your Bright Data API key.
- Body: JSON,
={{ $('set keyword').all().map(item => item.json)}} - Execute Once: Checked.
- Method:
-
Get progress node Checks the status of the Bright Data scraping job if complete, or running Setup:
- URL:
https://api.brightdata.com/datasets/v3/progress/{{ $json.snapshot_id }} - Headers:
Authorization:Bearer YOUR_BRIGHTDATA_API_KEYReplace with your Bright Data API key.
- URL:
-
Get snapshot + data retrieves the scraped data from the Bright Data API. Pass the request as
- URL:
https://api.brightdata.com/datasets/v3/snapshot/{{ $json.snapshot_id }} - Query Parameters:
format:json - Headers:
Authorization:Bearer YOUR_BRIGHTDATA_API_KEYReplace with your Bright Data API key.
- URL:
-
Aggregate. Combines the data from each stock item into a single object
-
Update to sheet and add all items to This sheet. Make a copy before you can map the data
-
create summary node generates a summary of the scraped stock data using the Google Gemini AI model and notifies you via Gmail. Setup:
- Prompt Type:
define - Text: Customize the prompt to define the AIβs role, input format, tasks, output format (HTML email), and constraints.
- Prompt Type:
-
Google Sheets. Appends the scraped data to a Google Sheet. This should be set to automap so as to adjust to the results found in the request
Important Notes:
- Remember to replace placeholder values (API keys, dataset IDs, email addresses, Google Sheet IDs) with your actual values.
- Review and customize the AI prompt for the βcreate summaryβ node to achieve the desired email summary output.
- Consider adding error handling for a more robust workflow.
- Monitor API usage to avoid rate limits.
π Nodes Used
Google Sheets, HTTP Request, Schedule Trigger, AI Agent, Google Gemini Chat Model
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File