This n8n workflow automates the process of extracting information from incoming invoice emails and storing the data in a Google Sheet for easy reconciliation. It begins by monitoring Gmail for emails from specific senders with PDF attachments, which are identified as invoices. The workflow then uploads these PDFs to LlamaParse, a cloud-based service that parses complex documents, especially PDFs with embedded tables, into markdown format.
Once the invoice is parsed, a Large Language Model (LLM) extracts key invoice data such as invoice date, number, supplier and customer info, line items, and total price. The extracted data is cleaned and formatted using a structured output parser, then appended to a designated Google Sheet for record-keeping and further analysis.
To prevent duplicate processing, the workflow adds a label “invoice synced” to each processed email. It also checks the status of the parsing job periodically to ensure the document is fully processed before data extraction. Additional nodes manage label handling and email filtering based on labels, ensuring that the workflow runs efficiently without reprocessing invoices.
Practical use cases include automating accounts payable processes, ensuring accurate invoice data entry, and maintaining organized records in a spreadsheet for audits or ongoing financial analysis. This setup is especially useful for finance teams, accountants, or businesses that handle high volumes of vendor invoices regularly.
Reviews
There are no reviews yet.