Developer & DevOps

Send an email response on ChatGPT and save the responses to Google Sheets

49 nodes 218 141 Automatic trigger
Download

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. 1.Trigger on incoming email received in Gmail inbox
  2. 2.Send email content to OpenAI API to generate an appropriate response using ChatGPT
  3. 3.Compose and send an automated reply email to the original sender
  4. 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

OpenAI Gmail Google Sheets

Details

Trigger Automatic trigger
Nodes 49
Apps 3
Views 218
Downloads 141

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (49)

/

Generate reply

OpenAI

#1

On email received

Gmail

#2

Only continue for specific emails

If

#3

Configure

Set

#4

Note5

Sticky Note

#5

Send reply to recipient

Gmail

#6

Generate UUID

Crypto

#7

Thanks for your response!

HTML Page

#8

Extract message content (advanced)

Code

#9

If spreadsheet doesn't exist

If

#10

Successfully created or updated row

No Op

#11

Note1

Sticky Note

#12

Note2

Sticky Note

#13

Note3

Sticky Note

#14

Create spreadsheet

Google Sheets

#15

Store spreadsheet ID

Code

#16

Paste data

Google Sheets

#17

If no sheet IDs

If

#18

Create or update rows

Google Sheets

#19

Get data from `Format data`

Code

#20

Get data from `Format data` node

Code

#21

Format data

Set

#22

Send email reply

No Op

#23

On feedback given

Webhook

#24

Send feedback for fine-tuned data

Google Sheets

#25

Show HTML page

Webhook

#26

Get sheet IDs #1

Code

#27

Note

Sticky Note

#28

If no spreadsheet in configuration #2

If

#29

Store specific sheet IDs #2

Code

#30

Get sheet IDs #2

Code

#31

If no spreadsheet in configuration #1

If

#32

Store specific sheet IDs #1

Code

#33

Email template

HTML Page

#34

Record feedback

No Op

#35

Fallback route

No Op

#36

Identify trigger #2

Set

#37

Identify trigger #1

Set

#38

Do not send unfinished email reply

No Op

#39

If reply is complete

If

#40

Sticky Note

Sticky Note

#41

Do not send email to this recipient

No Op

#42

Send reply to database

No Op

#43

Sticky Note1

Sticky Note

#44

Determine which trigger ran

Switch

#45

Sticky Note2

Sticky Note

#46

Is text within token limit?

If

#47

Do nothing

No Op

#48

Sticky Note3

Sticky Note

#49