Email Automation
Detect NSE options anomalies with Supabase, OpenAI, Google Sheets and Gmail
On a schedule, it handles email with OpenAI / ChatGPT using Gmail, Google Sheets, Supabase.
What it does
# NSE Options Anomaly Detection and Alert Workflow ## How Workflow Works The workflow automatically monitors NSE option contracts according to the configured schedule and watchlist. It first reads enabled symbols from Google Sheets and fetches their option chain data through the configured data endpoint. The returned contracts are normalized and compared against historical option data stored in Supabase. The workflow calculates volume ratios, open interest ratios, and z scores before filtering contracts that meet the anomaly conditions. Detected anomalies are stored as snapshots, analyzed by OpenAI, and saved with their AI interpretation in Supabase. The same anomaly records are logged into Google Sheets for reporting and tracking. Finally, all anomalies from the execution are combined into one Gmail digest containing the complete contract information and AI analysis. ## Setup Steps Configure the Google Sheets watchlist with symbols, exchange, scan mode, strike count, and enabled status. Configure the option chain HTTP endpoint and ensure it returns the expected NSE option contract fields. Create and configure the Supabase option snapshot and anomaly tables and connect the Supabase credentials. Configure the anomaly calculation thresholds and historical comparison logic according to your monitoring requirements. Connect the OpenAI, Google Sheets, Supabase, and Gmail credentials and verify that anomaly records are saved correctly. Set the scanner schedule, execute a test run, verify the Supabase and Google Sheets records, and confirm that all detected anomalies arrive in one Gmail digest.
The steps
- Market Scanner Schedule
- Read NSE Watchlist
- Prepare Watchlist Symbols
- Fetch NSE Option Chain
- Normalize Option Contracts
- Fetch Historical Option Data
- Calculate Option Anomaly
- Filter Anomalous Contracts
- Save Option Snapshot
- Generate AI Anomaly Interpretation
- Save Anomaly Analysis
- Log Anomaly to Google Sheets
- Build Email Alert Digest
- Send Gmail Anomaly Digest
Similar automations
RAG & Knowledge BasesDetect Energy Consumption Anomalies with Hugging Face RAG10 stepsMonitoring, Ops & IncidentsDetect ad spend anomalies and pacing issues across Google Ads, Meta and GA423 stepsMonitoring, Ops & IncidentsDetect Meta Ads spend anomalies and creative fatigue with OpenAI and Slack54 stepsMonitoring, Ops & IncidentsDetect AWS and GCP cost anomalies with GPT-4o-mini and alert Slack29 steps