{"product_id":"shopify-cart-recovery-with-llama-3-2-gmail-google-sheets-n8n","title":"Shopify Cart Recovery with Llama 3.2, Gmail \u0026 Google Sheets (n8n)","description":"\u003ch3\u003eRecover more Shopify carts automatically—using Llama 3.2, Gmail, and Google Sheets in n8n\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow listens to Shopify checkout and order webhooks, logs cart activity in Google Sheets, and then uses an Ollama-hosted \u003cstrong\u003eLlama 3.2\u003c\/strong\u003e chat endpoint to draft and send timed cart-recovery and post-purchase emails via \u003cstrong\u003eGmail\u003c\/strong\u003e. It also emails a weekly recovery summary every Monday at 9am.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives Shopify webhook events\u003c\/strong\u003e for checkout creation\/updates and order creation.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOn checkout events:\u003c\/strong\u003e\n    \u003cul\u003e\n      \u003cli\u003eSaves checkout details to \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e (including email, product\/price info, recovery link, and cart token).\u003c\/li\u003e\n      \u003cli\u003eOnly starts the follow-up sequence for \u003cstrong\u003enew checkouts\u003c\/strong\u003e.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAfter 1 hour:\u003c\/strong\u003e\n    \u003cul\u003e\n      \u003cli\u003eLooks up the same Google Sheets row by the \u003cstrong\u003ecart token\u003c\/strong\u003e.\u003c\/li\u003e\n      \u003cli\u003eSkips sending if the row status is already \u003cstrong\u003eRecovered\u003c\/strong\u003e.\u003c\/li\u003e\n      \u003cli\u003eUses \u003cstrong\u003eLlama 3.2 (via an HTTP call to an Ollama chat endpoint)\u003c\/strong\u003e to draft a reminder email, then sends it through \u003cstrong\u003eGmail\u003c\/strong\u003e.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAfter 24 more hours:\u003c\/strong\u003e\n    \u003cul\u003e\n      \u003cli\u003eRe-checks the row; skips if already \u003cstrong\u003eRecovered\u003c\/strong\u003e.\u003c\/li\u003e\n      \u003cli\u003eGenerates a discount follow-up mentioning discount code \u003cstrong\u003eCART10\u003c\/strong\u003e with \u003cstrong\u003eLlama 3.2\u003c\/strong\u003e.\u003c\/li\u003e\n      \u003cli\u003eSends via \u003cstrong\u003eGmail\u003c\/strong\u003e and updates the row status to \u003cstrong\u003eDiscount Sent\u003c\/strong\u003e.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAfter another 24 hours:\u003c\/strong\u003e\n    \u003cul\u003e\n      \u003cli\u003eRe-checks again; skips if already \u003cstrong\u003eRecovered\u003c\/strong\u003e.\u003c\/li\u003e\n      \u003cli\u003eGenerates a final urgency email with \u003cstrong\u003eLlama 3.2\u003c\/strong\u003e, sends via \u003cstrong\u003eGmail\u003c\/strong\u003e, and updates status to \u003cstrong\u003eUrgency Sent\u003c\/strong\u003e.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOn order creation:\u003c\/strong\u003e\n    \u003cul\u003e\n      \u003cli\u003eMarks the matching row in Google Sheets as \u003cstrong\u003eRecovered\u003c\/strong\u003e.\u003c\/li\u003e\n      \u003cli\u003ePicks a random upsell product from a built-in catalog.\u003c\/li\u003e\n      \u003cli\u003eGenerates a thank-you email with \u003cstrong\u003eLlama 3.2\u003c\/strong\u003e and sends via \u003cstrong\u003eGmail\u003c\/strong\u003e.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWeekly reporting:\u003c\/strong\u003e Every Monday at \u003cstrong\u003e9am\u003c\/strong\u003e, reads all tracker rows from Google Sheets and produces a recovery summary.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eTurn Shopify abandoned checkout behavior into a staged email sequence (reminder → discount → urgency) with dynamic Llama 3.2 drafting.\u003c\/li\u003e\n  \u003cli\u003eTrack recovery progress in Google Sheets with clear statuses like \u003cstrong\u003eRecovered\u003c\/strong\u003e, \u003cstrong\u003eDiscount Sent\u003c\/strong\u003e, and \u003cstrong\u003eUrgency Sent\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eSend post-purchase thank-you and upsell emails automatically upon order creation.\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:\u003c\/strong\u003e code, wait, gmail, filter, webhook, sticky note\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations:\u003c\/strong\u003e Shopify webhooks, \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e tracking, \u003cstrong\u003eGmail\u003c\/strong\u003e delivery\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAI generation:\u003c\/strong\u003e Llama 3.2 via an \u003cstrong\u003eHTTP call to an Ollama chat endpoint\u003c\/strong\u003e\n\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46164181549235,"sku":"N8N-20509","price":19.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/uoEefRrpP2Wt8WpY_CAqT_9vVqLgm1.png?v=1791277647","url":"https:\/\/buyflowscripts.com\/products\/shopify-cart-recovery-with-llama-3-2-gmail-google-sheets-n8n","provider":"N8N Commerce","version":"1.0","type":"link"}