n8n monitors Shopify for abandoned carts, waits 30 minutes, then sends a personalized email with a discount code to nudge customers back to purchase.
Prepare n8n Environment
Navigate to http://localhost:5678 (or your n8n hosted URL) and log in with your credentials.
In the sidebar, click “Workflows,” then select “+ New” and name it (e.g., “Campaign Tracker”). Click “+” on the canvas to open the node selector.
Trigger Node: Shopify Webhook
Node: Webhook
Settings:
Method: POST
Path: shopify-cart-abandon
Shopify Webhook: “Checkout Abandonment” at https://<n8n-host>/webhook/shopify-cart-abandon
Output: Cart data (e.g., {{ $json.body.email }}).
Delay Node: Wait
Node: Wait
Settings:
Time: 30 minutes
Purpose: Gives customers time to return naturally.
Check Status Node: HTTP Request
Node: HTTP Request
Settings:
URL: https://<your-shopify-store>.myshopify.com/admin/api/2023-10/checkouts/{{ $node["Webhook"].json.body.token }}
Method: GET
Authentication: Shopify API key
Output: Checks if cart is still abandoned.
Send Email Node: SendGrid
Node: SendGrid
Settings:
Credentials: SendGrid API key
To: {{ $node["Webhook"].json.body.email }}
Subject: Complete Your Purchase!
Body: Hi, you left items in your cart. Use code RECOVER10 for 10% off! <link-to-cart>
Output: Email sent if cart remains abandoned.
Ready to transform your business with our technology solutions? Contact Us today to Leverage Our AI/ML Expertise.