Files & Documents

Analyze Email Attachments with AI and Save Results to Google Drive

18 nodes 282 121 Automatic trigger
Download

Workflow Description

Automatically receive emails, extract PDF attachments, process them through OpenAI for intelligent analysis, and save the results in an organized Google Drive folder. Ideal for document processing workflows that require AI-powered insights.

How it works

  1. 1.Trigger automation when a new email arrives with attachments
  2. 2.Extract and read PDF files from the email message
  3. 3.Send extracted content to OpenAI for analysis and processing
  4. 4.Store analysis results in an organized folder in Google Drive

Use cases

  • Automatically process invoices and contracts to extract key business data
  • Analyze reports sent via email and organize insights in cloud storage

Requirements

  • Active Gmail account with access authorization for messages and attachments
  • OpenAI account with valid API key and sufficient credits
  • Google Drive account with permissions to create folders and files

Service Value

Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.

Apps Used

Read P D F OpenAI Google Drive Gmail

Details

Trigger Automatic trigger
Nodes 18
Apps 4
Views 282
Downloads 121

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 (18)

/

Read PDF

Read P D F

#1

Sticky Note

Sticky Note

#2

Configure

Set

#3

Is PDF

If

#4

Not a PDF

No Op

#5

Is matched

If

#6

This is a matched PDF

No Op

#7

This is not a matched PDF

No Op

#8

Iterate over email attachments

Code

#9

OpenAI matches PDF textual content

OpenAI

#10

Merge

Merge

#11

Upload file to folder

Google Drive

#12

On email received

Gmail

#13

Note5

Sticky Note

#14

Ignore large PDFs

No Op

#15

Is text within token limit?

If

#16

Has attachments?

If

#17

There are no attachments

No Op

#18