Files & Documents

Extract Gmail attachments, analyze content, and organize in spreadsheets

17 nodes 106 69 Automatic trigger
Download

Workflow Description

Automates receipt of new Gmail messages with attachments, extracts files automatically, analyzes content using AI, organizes files in Google Drive, and logs structured data to Google Sheets for easy review and reporting.

How it works

  1. 1.Detect new Gmail messages with file attachments
  2. 2.Extract and upload files directly to Google Drive
  3. 3.Analyze document content using OpenAI models
  4. 4.Parse and structure extracted data fields
  5. 5.Insert organized records into Google Sheets

Use cases

  • Processing invoices and receipts sent via email
  • Organizing HR reports and personnel documents
  • Categorizing contracts and financial agreements
  • Extracting pricing data from PDF price lists

Requirements

  • Active Gmail account with API access permissions
  • Google Drive and Google Sheets accounts configured
  • Valid OpenAI API key with appropriate credits
  • Email filters set up to identify target messages

Service Value

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

Apps Used

Gmail Google Drive OpenAI Output Parser Google Sheets LLM Chain

Details

Trigger Automatic trigger
Nodes 17
Apps 6
Views 106
Downloads 69

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

/

Sticky Note

Sticky Note

#1

Gmail Trigger1

Gmail

#2

Setup1

Set

#3

Upload PDF to Drive1

HTTP Request

#4

Rename file1

Google Drive

#5

Move to the correct folder1

Google Drive

#6

Gmail

Gmail

#7

Extract from File2

Extract From File

#8

Google Drive

Google Drive

#9

OpenAI Model

OpenAI

#10

Structured Output Parser

Output Parser Structured

#11

Append to Reconciliation Sheet

Google Sheets

#12

Sticky Note2

Sticky Note

#13

Map Output

Set

#14

Apply Data Extraction Rules

LLM Chain

#15

Sticky Note6

Sticky Note

#16

Only invoice mails with attachments

If

#17