Email Automation
Recover abandoned Shopify carts with Llama 3.2, Gmail, and Google Sheets
When an API call/webhook arrives, it handles email with Claude and OpenAI / ChatGPT using Gmail, Google Sheets.
What it does
### How it works Shopify webhooks (checkout creation, checkout update, order creation) feed one entry point. Checkouts are deduplicated by cart token, since Shopify can issue a new checkout token mid-session on the same cart. After 1 hour without a purchase, an AI model writes a personalized reminder using the exact product and price. Another 24 hours later it sends a 10% discount email, and 24 hours after that a final urgency email. Before each email the workflow re-checks whether the customer already bought, and stops if so. When an order completes, the checkout is marked Recovered and a thank-you email with an upsell suggestion goes out. Everything is logged to Google Sheets, and a weekly report emails the store owner the recovered revenue. ### Setup 1. In Shopify (Settings → Notifications → Webhooks), add three webhooks pointing to this workflow's Production URL: Checkout creation, Checkout update, and Order creation. Use API version 2026-07, not unstable. 2. Create a Google Sheet with these headers: Checkout Token, Email, Product, Price, Status, Recovery Link, Created At, Last Updated. 3. Create a 10% discount code named CART10 in Shopify. 4. Connect your Google Sheets and Gmail credentials, and select your Sheet in every Sheets node. 5. Point each HTTP Request node at your own Ollama, GPT-4o, or Claude endpoint. 6. Set the Weekly Summary email recipient to your own address, then publish. ### Customization - Edit the product list in Pick Upsell and the store name in the Code nodes. - Adjust the three Wait nodes, or change the discount code and email tone in the HTTP Request prompts.
The steps
- On Shopify checkout or order event
- Get Checkout Row
- Wait 24h Before Discount
- Get Checkout Row 2
- Filter Discount
- HTTP Request Discount
- Code Discount
- Gmail Discount
- Sheets Discount Sent
- Wait 24h Before Urgency
- Get Checkout Row 3
- Filter Urgency
- HTTP Request Urgency
- Code Urgency
35 steps in total.
Similar automations
E-commerce & PaymentsRecover Abandoned Shopify Carts with Email and SMS18 stepsE-commerce & PaymentsRecover Abandoned Shopify Carts with Email6 stepsE-commerce & PaymentsRecover Abandoned Shopify Carts with AI-Written Emails10 stepsE-commerce & PaymentsRecover Abandoned Carts with Gmail Emails and Sheets Analytics11 steps