{"product_id":"excel-stock-replenishment-automation-with-google-drive-openai","title":"Excel Stock Replenishment Automation with Google Drive \u0026 OpenAI","description":"\u003ch3\u003eAutomatically calculate Excel stock replenishment from Google Drive using OpenAI\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow watches a Google Drive folder for newly uploaded \u003cstrong\u003eXLSX inventory reports\u003c\/strong\u003e, then uses \u003cstrong\u003eOpenAI (GPT-4.1 mini)\u003c\/strong\u003e to calculate per-SKU replenishment needs and write the results back into your spreadsheet—before moving the processed file to an output folder.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eTriggers on new files\u003c\/strong\u003e: When a new \u003cstrong\u003e.xlsx\u003c\/strong\u003e file is created in a specified Google Drive folder, the workflow starts.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDownloads and parses rows\u003c\/strong\u003e: The file is downloaded from Google Drive, extracted as rows, and split into row batches for efficient processing.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGenerates reorder guidance with OpenAI\u003c\/strong\u003e: For each batch, the workflow sends a compact JSON prompt to \u003cstrong\u003eOpenAI GPT-4.1 mini\u003c\/strong\u003e, including sales, purchase, and stock metrics per SKU. OpenAI returns:\n    \u003cul\u003e\n      \u003cli\u003e\u003cstrong\u003ereorder quantity\u003c\/strong\u003e\u003c\/li\u003e\n      \u003cli\u003e\n\u003cstrong\u003ea one-sentence Turkish reason\u003c\/strong\u003e per row\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWrites results back to the spreadsheet\u003c\/strong\u003e: The workflow maps results to the original rows and adds:\n    \u003cul\u003e\n      \u003cli\u003e\n\u003cstrong\u003eColumn AB\u003c\/strong\u003e: need\u003c\/li\u003e\n      \u003cli\u003e\n\u003cstrong\u003eColumn AC\u003c\/strong\u003e: reason\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRebuilds, updates, and moves\u003c\/strong\u003e: After all batches are processed, rows are reassembled in the original order, converted back to XLSX, the original Google Drive file is updated, and then it is moved to a designated output folder.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSaaS operators automatically enriching incoming inventory XLSX reports with reorder quantities.\u003c\/li\u003e\n  \u003cli\u003eAutomation engineers streamlining stock replenishment calculations without manual spreadsheet work.\u003c\/li\u003e\n  \u003cli\u003eTeams processing frequent Excel inventory exports stored in Google Drive, with clear per-item reasoning (Turkish) alongside recommended quantities.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations \/ credentials\u003c\/strong\u003e: Google Drive (OAuth2) and OpenAI API.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOpenAI model\u003c\/strong\u003e: \u003cstrong\u003egpt-4.1-mini\u003c\/strong\u003e in the “Message a model” step.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWorkflow logic\u003c\/strong\u003e: extract XLSX rows, \u003cstrong\u003esplit into batches\u003c\/strong\u003e, send JSON prompts per batch, merge results, then \u003cstrong\u003econvert back to XLSX\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSetup requirement\u003c\/strong\u003e: Ensure your XLSX column headers match the fields expected by the workflow prompt.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46172948201651,"sku":"N8N-20577","price":10.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/eyEdA-4IX9VHcXg-63TC0_GMf7boI3.png?v=1791364608","url":"https:\/\/buyflowscripts.com\/products\/excel-stock-replenishment-automation-with-google-drive-openai","provider":"N8N Commerce","version":"1.0","type":"link"}