Block 1 - loop_over_tickers
- Type / Role
- n8n-nodes-base.splitInBatches - splitInBatches
- Config choices
- Version 3
Overview This is a production grade, fully automated stock analysis system built entirely in n8n. It combines institutional level financial analysis, dual AI model consensus, and a self improving b...
n8n-nodes-base.splitinbatches, n8n-nodes-base.googlesheets, n8n-nodes-base.scheduletrigger, n8n-nodes-base.stickynote, n8n-nodes-base.merge, n8n-nodes-base.xml, n8n-nodes-base.if, n8n-nodes-base.set
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Mo AlBarrak.
Original n8n.io sourceOverview This is a production-grade, fully automated stock analysis system built entirely in n8n. It combines institutional-level financial analysis, dual AI model consensus, and a self-improving backtesting loop — all running on autopilot, every single day.
Every morning, the engine screens the US stock market, collects deep financial data, reads the latest news, and sends two independent AI analysts (GPT-4o and Gemini 2.5 Pro) to debate each stock. When they disagree, a structured bull-vs-bear tiebreaker is triggered. The result: a daily ranked list of BUY, HOLD, and SELL signals — with price targets, confidence scores, and risk assessments — delivered straight to your Telegram.
A companion backtesting workflow runs silently in the background, grading every past signal 7 days after it was issued and sending you a weekly performance report every Monday morning.
This is not a toy workflow. This is the kind of system that would cost thousands of dollars to build as a SaaS — running entirely on your own infrastructure.
✨ What Makes This Template Unique 🤖 Dual AI Consensus Engine — GPT-4o and Gemini 2.5 Pro analyze every stock independently. Their outputs are compared, and consensus is only declared when both models agree within a tight price target band ⚖️ Structured Tiebreaker Architecture — When models disagree, a bull analyst (GPT-4o) and a bear analyst (Gemini) re-run with opposing mandates. The final verdict is derived from their averaged price target plus a Piotroski F-Score gate 📊 Institutional-Grade Financial Modeling — Piotroski F-Score (9-point), Graham Number intrinsic value, DCF anchor, TTM revenue & margins, net debt, FCF, revenue growth YoY, and sector-relative P/E valuation — all computed automatically 📰 Live News Sentiment — Latest headlines per stock are fed into the AI prompt, adjusting confidence scores in real time based on positive or negative sentiment signals 🎯 Scenario Price Targets — Every stock gets three targets: pt_bear (downside), pt_base (fair value), pt_bull (upside case), giving you a full risk/reward picture 🔁 Self-Improving Backtester — Every signal is automatically graded 7 days later. Win rate, average return, and best/worst calls are reported every Monday via Telegram 📡 Smart Screener with Sector Diversity — Scores 100 candidates daily using volume health, market cap sweet spot ($5B–$100B), and beta gradient — with a sector diversity cap so you never end up with 15 tech stocks 💾 Full Google Sheets Audit Trail — Every signal, confidence score, rationale, and outcome is logged permanently for your own review and analysis 📋 Workflow Breakdown Workflow 1 — AI Institutional Stock Valuation Engine Phase What Happens Phase 1 — Screening FMP screener fetches 100 US stocks. Score_and_Prefilter scores and selects the top 20 with sector diversity Phase 2A — Financial Data 13 FMP endpoints per stock: income, balance sheet, cash flow, ratios, profile, sector P/E Phase 2B — News Latest headlines fetched and passed into AI context Phase 3 — AI Round 1 GPT-4o and Gemini 2.5 Pro analyze in parallel. Verdicts and price targets compared Phase 3 — Tiebreaker Bull vs Bear re-analysis when models disagree or price target gap > 25% Phase 4 — Strong Buy Alert Stocks with BUY verdict + upside ≥ 20% + confidence ≥ 65 trigger an immediate alert Phase 5 — Storage & Summary All results written to Google Sheets. Daily Telegram summary sent with top picks Workflow 2 — Signal Outcome Checker & Weekly Backtester Trigger What Happens Daily 8AM Finds signals that are 7 days old, fetches current price, grades WIN / LOSS / NEUTRAL, writes outcome back to sheet Monday 9AM Computes weekly win rate, average return on BUY signals, best and worst call — sends full report to Telegram 🛠️ What You Need Requirement Details FMP API Key Financial Modeling Prep — Starter plan or above (~$25/mo). Covers all financial data, screener, news, and historical prices OpenAI API Key GPT-4o access via API or ChatGPT Plus Google Gemini API Key Gemini 2.5 Pro via Google AI Studio (free tier available) Google Sheets One sheet named Stock_Signals with the column headers listed in the setup guide Telegram Bot Create via @BotFather in 2 minutes. Free n8n Self-hosted or n8n Cloud Estimated running cost: $0.43/day in AI tokens for 20 stocks ($10–$13/month). FMP and Telegram are the only other costs.
⚙️ Setup Time ~30–45 minutes for a first-time setup. All credentials, Sheet IDs, and API keys are clearly labeled in each node. No coding required — every parameter is documented.
📈 Example Daily Telegram Output 📊 Daily Valuation Report — 2026-04-02 Stocks Analyzed: 20
🟢 BUY: 7 🟡 HOLD: 10 🔴 SELL: 3
🚨 STRONG BUY ALERTS: • NVDA — Upside 34% | Confidence 81 | F-Score 7/9 • MSFT — Upside 22% | Confidence 74 | F-Score 8/9
Top Picks:
📊 Example Weekly Backtest Report 📈 Weekly Signal Performance — Week of Mar 31 Signals Graded: 18
✅ Win Rate: 72% | BUY Accuracy: 78% 📈 Avg Return on BUY signals: +4.3%
🏆 Best Call: NVDA +11.2% (BUY ✅) 💔 Worst Call: BA -6.8% (BUY ❌)
💡 Who Is This For? Retail investors who want institutional-quality analysis without paying for a Bloomberg terminal Quantitative traders looking for a customizable, data-driven signal generation pipeline n8n builders who want to see a real-world, production-grade multi-node workflow in action AI enthusiasts interested in multi-model consensus systems and structured debate architectures 📬 Questions, Customizations & Feedback Have a question about setup, want to adapt this workflow to your own strategy, or found something to improve?
All feedback is welcome. If you build something interesting on top of this, I'd love to hear about it.
Built with ❤️ using n8n, Financial Modeling Prep, OpenAI GPT-4o, and Google Gemini 2.5 Pro.
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
Showing the first 24 of 86 workflow blocks. Download the JSON for the full node graph.
| Workflow | Generate daily stock BUY/HOLD/SELL signals with GPT-4o, Gemini, FMP, Sheets and Telegram |
|---|---|
| Complexity | advanced |
| Nodes | 86 |
| Categories | Crypto Trading, AI Summarization |
| Author | Mo AlBarrak |
| Published | 02 Apr 2026 |
Use the JSON export at /data/workflows/14580/14580.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
Overview This is a production grade, fully automated stock analysis system built entirely in n8n. It combines institutional level financial analysis, dual AI model consensus, and a self improving b...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Crypto Trading, AI Summarization use case.