{"product_id":"kie-ai-video-rendering-cache-with-n8n-data-table-google-drive","title":"Kie.ai Video Rendering Cache with n8n Data Table \u0026 Google Drive","description":"\u003ch3\u003eTurn repeated video prompts into instant, cached results—then save winners to Google Drive\u003c\/h3\u003e\n\u003cp\u003eThis n8n sub-workflow fixes a broken Sora video-generation step by sending text-to-video jobs to \u003cstrong\u003eKie.ai\u003c\/strong\u003e, caching identical requests in an \u003cstrong\u003en8n Data Table\u003c\/strong\u003e, and uploading successful renders to \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e. The calling workflow gets a single, flat result payload—either the delivered video details or a clear failure report.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives a prompt + optional render settings\u003c\/strong\u003e from a calling workflow (or manual test run).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNormalizes and clamps parameters\u003c\/strong\u003e, then generates a \u003cstrong\u003edeterministic job key\u003c\/strong\u003e and prepares a model fallback chain.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eChecks the n8n Data Table cache\u003c\/strong\u003e for the job key; on a cache hit, it immediately returns the stored video details.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSubmits to Kie.ai in sequence\u003c\/strong\u003e, polling Kie.ai every \u003cstrong\u003e20 seconds\u003c\/strong\u003e for up to \u003cstrong\u003e5 minutes per model\u003c\/strong\u003e. If a model fails or times out, it moves on.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAggregates attempts\u003c\/strong\u003e and selects the first successful render, including an \u003cstrong\u003eattempt trail\u003c\/strong\u003e and \u003cstrong\u003etotal credits consumed\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDownloads the winning video\u003c\/strong\u003e, \u003cstrong\u003euploads it to Google Drive\u003c\/strong\u003e, and upserts: job key, video URL, Drive file ID, model, and credit usage into the Data Table.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReturns a single response payload\u003c\/strong\u003e: either delivered video details or a failure payload listing models tried and reasons.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003ePrevent duplicate Kie.ai renders when multiple workflows reuse the same prompt and settings.\u003c\/li\u003e\n  \u003cli\u003eBuild a resilient replacement for a broken \u003cstrong\u003eSora\u003c\/strong\u003e step with model fallback and clear failure diagnostics.\u003c\/li\u003e\n  \u003cli\u003eStore and reuse rendered assets in \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e while tracking credits per job key.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eKie.ai\u003c\/strong\u003e authenticated via \u003cstrong\u003eHTTP Header Auth\u003c\/strong\u003e to \u003ccode\u003eapi.kie.ai\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Drive\u003c\/strong\u003e credentials plus a configured target Drive and folder ID.\u003c\/li\u003e\n  \u003cli\u003eWorkflow nodes: \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003eset\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, \u003cstrong\u003ewait\u003c\/strong\u003e, \u003cstrong\u003edata table\u003c\/strong\u003e, \u003cstrong\u003esticky note\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46172936994995,"sku":"N8N-20595","price":18.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/s-LKUuVhG7SjhMuaDWYVU_IoUiKbaI.png?v=1791364121","url":"https:\/\/buyflowscripts.com\/products\/kie-ai-video-rendering-cache-with-n8n-data-table-google-drive","provider":"N8N Commerce","version":"1.0","type":"link"}