Recover abandoned Shopify carts with OpenAI and SMTP data tables
Ready for 3.0What this workflow does
This AI workflow has 16 nodes and runs on Shopify events (plus 2 other triggers). Along the way it connects Shopify and OpenAI Chat Model.
How it runs
Trigger: On Shopify events (plus 2 other triggers).
- Normalize Checkout (Code): runs custom JavaScript code
- Get Checkout Token (Code): runs custom JavaScript code
- Settings (Edit Fields (Set)): sets 10 fields: storeName, senderEmail, brandTone…
- Save or Update Cart (Data table): create or update (row)
- Mark Cart as Purchased (Data table): update (row)
- Get Open Carts (Data table): get (row)
- Select Carts Due for a Reminder (Code): runs custom JavaScript code
- Write Reminder with AI (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model
- Build Email (with Fallback) (Code): runs custom JavaScript code
- Send Reminder Email (Send Email): sends an email over SMTP
…plus 2 more steps. See the full node list below.
Services it uses
Other Shopify + OpenAI templates (32)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (9)
- Shopify Trigger
n8n-nodes-base.shopifyTrigger - Code
n8n-nodes-base.code - Data table
n8n-nodes-base.dataTable - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Send Email
n8n-nodes-base.emailSend - Filter
n8n-nodes-base.filter
From the author
Quick overview This workflow captures Shopify checkout updates into an n8n Data Table, marks carts as purchased when Shopify orders are created, and every 15 minutes uses OpenAI to write localized abandoned-cart reminder emails that are sent via SMTP and…