Daily Email Digest Generation using Google Gemini AI - n8n Workflow

Create automated daily email summaries using the powerful Google Gemini model and n8n. This n8n workflow fetches Gmail messages, summarizes key updates, and flags urgent communication.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Individuals or teams overwhelmed by high daily email volumes.
Users looking for advanced n8n templates integrating scheduling, data transformation, and large language models.
Professionals needing a concise, structured daily digest of critical communications.
Developers exploring how to combine the Gmail n8n node with complex AI Agent logic in an n8n workflow.

Overview

Many professionals struggle to manage high email volume, leading to missed deadlines or crucial updates buried in the inbox. This innovative n8n workflow solves this inefficiency by automatically curating a comprehensive daily email summary. It leverages the power of the Google Gemini model within a specialized n8n node (the AI Agent), transforming raw Gmail data into actionable intelligence.

This robust n8n workflow template is scheduled to run every morning, ensuring you receive a focused digest of project updates, urgent requests, and meeting changes. By using date manipulation to define a strict 24-hour window, the workflow ensures relevance. The integration of structured output parsing guarantees the AI's response is immediately usable, making this n8n workflow an essential tool for inbox zero aspirants.

How it Works

The process begins with the Schedule Trigger n8n trigger, configured to run every day at 8 AM. This node initiates the entire n8n workflow execution.


  1. Time Window Calculation: Two subsequent Date & Time nodes are used to define the lookback period. The first node captures the current execution time, and the second calculates the exact timestamp 24 hours prior by subtracting one day. This date is stored for the next step.

  2. Email Retrieval: The Gmail n8n node utilizes the calculated timestamp to fetch all emails received within the last 24 hours (using the receivedAfter filter). All message data, including subject, sender, and body, is collected.

  3. AI Analysis: The collected email JSON data is passed to the AI Agent n8n node. This agent is configured with detailed system instructions: to generate a concise summary of overall themes and to identify and list all important, time-sensitive emails.

  4. Model and Structure: The AI Agent is connected to the Google Gemini Chat Model (using gemini-2.0-flash) and uses a combination of the Structured Output Parser and Auto-fixing Output Parser. This setup forces the AI to adhere strictly to a predefined JSON format, guaranteeing a reliable and predictable summary output ready for the next action (such as sending to Slack or another communication channel). Every step demonstrates effective use of key n8n node capabilities.

Installation Guide

To deploy this powerful n8n workflow template, follow these steps:


  1. Import: Copy the provided JSON code and import it into your n8n instance using the 'New' -> 'Import from JSON' option.

  2. Credentials - Gmail: You must set up or select a valid OAuth2 credential for the Gmail n8n node. Ensure the connected account has the necessary permissions to read emails.

  3. Credentials - Google Gemini: Configure the Google Gemini (PaLM) API credentials for the Google Gemini Chat Model n8n node. This requires an API key from Google AI Studio.

  4. Activate: Once credentials are set for every n8n node, activate the Schedule Trigger n8n trigger. The n8n workflow will begin executing daily at the configured time (8 AM).

Node Details

This n8n workflow utilizes several crucial n8n node types to achieve its goal:

Schedule Trigger (n8n trigger): Sets the automation to run once daily at 8:00 AM, ensuring a timely email digest.
Date & Time / Date & Time1: Used for precise time calculation. The nodes collaborate to determine the starting timestamp for the 24-hour lookback period, which is essential for filtering the Gmail n8n node data.
Gmail (n8n node): Operation is set to getAll. It uses an expression referencing the dynamically calculated date (receivedAfter) to fetch only relevant messages, reducing the payload sent to the AI.
AI Agent (n8n node): The core intelligence of this n8n workflow. It receives the list of emails as input text and is provided a detailed systemMessage defining the two critical tasks: summarizing themes and listing important emails with clear reasons.
Google Gemini Chat Model (n8n node): Provides the language model capability for the AI Agent, configured with a low temperature (0.2) for predictable, factual output using models/gemini-2.0-flash.
Structured Output Parser / Auto-fixing Output Parser (n8n node): These nodes ensure the AI's final output is a strictly formatted JSON object, defining keys like 'summary' and 'important emails'. The auto-fixing functionality adds resilience to the n8n workflow.

Related n8n Workflows

Free

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

Software Engineer

Featured*