Files & Documents

Extract PDF attachments from Gmail and save to Google Drive

18 nodes 160 123 Automatic trigger
Download

Workflow Description

Automation that monitors incoming Gmail messages with PDF attachments, analyzes their content using OpenAI to extract key information, then automatically stores selected files in Google Drive with organized documentation.

How it works

  1. 1.Receive Gmail notification with PDF attachments
  2. 2.Read and analyze PDF content through OpenAI processing
  3. 3.Save identified files to Google Drive with extracted metadata

Use cases

  • Automatically archive invoices and contracts received via email
  • Store incoming reports with AI-generated summaries for easy retrieval

Requirements

  • Active Gmail account with attachment access permissions
  • Google Drive account for file storage
  • Valid OpenAI API key

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 160
Downloads 123

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