Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Documents, PDF & OCR

Documents, PDF & OCR

Extract Gmail PDF Invoices with LlamaParse and OpenAI

When an invoice email with a PDF arrives in Gmail, LlamaParse and OpenAI extract the data and append it to a reconciliation sheet in Google Sheets.

What it does

## Try Me Out! This workflow does the following: * Waits for email invoices with PDF attachments. * Uses the LlamaParse service to convert the invoice PDF into a markdown file. * Uses a LLM to extract invoice data from the Markdown file. * Exports the extracted data to a Google Sheet. ### Follow along with the blog here {{ $env.WEBHOOK_URL }} ### Good to know * You'll need to create the label "invoice synced" in gmail before using this workflow. ### Need Help? Join the [Discord]({{ $env.WEBHOOK_URL }} or ask in the [Forum]({{ $env.WEBHOOK_URL }} Happy Hacking!

The steps

  1. OpenAI Model
  2. Structured Output Parser
  3. Upload to LlamaParse
  4. Receiving Invoices
  5. Append to Reconciliation Sheet
  6. Get Processing Status
  7. Wait to stay within service limits
  8. Is Job Ready?
  9. Add "invoice synced" Label
  10. Get Parsed Invoice Data
  11. Map Output
  12. Apply Data Extraction Rules
  13. Should Process Email?
  14. Split Out Labels

47 steps in total.

Similar automations