Quick overview This workflow collects an invoice PDF via an n8n Form, extracts text from the PDF, uses OpenAI to convert it into structured invoice JSON, logs invoice headers and line items to Google Sheets, validates totals, and emails a formatted extraction report via Gmail. How it works Receives an invoice submission through an n8n Form that includes the uploader’s name, email address, currency, notes, and a PDF file. Extracts text content from the uploaded PDF. Sends the extracted text to OpenAI (Chat Completions) to return invoice fields and all line items as a strict JSON object. Parses and validates the returned JSON, enriching it with the form metadata and stopping the run if key fields (like invoice number or line items) are missing. Appends a single invoice “header” row to the Invoices tab in Google Sheets. Splits the extracted line items, adds per-line metadata and a unique key, and appends each line item as a row to the Line Items tab in Google Sheets. Aggregates all line items, verifies that their summed totals match the invoice total within a tolerance, builds an HTML report, and emails it to the submitter via Gmail.
Tags
Related workflows
See all Gmail→Move data between JSON and spreadsheets
This workflow illustrates how to convert data from JSON to binary format and import JSON data or files into Google Sheets or local spreadsheets.
📦 Electronic data interchange (EDI) message parsing with Gmail and Google Sheet
Tags: Supply Chain Management, Logistics, Transportation, Data Transmission Context Hey! I'm Samir , a Supply Chain Engineer and Data Scientist from Paris founder of LogiGreen Consulting We help small and medium businesses improve their logistics processes using AI, Data Analytics and Automation. > Sustainable and Efficient supply chains with N8N! 📬 For business inquiries, you can add me on Here What is an EDI Message? Electronic Data Interchange (EDI) is a standardized method of automatically transferring data between computer systems. They ensure the smooth flow of essential transactional data, such as purchase orders, invoices, shipping notices, and more. For instance, a manufacturing company can receive purchase orders from a retailer via EDI. However, they need complex integration for the transmission and processing of the messages. Who is this template for? This workflow template is designed for small companies that cannot connect to their customers and need to manually process the EDI messages received. How does it work? This workflow uses a Gmail Trigger that analyzes all the incoming emails. 📧 Gmail Trigger → Detects emails with "EDI" in the subject. 📜 Parses EDI Mes
Monitor SSL Certificate Expiry with Google Sheets and Multi-Channel Alert
SSL Expiry Alert System Who is this for? This workflow is ideal for administrators or IT professionals responsible for monitoring SSL certificates of multiple websites to ensure they do not expire unexpectedly. Problem SSL certificates play a crucial role in ensuring secure communication over the internet. However, if not monitored closely, they can expire, leading to potential security risks and service disruption. This workflow helps in proactively monitoring SSL certificate expiry dates. Functionality Pulls URLs to monitor from a Google Sheet. Checks SSL certificates using SSL-Checker.io. Updates Google Sheet with SSL details such as expiry date and certificate status. Sends email alerts for SSL certificates nearing expiry (<30 days) or invalid certificates. Setup Clone the provided Google Sheet and update the Google Sheet URL in the "URLs to Monitor" node. Set up Google Sheets and Gmail credentials in n8n. Configure the Discourse Trigger for weekly monitoring. Customize email/telegram/ntfy alert settings as needed. Customization Modify the frequency of monitoring by adjusting the trigger interval in the "Weekly Trigger" node. Customize email content and recipients in the "Se