← All N8N workflows
AI & researchAggregateChain LLMGmailGmail TriggerGoogle Drive

✨🔪 Advanced AI Powered Document Parsing & Text Extraction with Llama Parse

Configured with Aggregate, Chain LLM, Gmail, Gmail Trigger, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
TriggerWebhookWebhookMessagingGmailGmailTriggerGmail TriggerGmail TriggerTransformLimitLimitMessagingGet MessageGmailWeb / APIParse Document withLlamaParseHTTP RequestAI & modelsSummarize EmailChain LLMAI & modelsgpt-4o-miniOpenAI Chat ModelData storeSave LlamaParse ID andSummary to Google…Google SheetsFiles / mediaSave Document to GoogleDriveGoogle DriveAI & modelsExtract Invoice Detailsas JSONChain LLMAI & modelsgpt-4o-mini1OpenAI Chat ModelAI & modelsgpt-4o-mini2OpenAI Chat ModelData storeUpdate Google Sheet byLlamaParse IDGoogle SheetsTransformInvoice DetailsEdit FieldsTransformPrepare MessageEdit FieldsMessagingSend Invoice Details asTelegram MessageTelegramAI & modelsgpt-4o-mini3OpenAI Chat ModelMessagingSend Error Message 2TelegramMessagingSend Error Message 1TelegramMessagingSend Document Summaryas Telegram MessageTelegramAI & modelsSummarize DocumentChain LLMAI & modelsClassify ParsedDocumentText ClassifierTransformGet Parsed MarkdownEdit FieldsTransformPrepare DataEdit FieldsWeb / APIHTTP RequestHTTP RequestRoutingIs there an EmailAttachementIfTransformAggregateAggregateTransformEdit FieldsEdit FieldsTransformMerge Email ProcessingMergeTransformMergeMergeRoutingIf Supported FileExtensionsIfRoutingNo Operation, donothingNo OpRoutingNo Operation, donothing1No OpFiles / mediaSave SummarizedDocument to Google…Google DriveFiles / mediaSave Parsed Document toGoogle DriveGoogle Drive

Node categories in this workflow

  • Trigger
  • Messaging
  • Transform
  • Web / API
  • AI & models
  • Data store
  • Files / media
  • Routing

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
WebhookTriggerWebhookSee node parameters
GmailMessagingGmailgetAll
Gmail TriggerTriggerGmail TriggerSee node parameters
LimitTransformLimitSee node parameters
Get MessageMessagingGmailget
Parse Document with LlamaParseWeb / APIHTTP RequestPOST
Summarize EmailAI & modelsChain LLMSee node parameters
gpt-4o-miniAI & modelsOpenAI Chat ModelSee node parameters
Save LlamaParse ID and Summary to Google SheetsData storeGoogle SheetsappendOrUpdate
Save Document to Google DriveFiles / mediaGoogle DriveSee node parameters
Extract Invoice Details as JSONAI & modelsChain LLMSee node parameters
gpt-4o-mini1AI & modelsOpenAI Chat ModelSee node parameters
gpt-4o-mini2AI & modelsOpenAI Chat ModelSee node parameters
Update Google Sheet by LlamaParse IDData storeGoogle Sheetsupdate
Invoice DetailsTransformEdit FieldsSee node parameters
Prepare MessageTransformEdit FieldsSee node parameters
Send Invoice Details as Telegram MessageMessagingTelegramSee node parameters
gpt-4o-mini3AI & modelsOpenAI Chat ModelSee node parameters
Send Error Message 2MessagingTelegramSee node parameters
Send Error Message 1MessagingTelegramSee node parameters
Send Document Summary as Telegram MessageMessagingTelegramSee node parameters
Summarize DocumentAI & modelsChain LLMSee node parameters
Classify Parsed DocumentAI & modelsText ClassifierSee node parameters
Get Parsed MarkdownTransformEdit FieldsSee node parameters
Prepare DataTransformEdit FieldsSee node parameters
HTTP RequestWeb / APIHTTP RequestSee node parameters
Is there an Email AttachementRoutingIfSee node parameters
AggregateTransformAggregateSee node parameters
Edit FieldsTransformEdit FieldsSee node parameters
Merge Email ProcessingTransformMergeSee node parameters
MergeTransformMergeSee node parameters
If Supported File ExtensionsRoutingIfSee node parameters
No Operation, do nothingRoutingNo OpSee node parameters
No Operation, do nothing1RoutingNo OpSee node parameters
Save Summarized Document to Google DriveFiles / mediaGoogle DrivecreateFromText
Save Parsed Document to Google DriveFiles / mediaGoogle DrivecreateFromText

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • gmailOAuth2
  • googleDriveOAuth2Api
  • googleSheetsOAuth2Api
  • httpHeaderAuth
  • openAiApi
  • telegramApi

Workflow notes

Send to LlamaParse

Send to LlamaParse

https://docs.cloud.llamaindex.ai/API/upload-file-api-v-1-parsing-upload-post

Check for Supported File Extension

Check for Supported File Extension

https://docs.cloud.llamaindex.ai/API/get-supported-file-extensions-api-v-1-parsing-supported-file-extensions-get

Get Emails with Attachments

Get Emails with Attachments

☀️Disclaimer

This workflow only processes the the first attachment of the email. Adjust search and limit settings to suit your use case.

Description

Description

This workflow automates document processing using LlamaParse to extract and analyze text from various file formats. It intelligently processes documents, extracts structured data, and delivers actionable insights through multiple channels.

How It Works

Document Ingestion & Processing 📄

  • Monitors Gmail for incoming attachments or accepts documents via webhook
  • Validates file formats against supported LlamaParse extensions
  • Uploads documents to LlamaParse for advanced text extraction
  • Stores original documents in Google Drive for reference

Intelligent Document Analysis 🧠

  • Automatically classifies document types (invoices, reports, etc.)
  • Extracts structured data using customized AI prompts
  • Generates comprehensive document summaries with key insights
  • Converts unstructured text into organized JSON data

Invoice Processing Automation 💼

  • Extracts critical invoice details (dates, amounts, line items)
  • Organizes financial data into structured formats
  • Calculates tax breakdowns, subtotals, and payment information
  • Maintains detailed records for accounting purposes

Multi-Channel Delivery 📱

  • Saves extracted data to Google Sheets for tracking and analysis
  • Sends concise summaries via Telegram for immediate review
  • Creates searchable document archives in Google Drive
  • Updates spreadsheets with structured financial information

Setup Steps

Configure API Credentials 🔑

  • Set up LlamaParse API connection
  • Configure Gmail OAuth for email monitoring
  • Set up Google Drive and Sheets integrations
  • Add Telegram bot credentials for notifications

Customize AI Processing ⚙️

  • Adjust document classification parameters
  • Modify extraction templates for specific document types
  • Fine-tune summary generation prompts
  • Customize invoice data extraction schema

Test and Deploy 🚀

  • Test with sample documents of various formats
  • Verify data extraction accuracy
  • Confirm notification delivery
  • Monitor processing pipeline performance
Extract Invoice as JSON

Extract Invoice as JSON

☀️Update User & System Prompt for Your Specific Use Case

Summarize Document

Summarize Document

☀️Update User & System Prompt for Your Specific Use Case

Classify Parsed Document

Classify Parsed Document

Add More Classifications as Required

✨🔪 Advanced AI Powered Document Parsing & Text Extraction with Llama Parse

✨🔪 Advanced AI Powered Document Parsing & Text Extraction with Llama Parse

Purpose and structure

This folder contains the ✨🔪 Advanced AI Powered Document Parsing & Text Extraction with Llama Parse workflow. Its executable nodes use aggregate, chainLlm, gmail, gmailTrigger, googleDrive, googleSheets, httpRequest, if, limit, lmChatOpenAi, merge, noOp, set, telegram, textClassifier, webhook. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

Webhook, Gmail Trigger

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Telegram/1904_Telegram_Limit_Process_Webhook.json MIT; preserve source notices.

Canvas section labels

These name areas of the original canvas; they do not include explanatory instructions.

  • Save Document to Google Drive
  • Summarize the Email Message
  • Save To Google Sheets
  • 👍Try Me!
  • ✨🔪 Advanced AI Powered Document Parsing & Text Extraction with Llama Parse
  • Example Invoice Processing
  • Example Document Summarizing
  • Parsed Markdown from LlamaParse
  • Receive Parsed Document from LlamaParse
  • 🪝Webhook to Receive LlamaParse Response
  • Save Parsed Document to Google Drive

More in AI & research