Skip to main content

Automated email digest from Gmail to Slack with GPT-4o summary

Workflow preview

Workflow preview
100%
Automated email digest from Gmail to Slack with GPT-4o summary preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Who’s it for Teams that start their day in Slack and want a concise, automated summary of yesterday’s emails—ops leads, PMs, founders, and anyone handling busy inboxes without writing code. What it...

Best for

  • Support Chatbot automation workflows
  • AI Summarization automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.stickynote, n8n-nodes-base.gmail, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenrouter, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.code, n8n-nodes-base.slack

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Yusei Miyakoshi.

Original n8n.io source

1.1 Workflow description

Title
Automated email digest from Gmail to Slack with GPT-4o summary
Workflow name
Automated email digest from Gmail to Slack with GPT-4o summary

Who’s it for

Teams that start their day in Slack and want a concise, automated summary of yesterday’s emails—ops leads, PMs, founders, and anyone handling busy inboxes without writing code.

What it does / How it works

Runs every morning at 08:00 (cron 0 0 8 * * *), fetches all emails received yesterday, and routes the result: if none were found, it posts a polite “no emails” notice; if emails exist, it aggregates them and asks an AI agent to produce a structured digest, then formats and posts to your chosen Slack channel. The flow uses Gmail → If → Aggregate (Item Lists) → AI Agent (OpenRouter model with structured output) → Code (Slack formatter) → Slack. A set of sticky notes on the canvas explains each step and required inputs.

How to set up

  1. Connect Gmail (OAuth2) and keep the default date window (yesterday → today at 00:00).
  2. Connect Slack (OAuth2) and select your target channel.
  3. Add OpenRouter credentials and pick a compact model (e.g., gpt-4o-mini).
  4. Keep the provided structured-output schema and formatter code.
  5. Adjust the schedule/timezone if needed (the fallback message includes an Asia/Tokyo example).
  6. Paste this description into the yellow sticky note at the top of the canvas.

Requirements

  • Gmail & Slack accounts with appropriate scopes
  • OpenRouter API key stored in Credentials (no hard-coded keys)
  • n8n Cloud or self-host with LangChain agent nodes enabled

How to customize the workflow

  • Narrow Gmail results with label/search filters (e.g., from:, subject:).
  • Change the digest sections or tone in the AI Agent system prompt.
  • Swap the model for cost/quality needs and tweak temperature/max tokens.
  • Localize dates/timezones in the formatter code and Slack messages.
  • Branch the output to email, Google Docs, or Sheets for archival.

Security & publishing tips

Rename all nodes clearly, do not hardcode API keys, remove real channel IDs/emails before sharing, and group end-user variables in a Set (Fields) node. Keep the sticky notes—they’re mandatory for reviewers.

1.2 Logical Blocks

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.

2. Block-by-Block Analysis

Block 1 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 2 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Gmail - Get Yesterday's Emails

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 4 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - AI Agent - Analyze Emails

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2

Block 6 - OpenRouter Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 7 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 8 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Format for Slack

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Slack - Send Summary

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.2

Block 11 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Item Lists

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 13 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 14 - Slack - No Emails

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.3

3. Summary Table

Workflow Automated email digest from Gmail to Slack with GPT-4o summary
Complexity intermediate
Nodes 14
Categories Support Chatbot, AI Summarization
Author Yusei Miyakoshi
Published 14 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9638/9638.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

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.

Frequently asked questions

What does Automated email digest from Gmail to Slack with GPT-4o summary do?

Who’s it for Teams that start their day in Slack and want a concise, automated summary of yesterday’s emails—ops leads, PMs, founders, and anyone handling busy inboxes without writing code. What it...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

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 Support Chatbot, AI Summarization use case.