Skip to content
NEWMarketplace and your team: 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 Turkish invoice data from Gmail PDFs into Google Sheets with Gemini

Runs on new Gmail messages, splits invoice PDF attachments, extracts their text via Google Drive, reads invoice and line-item data with Gemini, and writes the results to Google Sheets.

What it does

## AI Invoice Processing ### How it works This workflow monitors Gmail for incoming messages with invoice attachments, separates each attachment, and processes them one at a time. It temporarily uploads and downloads each file through Google Drive, extracts the file text, uses Gemini-powered AI steps to classify and read invoice data, then writes invoice and line-item details into Google Sheets. Non-invoice or rejected files are routed to a cleanup path that deletes the temporary Drive file, while completed sheet writes merge back into the loop for the next attachment. ### Setup steps - Connect and authorize Gmail credentials for the Gmail Trigger, and configure the trigger filters to match the mailbox or labels where invoice emails arrive. - Connect Google Drive credentials and set the upload/download/delete nodes to use the intended temporary folder or file handling settings. - Connect Google Gemini credentials for both AI nodes, and verify the structured output schemas match the fields expected downstream. - Connect Google Sheets credentials and configure both append-row nodes with the target spreadsheet, sheets, and column mappings. - Test with sample invoice and non-invoice attachments to confirm classification, extraction, deletion, and looping behavior. ### Customization You can customize the Gmail search criteria, the Drive temporary storage location, the Gemini prompts and structured schemas, and the Google Sheets column mappings for different invoice formats or additional extracted fields.

The steps

  1. When Email Received
  2. Set Email Fields
  3. Split Attachments
  4. Merge Email Data
  5. Upload to Google Drive
  6. Download from Google Drive
  7. Extract Invoice Data
  8. Parse Structured Output
  9. Loop Over Attachments
  10. Parse Structured Details
  11. If Status Is Valid
  12. Delete from Google Drive
  13. AI Invoice Agent
  14. Append to Invoice Sheet

21 steps in total.

Similar automations