β¨πͺ Advanced AI powered document parsing & text extraction with Llama Parse
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
Advanced AI-Powered Document Parsing & Text Extraction with LlamaParse
This n8n workflow demonstrates an advanced method for parsing documents and extracting structured text using the LlamaParse API, triggered by new emails containing attachments or a manual webhook. It intelligently processes documents, classifies their content, and then either saves the extracted data to Google Sheets or sends it via Telegram, based on the classification.
What it does
This workflow automates the following steps:
- Triggers on New Emails or Webhook: It can be initiated either when a new email with an attachment is received in Gmail, or manually via a webhook.
- Downloads Attachments: If triggered by Gmail, it downloads the attached files from the email.
- Parses Documents with LlamaParse: It sends the document attachments to the LlamaParse API for advanced parsing and text extraction.
- Classifies Extracted Text: The extracted text is then fed into a Text Classifier (powered by LangChain and OpenAI) to categorize the document's content.
- Conditional Routing:
- If the document is classified as "Invoice", it extracts specific fields (e.g., invoice number, amount, date) and saves them to a Google Sheet.
- If the document is classified as "Receipt", it extracts relevant details and sends a summary message to a Telegram chat.
- For any other classification, it performs a "No Operation" (effectively ignoring it or allowing for future expansion).
- Merges Paths: After conditional processing, the workflow merges the different execution paths.
- Saves to Google Drive (Optional): If the document was processed, it saves the original attachment to Google Drive.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running instance of n8n.
- Gmail Account: Configured with n8n credentials for the Gmail Trigger node.
- Google Drive Account: Configured with n8n credentials for the Google Drive node.
- Google Sheets Account: Configured with n8n credentials for the Google Sheets node.
- LlamaParse API Key: An API key for the LlamaParse service. This will be used in the HTTP Request node.
- OpenAI API Key: An API key for OpenAI, used by the "OpenAI Chat Model" node within the Text Classifier.
- Telegram Bot Token and Chat ID: Configured with n8n credentials for the Telegram node.
Setup/Usage
- Import the workflow: Download the JSON provided and import it into your n8n instance.
- Configure Credentials:
- For the Gmail Trigger, Google Sheets, and Google Drive nodes, set up your Google OAuth2 credentials.
- For the Telegram node, set up your Telegram Bot API credentials.
- For the HTTP Request node (which interacts with LlamaParse), you will need to add an API key as a header or query parameter, depending on LlamaParse's authentication method.
- For the OpenAI Chat Model node, configure your OpenAI API key.
- Customize LlamaParse HTTP Request:
- Review the "HTTP Request" node. Ensure the URL, headers (including your LlamaParse API key), and body are correctly configured for the LlamaParse API endpoint you intend to use for document parsing.
- Configure Text Classifier:
- Adjust the categories and examples in the "Text Classifier" node to accurately reflect the types of documents you expect and the classifications you want to make (e.g., "Invoice", "Receipt", "Other").
- Set up Google Sheets:
- Create a new Google Sheet with appropriate headers (e.g., "Invoice Number", "Amount", "Date") if you intend to save "Invoice" data. Update the "Google Sheets" node to point to your spreadsheet and worksheet.
- Configure Telegram:
- Ensure the "Telegram" node is configured with the correct Chat ID to send messages to.
- Activate the workflow: Once all credentials and configurations are set, activate the workflow.
The workflow is now ready to automatically process documents from incoming emails or manual triggers, extract information, classify it, and route it to the appropriate destination.
Related Templates
Automate Gmail responses with GPT and human-in-the-loop verification
Try It Out! This n8n template uses AI to automatically respond to your Gmail inbox by drafting response for your approval via email. How it works Gmail Trigger monitors your inbox for new emails AI Analysis determines if a response is needed based on your criteria Draft Generation creates contextually appropriate replies using your business information Human Approval sends you the draft for review before sending Auto-Send replies automatically once approved Setup Connect your Gmail account to the Gmail Trigger node Update the "Your Information" node with: Entity name and description Approval email address Resource guide (FAQs, policies, key info) Response guidelines (tone, style, formatting preferences) Configure your LLM provider (OpenAI, Claude, Gemini, etc.) with API credentials Test with a sample email Requirements n8n instance (self-hosted or cloud) Gmail account with API access LLM provider API key Need Help? Email Nick @ nick@tropicflare.com
Generate AI website legal and accessibility compliance reports with OpenAI, Gmail and Google Drive
Automated Legal & Accessibility Website Compliance Checker Description Automate website compliance checks in minutes using AI-powered analysis. This workflow scans any website for essential legal and accessibility requirements, generates a professional compliance report, delivers it as a PDF, and stores it securely β helping teams identify risks early and stay audit-ready with zero manual effort. --- What This Workflow Does Transforms manual website compliance reviews into a single automated flow: π Capture Website Details β Accepts website URL, company name, and email via webhook. π₯ Fetch Website Content β Securely downloads and cleans website HTML for analysis. π§ AI Compliance Analysis β Uses AI to audit the site against key compliance standards. π Scoring & Insights β Calculates an overall compliance score and highlights gaps. π Generate Visual Report β Builds a detailed, easy-to-read HTML compliance report. π¨οΈ Convert to PDF β Converts the report into a downloadable, shareable PDF. π§ Email Delivery β Sends the compliance report directly to the provided email. βοΈ Secure Storage β Saves the PDF report to Google Drive for records and audits. --- Key Features π€ AI-Powered Compliance Audits β Automatically checks privacy, cookies, accessibility, SSL, and more. π Compliance Scoring β Clear numerical scores and status indicators for each section. π Professional PDF Reports β Branded, structured reports suitable for clients or audits. βοΈ End-to-End Automation β From URL submission to email delivery without manual steps. π§ Instant Email Notifications β Reports delivered automatically to stakeholders. βοΈ Google Drive Backup β Centralized storage for compliance history and documentation. --- Compliance Checks Included βοΈ Privacy Policy presence & indicators βοΈ Cookie consent mechanisms βοΈ Terms of Service availability βοΈ Accessibility (WCAG-related indicators) βοΈ Contact information visibility βοΈ SSL / HTTPS verification βοΈ Critical issues & improvement recommendations --- Perfect For π’ Startups & SaaS Companies β Quickly assess website compliance before launch. π§Ύ Agencies & Consultants β Deliver automated compliance audits to clients. βοΈ Legal & Compliance Teams β Speed up preliminary compliance checks. π» Freelancers & Web Developers β Validate client websites post-deployment. π Operations Teams β Maintain ongoing compliance documentation effortlessly. --- What Youβll Need Required Integrations π Webhook β Receive website URL and user details. π€ OpenAI β Analyze website HTML for compliance indicators. π HTMLCSS to PDF β Convert compliance report into a PDF. π§ Gmail β Send compliance report via email. βοΈ Google Drive β Store generated compliance reports. π HTTP Request β Fetch website HTML content (no authentication required). --- Optional Enhancements π Compliance Dashboard β Connect Google Drive or logs to Looker Studio. π Multi-Website Scans β Extend webhook to accept bulk URLs. π Scheduled Scans β Run periodic compliance checks automatically. π¨ Slack Alerts β Send compliance summaries to internal channels. π Custom Branding β Adjust HTML styling, logos, and colors. --- Quick Start 1οΈβ£ Import the workflow JSON into your n8n workspace. 2οΈβ£ Activate the webhook and copy the endpoint URL. 3οΈβ£ Connect OpenAI, Gmail, Google Drive, and HTMLCSS to PDF credentials. 4οΈβ£ Send a POST request with website URL, company name, and email. 5οΈβ£ Review the emailed PDF compliance report. 6οΈβ£ Check Google Drive for stored audit copies. 7οΈβ£ Activate the workflow for production use. --- Expected Results β‘ Minutes Instead of Hours β Instant compliance assessments. π€ AI Accuracy β Consistent, structured compliance analysis. π Risk Visibility β Early detection of legal and accessibility gaps. π Audit-Ready Reports β Clean, shareable documentation. βοΈ Centralized Storage β Every scan archived automatically. --- Workflow Structure π Webhook Trigger β π₯ Fetch Website HTML β π§Ή Clean & Prepare Content β π§ AI Compliance Analysis β π Parse Results β π Generate HTML Report β π¨οΈ Convert to PDF β π§ Email Report β βοΈ Save to Google Drive --- Ready to Automate Website Compliance? Import this template and turn any website URL into a complete compliance report β automatically, consistently, and professionally. Perfect for audits, clients, and peace of mind. β ---
Track meal nutrition from meal photos with LINE, Google Gemini and Google Sheets
AI Meal Nutrition Tracker with LINE and Google Sheets Who's it for This workflow is designed for health-conscious individuals, fitness enthusiasts, and anyone who wants to track their daily food intake without manual calorie counting. It is best suited for users who want a simple, AI-powered meal logging system that analyzes food photos one at a time and provides instant nutritional feedback via LINE. What it does This workflow processes a single meal photo sent via LINE, analyzes it using Google Gemini AI to identify foods and estimate nutritional content, and stores the data in Google Sheets for tracking. The workflow focuses on simplicity and encouragement: it receives a meal image, performs AI-based food recognition, estimates calories and macronutrients, calculates a health score, provides personalized advice, and replies with a detailed nutritional breakdown on LINE. How it works A single meal photo is sent to the LINE bot. The workflow is triggered via a LINE webhook. The image file is downloaded and sent to Google Gemini AI for food analysis. The AI identifies foods and estimates nutritional values (calories, protein, carbs, fat, fiber). A health score (1-10) is calculated with personalized improvement tips. The data is appended to Google Sheets for meal history tracking. The image is uploaded to Google Drive for reference. A formatted nutritional report with advice is sent back as a LINE reply. This workflow is intentionally designed to handle one image per execution. Requirements To use this workflow, you will need: A LINE Messaging API account A Google Gemini API key A Google account with access to Google Sheets and Google Drive A Google Sheets document with the following column names: Date Time Meal Type Food Items Calories Protein (g) Carbs (g) Fat (g) Fiber (g) Health Score Advice Image URL Important limitations This workflow does not support multiple images sent in a single message. Sending images in quick succession may trigger multiple executions and lead to unexpected results. Only the first image in an event payload is processed. Nutritional values are AI estimates based on visual analysis and typical serving sizes. Accuracy depends on image quality, lighting, and food visibility. This tool should not replace professional dietary advice. These limitations are intentional to keep the workflow simple and easy to understand. How to set up Create a LINE Messaging API channel and obtain a Channel Access Token. Generate a Google Gemini API key. Update the Config node with your LINE token, Google Sheets ID, Google Drive folder ID, and daily calorie goal. Configure credentials for LINE, Google Gemini, Google Sheets, and Google Drive. Register the n8n webhook URL in your LINE channel settings. Activate the workflow in n8n and test it with a single meal photo. How to customize Modify the AI prompt in the "Analyze Meal with AI" node to support different languages or dietary frameworks (keto, vegan, etc.). Adjust the daily calorie goal in the Config node to match individual needs. Add additional nutritional fields such as sodium, sugar, or vitamins. Replace Google Sheets with a fitness app API or database. Integrate with other services to send daily/weekly nutrition summaries. --- Note: This workflow was tested using real meal photos sent individually via the LINE Messaging API. Nutritional estimates are approximations and may vary from actual values. For accurate dietary tracking, consult a registered dietitian.