{"product_id":"gmail-finance-email-classification-with-openai-google-sheets-n8n","title":"Gmail Finance Email Classification with OpenAI → Google Sheets (n8n)","description":"\u003ch3\u003eAutomatically classify Gmail finance emails and log them to Google Sheets—powered by OpenAI\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow monitors your Gmail inbox hourly, uses OpenAI to classify finance-related emails, extracts key details, stores any supporting PDFs in Google Drive, and records everything in Google Sheets. It also labels and marks processed emails as read, while sending error alerts to Gmail and Discord when something goes wrong.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRuns every hour\u003c\/strong\u003e to fetch all \u003cstrong\u003eunread Gmail messages\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eClassifies each email with OpenAI\u003c\/strong\u003e as \u003cem\u003esales\u003c\/em\u003e, \u003cem\u003eexpense\u003c\/em\u003e, \u003cem\u003esettlement\u003c\/em\u003e, \u003cem\u003etransaction\u003c\/em\u003e, \u003cem\u003enotification\u003c\/em\u003e, or \u003cem\u003eother\u003c\/em\u003e based on the subject and body.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExpense handling:\u003c\/strong\u003e OpenAI extracts invoice fields, the workflow downloads any PDF attachment from Gmail, uploads it to \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e, appends an expense row to \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e (including the Drive link), then labels the email and \u003cstrong\u003emarks it as read\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSales handling:\u003c\/strong\u003e OpenAI extracts order details, the workflow generates a PDF with \u003cstrong\u003ePDFBolt\u003c\/strong\u003e, uploads it to Google Drive, appends a sales row to Google Sheets with the Drive link, labels the email, and marks it as read.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSettlement handling:\u003c\/strong\u003e OpenAI extracts payout details, downloads any PDF attachment, uploads it to Google Drive, appends a settlement row to Google Sheets with the Drive link, then labels and marks the email as read.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOther categories:\u003c\/strong\u003e For transaction, notification, and other emails, it applies the corresponding Gmail label and marks the message as read.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eError handling:\u003c\/strong\u003e If any step fails, an \u003cstrong\u003en8n Error Trigger\u003c\/strong\u003e sends the error to OpenAI for a plain-language summary and posts an alert (including the summary) to \u003cstrong\u003eDiscord\u003c\/strong\u003e and via Gmail.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eBookkeeping workflows that turn unread Gmail receipts\/invoices into structured Google Sheets entries.\u003c\/li\u003e\n  \u003cli\u003eSales order tracking from emailed confirmations into a spreadsheet with archived PDFs.\u003c\/li\u003e\n  \u003cli\u003eAutomated payout\/settlement logging with Drive-linked evidence for audits.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations\/nodes:\u003c\/strong\u003e Gmail, OpenAI, Google Sheets, Google Drive, Discord, PDFBolt, and workflow control nodes like \u003cem\u003eif\u003c\/em\u003e, \u003cem\u003eswitch\u003c\/em\u003e, \u003cem\u003esplit out\u003c\/em\u003e, and \u003cem\u003ecode\u003c\/em\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46132817985715,"sku":"N8N-20175","price":58.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/5v5REWTskTlnF5XKa4ANl_GjC4Grcc.png?v=1790759420","url":"https:\/\/buyflowscripts.com\/products\/gmail-finance-email-classification-with-openai-google-sheets-n8n","provider":"N8N Commerce","version":"1.0","type":"link"}