Extract Gmail messages and organize them in Google Drive automatically
Workflow Description
An automation that monitors incoming Gmail messages, analyzes them using an AI agent powered by OpenAI, extracts key information, and automatically organizes them into formatted files in Google Drive—all without manual intervention required.
How it works
- 1.Monitor new Gmail messages in real-time
- 2.Analyze message content using an OpenAI-powered AI agent
- 3.Extract critical data points from each email
- 4.Generate structured summaries in Markdown format
- 5.Save organized summaries and attachments to Google Drive
- 6.Share archive links via Twitter/X for reference
Use cases
- Automatically archive important emails with extracted key information
- Create organized client communication records in cloud storage
- Generate intelligent email reports without manual processing effort
Requirements
- Active Gmail account with API access enabled
- OpenAI API key for AI agent functionality
- Google Drive account with sufficient storage
- Twitter/X account optional for sharing links
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (25)
When Executed by Another Workflow
Execute Workflow Trigger
Sticky Note10
Sticky Note
Create YouTube API URL
Code
Get YouTube Video Details
HTTP Request
Merge YouTube Details & Transcript
Merge
Create One JSON Object
Aggregate
Workflow Variables
Set
Sticky Note12
Sticky Note
Sticky Note14
Sticky Note
Sticky Note15
Sticky Note
Combine Comments
Summarize
Split Out Comments
Split Out
Get YouTube Video Comments
HTTP Request
When clicking ‘Test workflow’
Manual Trigger
Create YouTube API URL for Comments
Code
Gmail Report
Gmail
Sticky Note
Sticky Note
gpt-4o-mini
OpenAI
Sticky Note1
Sticky Note
Markdown to HTML
Markdown
YouTube Video Report Agent
Agent
Sticky Note2
Sticky Note
Get Video Comments with Pagination
Code
Save Report to Google Drive
Google Drive
Sticky Note4
Sticky Note