📈 Score macro news impact with Groq, SerpAPI, Google Sheets and Gmail

⚡ 16 views · 📈 Crypto Trading & Stock Market

Description

Macro News: AI-Driven Market Impact Scoring Automation

This workflow is a high-precision financial intelligence engine that monitors macroeconomic news to identify high-impact trading opportunities. It retrieves real-time data via SerpAPI, processes it through a dual-layered engine—combining a custom weighted Rule Engine with Groq-powered AI analysis—to calculate a final “Market Impact Score”. By filtering out noise and focusing only on high-confidence signals, it stores critical events in Google Sheets and delivers formatted trade bias alerts (Forex, Crypto, Stocks) directly to your inbox.

Quick Implementation Steps

What It Does

The workflow automates the end-to-end lifecycle of macro-fundamental analysis. It begins by fetching a library of “Macro Rules” from your Google Sheet, which acts as the DNA for your scoring logic. It then scouts for the latest news on topics like GDP, Inflation and Central Bank decisions. To ensure you aren’t buried in repetitive data, a normalization script creates a unique fingerprint for every article, allowing a deduplication filter to ignore any story you have already processed.

Once a fresh article is identified, it enters the dual-engine analysis phase. First, a JavaScript-based Rule Engine scans the text for your predefined keywords and tallies a weighted base score. Second, the Groq LLM Engine performs a deep qualitative analysis to determine market sentiment, affected asset classes and specific trade biases.

In the final stage, the workflow synthesizes these two perspectives into a “Final Impact Score”. It applies a mathematical boost to high-confidence AI signals and identifies articles that cross a specific “High Impact” threshold (defaulting at 90+). These elite signals are archived in your database and immediately dispatched as a professional HTML alert to your Gmail.

Who It’s For

Requirements to use this workflow

How It Works & Setup Guide

1. The Rules Engine (Precondition)

Before starting, prepare a Google Sheet named Macro Rules. It must have the following headers:

2. Geographic & Query Configuration

The Fetch Macro News node is currently set to India (gl=in). You can change this to us (United States), gb (United Kingdom) or any other region code supported by SerpAPI to pivot your market focus.

3. Deduplication & Throttling

The workflow uses a Normalize & Generate News ID node to hash article titles. The Rate Limit node adds a necessary 5-second pause before calling the AI to ensure you don’t hit rate limits on your Groq account.

4. Final Scoring Logic

The Calculate Final Score node combines the Rule Score + AI Confidence + Impact Boost. The Assign Final Impact Level node then classifies anything with a score of 90 or higher as “High Impact,” which triggers the final alert. You can lower this number in the code if you want more frequent, lower-sensitivity alerts.

How To Customize Nodes

Add‑ons

Use Case Examples

Troubleshooting Guide

IssuePossible CauseSolution
No news is fetchedSerpAPI key is empty or invalidEnter your SerpAPI key in the Fetch Macro News query parameters.
Duplicate alerts sentID column missing in sheetEnsure your Fetch Existing News sheet has an “ID” column for comparison.
AI node errorGroq rate limitsIncrease the Rate Limit wait time or check your Groq API usage.
Scores are too lowWeighted rules are too conservativeIncrease the “Weight” values in your Macro Rules spreadsheet.

Need Help?

Creating a custom market-scoring engine requires a perfect blend of financial logic and technical automation. If you need assistance fine-tuning your rules engine, modifying the AI trade bias or scaling this to multiple global markets, our n8n automation workflow experts are ready to support you.

Contact WeblineIndia to help you build, customize or scale your professional financial automations today!

🔗 Nodes Used

Google Sheets, HTTP Request, Gmail, Basic LLM Chain, Structured Output Parser, Groq Chat Model

đŸ“„ Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup