10 recover abandoned carts
Shared 11/22/2025
9 views
Visual Workflow
JSON Code
{
"id": "OfZ8AI3czFwBkTiu",
"meta": {
"instanceId": "26550bd9ff45dcd013f12eb37a30519e6493e7ff388d12bf97841ae76d6b61e4",
"templateCredsSetupCompleted": true
},
"name": "10 recover abandoned carts",
"tags": [],
"nodes": [
{
"id": "7607400a-c079-476c-9599-922e5d1f65f0",
"name": "Get row(s) in sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
416,
0
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1436728878,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1RzIGtOSTKQsuCzjvKdqLF13fcsXervD7FztVWZLEOLg/edit#gid=1436728878",
"cachedResultName": "simple_abandoned_carts.csv"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1RzIGtOSTKQsuCzjvKdqLF13fcsXervD7FztVWZLEOLg",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1RzIGtOSTKQsuCzjvKdqLF13fcsXervD7FztVWZLEOLg/edit?usp=drivesdk",
"cachedResultName": "simple_abandoned_carts"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "qL5iIac3K5CYIJCG",
"name": "Google Sheets account 2"
}
},
"typeVersion": 4.7
},
{
"id": "36140b39-b4ec-4e7f-96c0-28a9179cb495",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
592,
0
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "523913b8-6930-425a-b9f7-035a0873d7b0",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $json.payment_status }}",
"rightValue": "paid"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "4c2865e1-37f8-44ec-8fa1-e7e43f6680f9",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
864,
-112
],
"parameters": {
"text": "=Tum ek “Automated Ecommerce Retention Assistant” ho. Tumhara kaam un customers ke liye personalized discount-offer email generate karna hai jinhon ne product add-to-cart kiya tha lekin purchase complete nahi kiya.\n\nMain tumhe customer ka complete data dunga:\n- customer_name {{ $json.customer_name }}\n- email {{ $json.email }}\n- product_name {{ $json.items }}\n- discount_percent (20 ya 30)\n- payment_status {{ $json.payment_status }}\n\nTumhara task yeh hai:\n\n1) Sirf un customers ke liye subject aur email body create karna jinka payment_status \"unpaid\" ho.\n2) Email short, friendly, warm aur human tone mein likhna.\n3) Customer ko politely yaad dilana ke unhone jo product add-to-cart kiya tha woh ab discount par available hai.\n4) Discount_percent ko naturally mention karna, jaise:\n “Aapke liye special 20% off!”\n5) Product name aur product_url ko clearly but naturally email body mein include karna.\n6) Customer ko encourage karna ke woh purchase complete kar lein.\n7) Language: Simple English + thodi Hinglish, natural aur smooth tone mein.\n8) Tumhara output Gmail node ko send kiya jayega, isliye hamesha clean JSON format mein reply dena.\n9) Extra text, explanation, headings, comments ya JSON ke bahar koi bhi content nahi dena.\n\nOutput sirf JSON format mein do:\n\n{\n \"email\":{{ $json.email }} \", \n \"email_subject\": \"...\",\n \"email_body\": \"...\"\n}\n",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 3,
"alwaysOutputData": true
},
{
"id": "66f5fd65-d687-4505-bc79-076ce0d7c4b9",
"name": "Google Gemini Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
784,
160
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"id": "BoIgEB4ncmbU4aai",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "caa8008c-289a-4062-84d8-547ef7c3704b",
"name": "Send a message",
"type": "n8n-nodes-base.gmail",
"position": [
1200,
-80
],
"webhookId": "d0000849-00fc-4cda-a3a3-e4e4dc785cf7",
"parameters": {
"sendTo": "={{ $node[\"Get row(s) in sheet\"].json[\"email\"] }}",
"message": "={{ $json.output.email_body }}",
"options": {},
"subject": "={{ $json.output.email_subject }}"
},
"credentials": {
"gmailOAuth2": {
"id": "0Ogw40grINRWvneX",
"name": "Gmail account 2"
}
},
"typeVersion": 2.1
},
{
"id": "252d4fa1-a738-468e-9d18-81fa525addc2",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1024,
144
],
"parameters": {
"jsonSchemaExample": "{\n \"email_subject\": \"string\",\n \"email_body\": \"string\"\n}\n"
},
"typeVersion": 1.3
},
{
"id": "42be9fec-bbf1-4da9-8fd4-178c323f7399",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-32,
16
],
"webhookId": "aed11dbb-dc38-46c3-a6ec-2b7aeb274f50",
"parameters": {
"path": "aed11dbb-dc38-46c3-a6ec-2b7aeb274f50",
"options": {}
},
"typeVersion": 2.1
},
{
"id": "829e8355-6bf0-4210-b0c0-2df8918597b6",
"name": "Wait",
"type": "n8n-nodes-base.wait",
"position": [
144,
16
],
"webhookId": "604aad21-1b4a-4c24-830e-f39e7e9bdac9",
"parameters": {},
"typeVersion": 1.1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "b2a02384-3c84-4862-abdc-c0b756416cff",
"connections": {
"If": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Get row(s) in sheet",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"Get row(s) in sheet": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
}
}
}