AI-Powered Daily Gmail Digest Summary using LangChain & OpenRouter
This n8n template helps you automatically summarize your daily Gmail messages using OpenRouter's GPT model via LangChain. It generates a structured email digest highlighting key information, tasks, issues, and action items — all delivered to your inbox every morning.
Who’s it for
- Busy professionals who want a quick overview of their daily emails
- Founders or managers needing to track team or client communication
- Anyone looking to automate inbox triage and reduce time spent on emails
How it works / What it does
- This n8n workflow runs every morning at 7 AM, automatically:
- Fetches emails from the last 24 hours
- Collects important fields: sender, subject, and snippets
- Feeds them into an AI-powered agent (OpenRouter + LangChain)
- The AI:
- Extracts key topics, tasks, deadlines, and issues
- Formats the info clearly with a bullet-point summary
- Sends the final summarized report to your inbox
How to set up
- Clone or import the workflow into your n8n instance
- Replace <Your Email ID> in the Code node with your actual Gmail address (or remove if not needed)
- Ensure your Gmail and OpenRouter credentials are set up in n8n
- Update the recipient email in the Send Summary node if you want it sent to a fixed address
- Activate the workflow once tested
How to customize the workflow
- Change Summary Style: Edit the system message in the LangChain Agent to match your tone (e.g. casual, business, detailed)
- Adjust Digest Time: Change the Schedule Trigger to any preferred hour
- Customize Recipients: Change or add recipients dynamically or statically in the Gmail send node
- Filter Email Type: Modify the Gmail query in the Code node to include filters like from:, is:unread, subject:project