{"product_id":"google-drive-file-categorization-with-openai-sheet-logs","title":"Google Drive File Categorization with OpenAI + Sheet Logs","description":"\u003ch3\u003eAutomatically categorize Google Drive files using OpenAI—and keep a full audit trail in Google Sheets\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow monitors a Google Drive \u003cem\u003eIncoming\u003c\/em\u003e folder, uses an OpenAI-compatible \u003cstrong\u003e\/chat\/completions\u003c\/strong\u003e endpoint to classify each file into your predefined categories, then moves the file into the correct subfolder under \u003cem\u003eOrganized\u003c\/em\u003e. Every action is logged to Google Sheets, with optional notifications via \u003cstrong\u003eSlack\u003c\/strong\u003e.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSchedules and reads configuration\u003c\/strong\u003e every few minutes, then checks a Google Sheets log to identify which files are new or need retrying.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLists and filters files\u003c\/strong\u003e from the configured Google Drive source folder (non-folder items only), ignoring already-processed entries.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eProcesses files in capped batches\u003c\/strong\u003e—one file at a time—to control cost and avoid rate issues.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDetects file type\u003c\/strong\u003e and, when enabled, downloads and extracts content from PDFs, Office files, spreadsheets, text files, or prepares images for vision; otherwise it falls back to filename + metadata only.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCalls OpenAI-compatible Chat Completions\u003c\/strong\u003e with metadata and extracted content, then parses\/repairs the model’s JSON classification.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates results\u003c\/strong\u003e against an approved taxonomy, routing low-confidence or sensitive\/failed outputs to the \u003cstrong\u003eUncategorized\u003c\/strong\u003e bucket for review.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMoves the file\u003c\/strong\u003e into the correct category folder, with a configurable duplicate-name strategy (keep, rename, or skip) while preserving file ID and sharing.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAppends a per-file log row\u003c\/strong\u003e to Google Sheets with statuses like \u003cem\u003eSUCCESS\u003c\/em\u003e, \u003cem\u003eREVIEW\u003c\/em\u003e, \u003cem\u003eSKIPPED\u003c\/em\u003e, or \u003cem\u003eERROR\u003c\/em\u003e, plus optional Slack\/email notifications.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eAutomate document routing for SaaS operations (contracts, compliance docs, invoices, exports).\u003c\/li\u003e\n  \u003cli\u003eClassify incoming attachments from a shared Drive folder to keep teams organized.\u003c\/li\u003e\n  \u003cli\u003eReduce manual tagging by sending uncertain classifications to \u003cem\u003eUncategorized\u003c\/em\u003e for human review.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes\/logic:\u003c\/strong\u003e if, set, code, no op, slack, switch\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations:\u003c\/strong\u003e Google Drive (Incoming → Organized subfolders), Google Sheets logging, OpenAI-compatible \u003cstrong\u003e\/chat\/completions\u003c\/strong\u003e classification\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46190205108403,"sku":"N8N-20654","price":75.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/gCdFd5EMiXn6DMB-spJcD_TW8tnX6I.png?v=1791450193","url":"https:\/\/buyflowscripts.com\/products\/google-drive-file-categorization-with-openai-sheet-logs","provider":"N8N Commerce","version":"1.0","type":"link"}