AI Email Summary Agent with n8n & OpenAI
Integrates with:
Overview
Unlock Effortless Daily Email Oversight with this AI Agent
This n8n AI Agent acts as your personal email assistant. It connects to your Gmail account, fetches emails from the last 24 hours, then employs OpenAI's gpt-4o-mini to intelligently summarize them. The agent identifies key details, pinpoints potential issues, and extracts actionable items, delivering a concise HTML report to your inbox or team. Start your day informed and focused, without the email overwhelm.
Key Features & Benefits
- AI-Driven Summarization: Leverages OpenAI (gpt-4o-mini) to understand email content and provide concise summaries with action items.
- Scheduled Operation: Runs automatically every day (default: 7 AM) to process new emails.
- Targeted Email Fetching: Retrieves emails from the past 24 hours. The Gmail query can be customized for specific needs.
- Structured AI Output: OpenAI is prompted to return a specific JSON structure containing summaries and actions, ensuring consistent data for the report.
- Formatted HTML Reports: Delivers summaries in an easy-to-read, well-styled HTML email format.
- Time-Saving Automation: Frees you from manually sifting through daily emails.
- Enhanced Productivity: Quickly grasp essential information and prioritize your day.
- Configurable Reporting: Easily set recipients for the daily summary email.
Use Cases
- Getting a daily overview of important client communications.
- Tracking project updates from team emails.
- Summarizing customer feedback or support requests received overnight.
- Monitoring specific inboxes for urgent alerts or opportunities.
- Providing a daily briefing for busy executives or solopreneurs.
Prerequisites
- An n8n instance (Cloud or self-hosted).
- OpenAI API Key with access to a model like gpt-4o-mini or similar.
- Gmail credentials (OAuth2 setup required in n8n) with permissions to read and send emails.
Setup Instructions
- Download the n8n workflow JSON file.
- Import the workflow into your n8n instance.
- Configure the 'Fetch Emails - Past 24 Hours' (Gmail) node:
a. Authenticate your Gmail account.
b. Crucially, modify the query in the 'Filters' section (parameter
q
). The default isisb.quantana@quantana.in after:${...}
. You MUST changeisb.quantana@quantana.in
to your own email address, or to a different query logic (e.g.,label:inbox after:${...}
) to fetch relevant emails for the authenticated account. - Configure the 'Summarize Emails with OpenAI - Morning' (OpenAI) node:
a. Enter your OpenAI API Key.
b. Optionally, adjust the model (default
gpt-4o-mini
) or the prompt to refine summaries based on your needs. - Configure the 'Send Summary - Morning' (Gmail) node:
a. Ensure the correct Gmail account is selected for sending (should be the same as the fetching account or another authenticated account).
b. Update the
sendTo
field with your desired recipient email address(es). c. Optionally, update theccList
field for CC recipients. d. Customize the email subject or HTML body if desired. - Adjust the 'Daily 7AM Trigger' node if you prefer a different time for the workflow to run (timezone is set to Asia/Kolkata in the workflow settings, adjust if necessary).
- Activate the workflow.
Want your own unique AI agent?
Talk to us - we know how to build custom AI agents for your specific needs.
Schedule a Consultation