Templates / Summarize regulatory news from NewsAPI with Gemini and Google Sheets plus error alerts

Summarize regulatory news from NewsAPI with Gemini and Google Sheets plus error alerts

Ready for 3.0

by WeblineIndia ✓ · 33 views · created 2026-04-27 · Market Research, 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 (12)

Google GeminiGoogle SheetsGmail

What it does

News Intelligence Workflow using NewsAPI, AI Model, Google Sheets & Error Alerts This workflow automatically fetches news articles from NewsAPI, processes them using an AI model to generate summaries and key regulatory changes and stores both raw and processed data into Google Sheets. It also includes centralized error handling with email alerts for monitoring failures. Quick Implementation Steps 1. Signup / Login to your n8n account 2. Add your NewsAPI key in the configuration node. 3. Set your Google Sheet ID and ensure required columns exist. 4. Update the search query (e.g., regulation, finance, etc.). 5. Configure email recipient for error alerts (optional). 6. Execute using the Manual Trigger node. 7. Review results in Google Sheets. What It Does This workflow automates the process of collecting and analyzing news articles. It starts by fetching the latest news based on a defined keyword using NewsAPI. The fetched data is cleaned, sorted and filtered to ensure only relevant and valid articles are processed further. Each article is then processed individually in a controlled loop to avoid API rate limits. The workflow stores raw article data into Google Sheets for reference and backup. It then uses an AI model to generate a concise summary and extract key regulatory or policy changes from each article. Finally, the structured AI output is formatted and updated back into the same Google Sheet. The workflow also includes a high-level error handling mechanism that collects errors from multiple nodes, formats them and sends email alerts for easier monitoring and debugging. Who It's For - Business analysts tracking regulatory updates - Compliance and legal teams - Data analysts and automation engineers - News aggregation platforms - Anyone looking to automate news monitoring and summarization Requirements To use this workflow, you need: - n8n account - NewsAPI account and API key - Google Sheets account with OAuth credentials configured in n8n - A Google Sheet with the following columns: - Title - Source - PublishedAt - Content - Summary - Key Changes - (Optional) Gmail account connected for error alerts How It Works & Setup Instructions 1. Trigger the Workflow - Uses Manual Trigger node for execution. - Ideal for testing; can be extended later. 2. Configure Variables - In Workflow Config & Variables node: - Add newsApiKey - Set searchQuery (default: regulation) - Define maxArticlesToFetch - Set loopWaitSeconds - Add googleSheetId - Configure API timeout and headers if needed 3. Fetch News Data - HTTP Request Node calls NewsAPI using: - Query keyword - Sorting (publishedAt) - API key authentication 4. Preprocess Articles - Code Node (Python): - Sorts articles by date - Filters invalid entries - Extracts required fields (title, content, source, etc.) 5. Limit Articles - Limit Node restricts number of articles processed. 6. Store Raw Data - SplitInBatches + Wait + Google Sheets (Append): - Stores raw articles into the same sheet - Adds delay to avoid rate limits 7. Validate & Loop - IF Node filters valid articles - SplitInBatches processes one article at a time 8. AI Processing - AI Node: - Generates: - Summary (max 60 words) - Key regulatory changes - Ensures strict structured output 9. Format Output - Code Node (JavaScript): - Extracts summary and key changes - Cleans and structures AI output 10. Update Sheet - Google Sheets (Update): - Updates existing rows based on Title - Adds Summary and Key Changes 11. Error Handling - Errors from multiple nodes are: - Collected via Merge Node - Formatted using Set Node - Delayed using Wait Node - Sent via Email Node How To Customize Nodes - Search Query Change config.searchQuery to track different topics (e.g., AI, finance, crypto). - Article Limit Adjust config.maxArticlesToFetch to process more or fewer articles. - Delay Timing Modify config.loopWaitSeconds to control API rate limits. - AI Prompt Customize the prompt in AI node to extract different insights. - Google Sheet Mapping Add/

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.