Create AI-Summarized Email Digests from Gmail Labels with OpenAI O4-Mini
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
Transform email overload into actionable insights with this automated daily digest workflow that intelligently summarizes categorized emails using AI.
Who's it for
This workflow is perfect for busy professionals, content creators, and newsletter subscribers who need to stay informed without spending hours reading through multiple emails. Whether you're tracking industry news, monitoring competitor updates, or managing content subscriptions, this automation helps you extract key insights efficiently.
How it works
The workflow runs automatically each morning at 9 AM, fetching emails from a specific Gmail label received in the last 24 hours. Each email is processed through OpenAI's language model using LangChain to create concise, readable summaries that preserve important links and formatting. All summaries are then combined into a single, well-formatted digest email and sent to your inbox, replacing dozens of individual emails with one comprehensive overview.
How to set up
Create a Gmail label for emails you want summarized (e.g., "Tech News", "Industry Updates") Configure credentials for both Gmail OAuth2 and OpenAI API in their respective nodes Update the Gmail label ID in the "Get mails (last 24h)" node with your specific label Set your email address in the "Send Digested mail" node Adjust the schedule in the Schedule Trigger if you prefer a different time than 9 AM Test the workflow with a few labeled emails to ensure proper formatting
Requirements
Gmail account with OAuth2 authentication configured OpenAI API account and valid API key At least one Gmail label set up for email categorization Basic understanding of n8n workflow execution
How to customize the workflow
Change summarization style: Modify the prompt in the "Summarization Mails" node to adjust tone, length, or format of summaries. You can make summaries more technical, casual, or focus on specific aspects like action items.
Adjust time range: Change the receivedAfter parameter in the Gmail node to fetch emails from different time periods (last 2 days, last week, etc.).
Multiple labels: Duplicate the Gmail retrieval section to process multiple labels and combine them into categories within your digest.
Add filtering: Insert additional conditions to filter emails by sender, subject keywords, or other criteria before summarization.
Custom formatting: Modify the "Combine Subject and Body" code node to change the HTML structure, add styling, or include additional metadata like email timestamps or priority indicators.
Related Templates
Instagram Full Profile Scraper with Apify and Google Sheets
šø Instagram Full Profile Scraper with Apify and Google Sheets This n8n workflow automates the process of scraping ful...
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
ā” AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
Technology News Workflow Explanation with Key Services
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Auto-Publish Techn...
š Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments