Stop dragging invoices and receipts from your inbox. This setup watches new Gmail messages, checks their PDF attachments, and files the right ones into a Google Drive folder. It is great for invoices, receipts, contracts, or payslips where you only want specific files saved.
It starts when a new email arrives in Gmail. The flow splits all attachments, filters to PDFs, and reads the text. A size check makes sure the text fits the model limit. OpenAI then answers with true or false to a simple question based on your Match on term. Files marked true are sent to your chosen Google Drive folder. Items that are not PDFs, have no attachments, or are too large are safely ignored.
You only need Gmail, Google Drive, and OpenAI accounts. In the Configure step, set Match on, paste your Drive folder link, and choose token settings. Expect big time savings as the filing work moves from manual sorting to a reliable rule. Use it for accounts payable, payroll documents, or vendor contracts. Send yourself a test email with a sample PDF to confirm the path before going live.