Daily AI-Powered Google Alerts Digest Generation - n8n Workflow

Automate your market research using this n8n workflow. It scrapes Google Alerts, uses Gemini AI for concise summarization, and delivers a single, sorted daily news digest via Gmail.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Market Researchers: Individuals needing competitive intelligence compiled daily.
Executives & Managers: Professionals who require quick, summarized briefings without sorting through dozens of emails.
Content Curators: Users looking to efficiently monitor brand mentions or industry news.
n8n Users: Developers seeking advanced n8n templates combining web scraping, AI, and Gmail automation.

Overview

Drowning in dozens of daily Google Alert emails is inefficient. This sophisticated n8n workflow solves the information overload problem by creating a fully autonomous, AI-powered news digest system. This powerful n8n workflow operates completely serverless, handling ingestion, cleaning, summarization, and delivery. It uses specific n8n nodes for scraping and cleansing content, ensuring high-quality input for the Google Gemini model. By automating this process, you save hours daily and ensure you receive one clean, organized email containing all necessary summaries, making this one of the most practical n8n templates available for media monitoring.

How it Works

This n8n workflow is designed to run daily, typically starting with a Schedule or Cron n8n trigger (though set to Manual for testing).


  1. Ingestion: The n8n trigger initiates the process. The Gmail n8n node fetches all unread emails from the Google Alerts sender.

  2. Extraction & Cleaning: An Aggregate n8n node combines the HTML bodies. A subsequent Code n8n node, "Extract Links and Topics," meticulously parses this HTML to identify topic headings and clean the embedded Google tracking links, producing clean source URLs.

  3. Scraping: The HTTP Request n8n node visits each clean URL to scrape the raw web page content.

  4. Pre-processing for AI: The content is passed through a Set n8n node to define the maximum trim length, followed by a Code n8n node ("Clean HTML Tags") which strips scripts, ads, and excessive formatting, optimizing the content for lower token costs and better AI comprehension.

  5. AI Summarization: The "Create Summary" n8n node utilizes the Google Gemini API (via the lmChatGoogleGemini n8n node and a structured Output Parser) to analyze the cleaned text and generate a concise 2-4 sentence summary, strictly enforcing a reliable JSON output format.

  6. Compiling the Digest: The individual summary, topic, and link are mapped together. All resulting items are aggregated into a single list.

  7. HTML Generation: A final Code n8n node ("Create HTML template") dynamically builds a professional, responsive HTML table, sorting the news alphabetically by topic for clarity.

  8. Delivery & Cleanup: The final digest is sent via a Gmail n8n node. Crucially, the original Google Alert emails are then marked as "read" using a separate Gmail n8n node to prevent them from being re-processed during the next run of this n8n workflow.

Installation Guide

To deploy this powerful n8n workflow, follow these steps:


  1. Import Template: Copy the entire JSON code provided and paste it into your n8n canvas using the 'New' -> 'Import from JSON' option. This imports the complete n8n template.

  2. Gmail Credentials: You need to configure an OAuth2 credential for Gmail. This credential must allow permissions for reading emails (for "Get Google Alerts") and sending emails (for "Send Google Alert Summary" and "Mark Alert as read"). Update the credentials field in the three Gmail n8n node instances.

  3. Google Gemini Credentials: Configure a credential for the Google Gemini (PaLM) API. This is required for the "Google Gemini Chat Model" n8n node to perform summarization.

  4. Recipient Setup: In the "Send Google Alert Summary" n8n node, update the sendTo field with your desired recipient email address ([email protected]).

  5. Trigger Setup: Replace the initial "When clicking ‘Execute workflow’" n8n trigger with a Schedule n8n trigger (e.g., set to run daily at 7:00 AM) for automated execution.

  6. Testing: Execute the n8n workflow manually to ensure all scraping, AI, and delivery steps function correctly before activating the permanent schedule.

Node Details

Manual Trigger (When clicking ‘Execute workflow’): Acts as the starting n8n trigger for testing. Should be replaced by a Schedule n8n trigger for production use.
Gmail (Get Google Alerts): This essential n8n node filters for unread emails sent by [email protected].
Code (Extract Links and Topics): A highly customized n8n node using JavaScript regex to separate topics and decode the redirect links provided by Google Alerts, ensuring reliable scraping.
HTTP Request (Get Website Content): Fetches the raw HTML content of the article source link extracted in the previous step. It is configured to continue on error (onError: continueErrorOutput) in case a link is broken.
Code (Clean HTML Tags, newlines and trim text1): This critical n8n node sanitizes the scraped HTML, removing scripts and styles, and converts the content into clean plaintext, trimming the output to 300,000 characters to optimize AI usage.
AI Agent (Create Summary): The central processing n8n node. It uses a defined system prompt and the Google Gemini Chat Model n8n node to produce a concise summary of the cleaned text.
Structured Output Parser: Ensures the AI Agent returns data in the specific JSON structure needed for the subsequent steps of the n8n workflow.
Code (Create HTML template and sort by topic): A comprehensive n8n node responsible for generating the final, styled, and alphabetically sorted HTML report body.
Gmail (Send Google Alert Summary): Sends the finished HTML digest to the recipient. This finalizes the n8n workflow.
Gmail (Mark Alert as read): Cleans up the inbox by marking the originally fetched emails as read.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by

Featured*