⚡ Create daily newsletter digests from Gmail using GPT-4.1-mini

1,522 views · ⚡ Personal Productivity

Description

Summary

Every day at a set time, this workflow fetches yesterday’s newsletters from Gmail, summarizes each email into concise topics with an LLM, merges all topics, renders a clean HTML digest, and emails it to your inbox.

What this workflow does

Apps and credentials

Typical use cases

How it works (node-by-node)

Node map

NodeTypePurpose
Schedule TriggerTriggerRun at a specific time each day
Get many messagesGmail (getAll)Search emails since yesterday with filters
Loop Over ItemsSplit in BatchesIterate messages one-by-one
Get a messageGmail (get)Fetch full message payload
Get message dataCodeExtract HTML/subject/from/date; normalize sender and date
CleanCodeReformat date and forward fields to LLM
Message a modelOpenAISummarize email into JSON topics
MergeCodeMerge topics from all emails
Create templateCodeRender a styled HTML email digest
Send a messageGmail (send)Deliver the digest email

Before you start

Setup instructions

  1. Schedule
  1. Gmail
  1. OpenAI

How to use

Customization ideas

Limits and notes

Privacy and safety

Sample output (email body)

Tips and troubleshooting

Tags

Changelog

🔗 Nodes Used

Gmail, Schedule Trigger, OpenAI

📥 Import

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

📖 Importing guide · 🔑 Credential setup