Templates / Detect dividend yield traps with Google Sheets, Supabase, OpenAI, Slack, and Gmail

Detect dividend yield traps with Google Sheets, Supabase, OpenAI, Slack, and Gmail

Ready for 3.0

by WeblineIndia ✓ · 2 views · created 2026-09-28 · Crypto Trading, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (9)

Google SheetsSupabaseSlackGmailOpenAI

What it does

Quick overview This workflow runs weekly to scan a Google Sheets dividend watchlist, pulls upcoming ex-dividend and fundamentals data via HTTP requests, scores yield-trap risk, uses OpenAI to explain high-risk candidates, stores results in Google Sheets and Supabase, and sends a digest to Slack and Gmail. How it works 1. Runs weekly on a schedule trigger. 2. Reads the stock watchlist from Google Sheets and keeps only rows marked as enabled. 3. Fetches upcoming ex-dividend events from an HTTP endpoint and filters them to enabled symbols with ex-dividend dates in the next 7 days. 4. Fetches dividend fundamentals from an HTTP endpoint, merges them with the calendar candidates, and calculates a dividend sustainability score, a yield-trap risk score/level, and a list of red-flag conditions. 5. For candidates with a risk score of 60 or higher, OpenAI generates a short JSON explanation (caution note, key concern, investor question) based only on the supplied metrics. 6. Logs flagged candidates to a Google Sheets “Risk Results” tab and inserts the full analysis record into a Supabase table, then compiles a sorted weekly risk digest. 7. Sends the weekly digest to a Slack channel and to a Gmail recipient, or sends a “no-risk” digest if no candidates meet the risk threshold. Setup 1. Create and connect Google Sheets credentials, then update the Spreadsheet ID and ensure the Watchlist sheet includes at least symbol and enabled columns (plus optional companyname, sector, and notes). 2. Configure the dividend calendar and fundamentals HTTP endpoints (replace the mock URLs) so they return the expected fields (for example symbol, exdividenddate, dividendyield, payoutratio, earningsgrowth, revenuegrowth, dividendgrowth, and dividendcutslast5years). 3. Add Supabase credentials and ensure a dividendriskanalysis table exists with columns matching the fields being inserted. 4. Add an OpenAI API credential and confirm the selected model is available for generating the high-risk explanations. 5. Add Slack and Gmail credentials, then set the target Slack channel and recipient email address for the weekly digest. Additional info How To Customize Nodes Watchlist Configuration Modify the Read Dividend Watchlist and Prepare Watchlist Context nodes if the spreadsheet structure changes. The enabled-record logic is contained in Prepare Watchlist Context. Dividend Data Sources Modify Get Upcoming Ex-Dividend Data1 and Get Dividend Fundamentals1 when replacing the configured HTTP endpoints with another data provider. Make sure the replacement API returns the fields required by the downstream Code nodes. Sustainability Calculation Customize Calculate Dividend Sustainability1 if the scoring methodology needs to change. The current calculation considers: Payout ratio Earnings growth Revenue growth Dividend growth Dividend cuts during the last five years Risk Calculation Customize Calculate Yield Trap Risk1 to change the risk scoring methodology or risk-level boundaries. The current threshold for further analysis is configured in Risk Above Threshold. Red Flags Modify Identify Yield Trap Red Flags1 when adding or removing dividend sustainability warning conditions. AI Analysis Modify Message a model to change the OpenAI model or adjust the generated caution analysis. The expected output structure should remain compatible with Normalize AI Response. Storage Modify Log Flagged Risks to Google Sheets if the Risk Results spreadsheet structure changes. Modify Store Flagged Risks in Supabase if the Supabase table or database field names change. Notifications Modify the Slack and Gmail nodes if the notification destination changes. The workflow currently sends separate notifications for flagged-risk and no-risk executions. Add-ons The workflow can be extended with additional capabilities while keeping its current processing structure. Real Market Data Integration Replace the configured HTTP endpoints with a production dividend calendar and fundamentals provider. Histori

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.