Generate Gmail draft responses powered by OpenAI Assistant
Workflow Description
Scheduled automation that retrieves incoming Gmail messages and generates suggested responses using OpenAI, then creates draft emails ready for review before sending—eliminating manual reply composition.
How it works
- 1.Retrieve new messages from Gmail via scheduled trigger
- 2.Batch process messages to handle multiple emails efficiently
- 3.Send each message to OpenAI for intelligent response generation
- 4.Format and create draft replies directly in Gmail inbox
Use cases
- Respond to frequent customer inquiries faster and consistently
- Create initial drafts that maintain your tone for final review
- Reduce manual email composition workload for support teams
Requirements
- Active Gmail account with API access enabled
- Valid OpenAI API key with sufficient quota
- Scheduled trigger configured for daily or weekly runs
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 (23)
Convert raw to base64
Code
Add email draft to thread
HTTP Request
Remove AI label from email
Gmail
Schedule trigger (1 min)
Schedule Trigger
Map fields for further processing
Set
Convert response to HTML
Markdown
Build email raw
Set
Sticky Note
Sticky Note
Sticky Note2
Sticky Note
Sticky Note1
Sticky Note
Sticky Note4
Sticky Note
Sticky Note5
Sticky Note
Sticky Note7
Sticky Note
Sticky Note8
Sticky Note
Sticky Note9
Sticky Note
Get threads with specific labels
Gmail
Ask OpenAI Assistant
OpenAI
Loop over threads
Split In Batches
Get thread messages
Gmail
Return last message in thread
Limit
Get single message content
Gmail
Sticky Note10
Sticky Note
Sticky Note11
Sticky Note