When Shopify reports an abandoned checkout, this workflow waits an hour, generates a personalized recovery email with GPT referencing the cart items, and sends it. Win back revenue on autopilot.
{
"name": "Abandoned Cart Recovery",
"nodes": [
{
"id": "ac01aa",
"name": "Cart Abandoned",
"type": "n8n-nodes-base.shopifyTrigger",
"typeVersion": 1,
"position": [
200,
300
],
"parameters": {
"topic": "checkouts/create"
}
},
{
"id": "ac02bb",
"name": "Wait 1 Hour",
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
420,
300
],
"parameters": {
"amount": 1,
"unit": "hours"
}
},
{
"id": "ac03cc",
"name": "Write Recovery Email",
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.4,
"position": [
640,
300
],
"parameters": {
"modelId": "gpt-4o-mini",
"messages": {
"values": [
{
"role": "system",
"content": "Write a warm, short cart-recovery email with a gentle nudge and the items listed."
},
{
"role": "user",
"content": "Customer: {{ $('Cart Abandoned').item.json.email }}\nItems: {{ JSON.stringify($('Cart Abandoned').item.json.line_items) }}"
}
]
}
}
},
{
"id": "ac04dd",
"name": "Send Email",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.1,
"position": [
860,
300
],
"parameters": {
"resource": "message",
"operation": "send",
"sendTo": "={{ $('Cart Abandoned').item.json.email }}",
"subject": "You left something behind",
"message": "={{ $json.message.content }}",
"options": {}
}
}
],
"connections": {
"Cart Abandoned": {
"main": [
[
{
"node": "Wait 1 Hour",
"type": "main",
"index": 0
}
]
]
},
"Wait 1 Hour": {
"main": [
[
{
"node": "Write Recovery Email",
"type": "main",
"index": 0
}
]
]
},
"Write Recovery Email": {
"main": [
[
{
"node": "Send Email",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"meta": {}
}