Communication

Analyze documents and extract text with advanced AI processing

54 nodes 356 136 Webhook
Download

Workflow Description

Intelligent workflow that receives documents via email, analyzes content using OpenAI language models, classifies and extracts key data, stores results in Google Sheets, archives files in Google Drive, and sends summaries via Telegram notifications.

How it works

  1. 1.Receive documents through webhook and Gmail with automatic triggering
  2. 2.Process text analysis and classification using LLM chains and OpenAI models
  3. 3.Extract and structure key information, storing results in Google Sheets and Drive
  4. 4.Send notifications and summaries to Telegram for real-time alerts

Use cases

  • Automatically process invoices and contracts, extracting vendor names, amounts, and dates
  • Categorize incoming emails by type and priority, organizing documents systematically
  • Summarize reports and research documents, distilling key insights from lengthy content

Requirements

  • Active Gmail account with API access enabled and proper authentication
  • Valid OpenAI API key for accessing language models and analysis capabilities
  • Google account with write and read permissions for Sheets and Drive integration
  • Telegram bot token or channel ID for sending notifications and alerts

Service Value

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

Apps Used

Gmail LLM Chain OpenAI Google Sheets Google Drive Telegram If

Details

Trigger Webhook
Nodes 54
Apps 7
Views 356
Downloads 136

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

/

Webhook

Webhook

#1

Gmail

Gmail

#2

Gmail Trigger

Gmail

#3

Limit

Limit

#4

Get Message

Gmail

#5

Sticky Note

Sticky Note

#6

Parse Document with LlamaParse

HTTP Request

#7

Summarize Email

LLM Chain

#8

gpt-4o-mini

OpenAI

#9

Save LlamaParse ID and Summary to Google Sheets

Google Sheets

#10

Save Document to Google Drive

Google Drive

#11

Extract Invoice Details as JSON

LLM Chain

#12

gpt-4o-mini1

OpenAI

#13

gpt-4o-mini2

OpenAI

#14

Update Google Sheet by LlamaParse ID

Google Sheets

#15

Invoice Details

Set

#16

Prepare Message

Set

#17

Send Invoice Details as Telegram Message

Set

#18

gpt-4o-mini3

OpenAI

#19

Send Error Message 2

Set

#20

Send Error Message 1

Set

#21

Send Document Summary as Telegram Message

Set

#22

Summarize Document

LLM Chain

#23

Classify Parsed Document

If

#24

Get Parsed Markdown

Set

#25

Prepare Data

Set

#26

HTTP Request

HTTP Request

#27

Is there an Email Attachement

If

#28

Aggregate

Aggregate

#29

Edit Fields

Set

#30

Merge Email Processing

Merge

#31

Merge

Merge

#32

If Supported File Extensions

If

#33

No Operation, do nothing

No Op

#34

No Operation, do nothing1

No Op

#35

Sticky Note1

Sticky Note

#36

Sticky Note2

Sticky Note

#37

Sticky Note3

Sticky Note

#38

Sticky Note4

Sticky Note

#39

Sticky Note5

Sticky Note

#40

Sticky Note9

Sticky Note

#41

Sticky Note8

Sticky Note

#42

Sticky Note6

Sticky Note

#43

Sticky Note7

Sticky Note

#44

Sticky Note10

Sticky Note

#45

Sticky Note11

Sticky Note

#46

Sticky Note12

Sticky Note

#47

Sticky Note13

Sticky Note

#48

Sticky Note14

Sticky Note

#49

Sticky Note15

Sticky Note

#50

Sticky Note16

Sticky Note

#51

Sticky Note17

Sticky Note

#52

Save Summarized Document to Google Drive

Google Drive

#53

Save Parsed Document to Google Drive

Google Drive

#54