{"product_id":"n8n-google-drive-to-google-sheets-receipt-ocr-with-gemini","title":"n8n Google Drive to Google Sheets Receipt OCR with Gemini","description":"\u003ch3\u003eTurn new Google Drive receipt images into structured Google Sheets rows—automatically\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow watches a specific \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e folder for newly added receipt images, uses \u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e OCR\/image analysis to extract key fields (receipt ID, table number, line items, total price), and then appends the data to \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e—skipping duplicates by receipt ID.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMonitors every minute\u003c\/strong\u003e for new files in a configured Google Drive folder.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDownloads the newly created receipt image\u003c\/strong\u003e from Google Drive.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExtracts receipt data with Google Gemini\u003c\/strong\u003e by sending the image and requesting a JSON response containing:\n    \u003cul\u003e\n      \u003cli\u003e\u003cem\u003ereceipt_id\u003c\/em\u003e\u003c\/li\u003e\n      \u003cli\u003e\u003cem\u003etable_number\u003c\/em\u003e\u003c\/li\u003e\n      \u003cli\u003e\n\u003cem\u003eline items\u003c\/em\u003e (including quantities)\u003c\/li\u003e\n      \u003cli\u003e\u003cem\u003etotal_price\u003c\/em\u003e\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eParses the returned JSON\u003c\/strong\u003e and formats the line items into a single comma-separated string.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePrevents duplicate rows\u003c\/strong\u003e by checking Google Sheets for an existing row with the same receipt ID.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAppends only new receipts\u003c\/strong\u003e to the target Google Sheets spreadsheet; if the receipt ID already exists, the workflow stops without changes.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eKeep a live receipt log by dropping receipt photos into a shared Drive folder.\u003c\/li\u003e\n  \u003cli\u003eFor SaaS operators and operators teams: centralize receipt capture for reconciliation and reporting in Google Sheets.\u003c\/li\u003e\n  \u003cli\u003eFor automation engineers: build a reliable OCR-to-spreadsheet pipeline with duplicate detection.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Drive\u003c\/strong\u003e trigger: runs every minute when a new file is created in the watched folder.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Gemini (Google PaLM)\u003c\/strong\u003e: image analysis step to extract receipt fields as JSON.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e: searches for an existing receipt ID, then appends a new row if missing.\u003c\/li\u003e\n  \u003cli\u003eWorkflow logic using nodes such as \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, \u003cstrong\u003eno op\u003c\/strong\u003e, and supporting elements (e.g., a sticky note for guidance).\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eSetup requirements\u003c\/h3\u003e\n\u003cp\u003eConnect Google Drive OAuth2 credentials and select the folder to watch, add a \u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e API credential, connect \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e OAuth2, and ensure your sheet columns match the workflow mapping (e.g., \u003cstrong\u003eid\u003c\/strong\u003e, \u003cstrong\u003eorder\u003c\/strong\u003e, \u003cstrong\u003etable\u003c\/strong\u003e, \u003cstrong\u003etotalprice\u003c\/strong\u003e) so the duplicate check and append work correctly.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45824198344883,"sku":"N8N-18191","price":45.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/W1k97jKzfjSwVYlHETN7x_ERsuMvaQ.png?v=1786611660","url":"https:\/\/buyflowscripts.com\/products\/n8n-google-drive-to-google-sheets-receipt-ocr-with-gemini","provider":"N8N Commerce","version":"1.0","type":"link"}