Developer & DevOps

Analyze incoming emails with AI and save results to spreadsheets

49 nodes 288 148 Automatic trigger
Download

Workflow Description

An advanced automation that receives emails, analyzes them using OpenAI to extract key information, and automatically records results in Google Sheets. Includes optional reply functionality for confirmations. Ideal for automating email processing and data organization workflows.

How it works

  1. 1.Receive new emails triggered from Gmail inbox
  2. 2.Send email content to OpenAI for intelligent analysis and processing
  3. 3.Extract and record analyzed data in Google Sheets
  4. 4.Send automated reply confirmation to the sender (optional)

Use cases

  • Automatically categorize and analyze customer inquiries
  • Document and process important emails in a centralized spreadsheet
  • Extract sales orders or request data from incoming messages
  • Provide automated responses based on email content patterns

Requirements

  • Gmail account with full API access permissions
  • OpenAI API key for content analysis
  • Pre-configured Google Sheets table to receive data
  • Authorization for the automation to access your accounts

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 288
Downloads 148

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