Collect invoice emails from Gmail and save their attachments into Google Drive, sorted by company and by month. Only approved senders from a Google Sheets whitelist are processed, so your storage stays clean and organized. Ideal for finance and operations teams that need fast and tidy record keeping.
A Gmail trigger checks a label every 15 minutes and pulls new messages. A Google Sheets lookup matches the sender email to a company name and ignores anything not on the list. The flow then checks Google Drive for a company folder and creates it if missing. It builds a YYYY/MM folder from the email date, searches for that folder, and creates it when needed. Attachments are downloaded, split into individual files, renamed with a timestamp, and uploaded in batches to the month folder.
You will need Gmail, Google Drive, and Google Sheets connected in n8n. Set up a Gmail label and filter for invoice or receipt emails, copy the whitelist sheet, and pick a parent Drive folder for storage. Expect large time savings and fewer filing mistakes. Great for vendor bills, receipts, and monthly statements.