Send an email response on ChatGPT and save the responses to Google Sheets
Workflow Description
Automation template that receives incoming emails, processes them through ChatGPT for intelligent response generation, sends replies automatically to the sender, and logs all interactions in Google Sheets for tracking and analysis.
How it works
- 1.Trigger on incoming email received in Gmail inbox
- 2.Send email content to OpenAI API to generate an appropriate response using ChatGPT
- 3.Compose and send an automated reply email to the original sender
- 4.Record sender details, original message, generated response, and timestamp in Google Sheets
Use cases
- Automate customer support responses to common inquiries without manual intervention
- Maintain a centralized log of all email interactions for compliance and performance analysis
Requirements
- Active OpenAI API key with sufficient quota and appropriate model access
- Gmail account connected with permissions to read and send emails
- Pre-configured Google Sheets with defined columns for storing email data
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 (49)
Generate reply
OpenAI
On email received
Gmail
Only continue for specific emails
If
Configure
Set
Note5
Sticky Note
Send reply to recipient
Gmail
Generate UUID
Crypto
Thanks for your response!
HTML Page
Extract message content (advanced)
Code
If spreadsheet doesn't exist
If
Successfully created or updated row
No Op
Note1
Sticky Note
Note2
Sticky Note
Note3
Sticky Note
Create spreadsheet
Google Sheets
Store spreadsheet ID
Code
Paste data
Google Sheets
If no sheet IDs
If
Create or update rows
Google Sheets
Get data from `Format data`
Code
Get data from `Format data` node
Code
Format data
Set
Send email reply
No Op
On feedback given
Webhook
Send feedback for fine-tuned data
Google Sheets
Show HTML page
Webhook
Get sheet IDs #1
Code
Note
Sticky Note
If no spreadsheet in configuration #2
If
Store specific sheet IDs #2
Code
Get sheet IDs #2
Code
If no spreadsheet in configuration #1
If
Store specific sheet IDs #1
Code
Email template
HTML Page
Record feedback
No Op
Fallback route
No Op
Identify trigger #2
Set
Identify trigger #1
Set
Do not send unfinished email reply
No Op
If reply is complete
If
Sticky Note
Sticky Note
Do not send email to this recipient
No Op
Send reply to database
No Op
Sticky Note1
Sticky Note
Determine which trigger ran
Switch
Sticky Note2
Sticky Note
Is text within token limit?
If
Do nothing
No Op
Sticky Note3
Sticky Note