Skip to content
NEWError doctor and Watchtower: failed n8n runs explained in plain words, and emailed to you. See what is new

Library / Documents, PDF & OCR

Documents, PDF & OCR

Extract Gmail attachment data with OpenAI into Google Sheets

Runs on each new Gmail email, saves attachments to Google Drive, uses OpenAI to extract structured values, and appends them to Google Sheets.

What it does

## 3. Use LLMs to Extract Values from Data [Read more about Basic LLM Chain]({{ $env.WEBHOOK_URL }} Large language models are perfect for data extraction tasks as they can work across a range of document layouts without human intervention. The extracted data can then be sent to a variety of datastores such as spreadsheets, accounting systems and/or CRMs. Tip: The "Structured Output Parser" ensures the AI output can be inserted to our spreadsheet without additional clean up and/or formatting.

The steps

  1. Gmail Trigger1
  2. Setup1
  3. Upload PDF to Drive1
  4. Rename file1
  5. Move to the correct folder1
  6. Gmail
  7. Extract from File2
  8. Google Drive
  9. OpenAI Model
  10. Structured Output Parser
  11. Append to Reconciliation Sheet
  12. Map Output
  13. Apply Data Extraction Rules
  14. Only invoice mails with attachments

Similar automations