Salla abandoned cart reminders on WhatsApp

When a Salla cart is abandoned, send the customer a friendly WhatsApp reminder with a link back to their cart.

Medium Saves ~6 hours/month MENA & local appsBy Flowngn team

Works with n8n · Make · Zapier

How it works

Trigger: Webhook — Salla abandoned cart event
  1. Receive the abandoned cart event from Salla.
  2. Keep carts that have a phone number and a checkout link.
  3. Send an approved WhatsApp template with the customer's name, total and cart link.
  4. Log the reminder in a sheet so you can see how many carts come back.

Diagram

trueSalla abandoned cartWebhook{ }Read cartCode⑂Has phone and link?IfWSend cart reminderWhatsApp Business CloudGLog reminderGoogle Sheets
Trigger App Logic Code

Code

JavaScript used in the Code step — already included in the template below.

Read cart · Code node
// Mode: Run Once for Each Item
// Salla abandoned.cart webhook → clean fields for the WhatsApp reminder.
// Run one test cart first and check the field names in the webhook data.
const o = $json.body?.data || {};
const c = o.customer || {};

return {
  json: {
    cart_id: o.id,
    name: c.name || [c.first_name, c.last_name].filter(Boolean).join(" "),
    phone: `${c.mobile_code || ""}${c.mobile || ""}`.replace(/[^0-9]/g, ""),
    total: `${o.total?.amount ?? ""} ${o.total?.currency ?? ""}`.trim(),
    url: o.checkout_url || "",
  },
};

Build it

Pick your tool — same automation, step by step.

Copy and paste straight into an n8n canvas (Ctrl+V), or download and use Import from File. Then connect your own credentials and replace every YOUR_… placeholder.

Workflow JSON
Show code (209 lines)
{
  "name": "Salla abandoned cart reminders on WhatsApp (Flowngn)",
  "nodes": [
    {
      "parameters": {
        "content": "## Salla abandoned cart reminders on WhatsApp\nWhen a Salla cart is abandoned, send the customer a friendly WhatsApp reminder with a link back to their cart.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
        "height": 260,
        "width": 340
      },
      "id": "4582ffa0-b14a-4d3f-a4ae-9194c18933a0",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -420,
        -60
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "salla-abandoned-cart",
        "options": {}
      },
      "id": "4582ffa0-b14a-4d3f-a4ae-9194c18933a0",
      "name": "Salla abandoned cart",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        0
      ],
      "webhookId": "4582ffa0-b14a-4d3f-a4ae-9194c18933a0"
    },
    {
      "parameters": {
        "jsCode": "// Mode: Run Once for Each Item\n// Salla abandoned.cart webhook → clean fields for the WhatsApp reminder.\n// Run one test cart first and check the field names in the webhook data.\nconst o = $json.body?.data || {};\nconst c = o.customer || {};\n\nreturn {\n  json: {\n    cart_id: o.id,\n    name: c.name || [c.first_name, c.last_name].filter(Boolean).join(\" \"),\n    phone: `${c.mobile_code || \"\"}${c.mobile || \"\"}`.replace(/[^0-9]/g, \"\"),\n    total: `${o.total?.amount ?? \"\"} ${o.total?.currency ?? \"\"}`.trim(),\n    url: o.checkout_url || \"\",\n  },\n};",
        "mode": "runOnceForEachItem"
      },
      "id": "4582ffa0-b14a-4d3f-a4ae-9194c18933a0",
      "name": "Read cart",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        300,
        0
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "c1",
              "leftValue": "={{ $json.phone.length >= 10 && $json.url !== '' }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "4582ffa0-b14a-4d3f-a4ae-9194c18933a0",
      "name": "Has phone and link?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        600,
        0
      ]
    },
    {
      "parameters": {
        "operation": "sendTemplate",
        "phoneNumberId": "YOUR_PHONE_NUMBER_ID",
        "recipientPhoneNumber": "={{ $json.phone }}",
        "template": "YOUR_CART_REMINDER_TEMPLATE|ar",
        "components": {
          "component": [
            {
              "type": "body",
              "bodyParameters": {
                "parameter": [
                  {
                    "type": "text",
                    "text": "={{ $json.name || 'عميلنا العزيز' }}"
                  },
                  {
                    "type": "text",
                    "text": "={{ $json.total }}"
                  },
                  {
                    "type": "text",
                    "text": "={{ $json.url }}"
                  }
                ]
              }
            }
          ]
        }
      },
      "id": "4582ffa0-b14a-4d3f-a4ae-9194c18933a0",
      "name": "Send cart reminder",
      "type": "n8n-nodes-base.whatsApp",
      "typeVersion": 1,
      "position": [
        900,
        0
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SPREADSHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Cart reminders",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "date": "={{ $now.toISO() }}",
            "cart_id": "={{ $('Read cart').item.json.cart_id }}",
            "phone": "={{ $('Read cart').item.json.phone }}",
            "total": "={{ $('Read cart').item.json.total }}"
          }
        },
        "options": {}
      },
      "id": "4582ffa0-b14a-4d3f-a4ae-9194c18933a0",
      "name": "Log reminder",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1200,
        0
      ]
    }
  ],
  "connections": {
    "Salla abandoned cart": {
      "main": [
        [
          {
            "node": "Read cart",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read cart": {
      "main": [
        [
          {
            "node": "Has phone and link?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has phone and link?": {
      "main": [
        [
          {
            "node": "Send cart reminder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send cart reminder": {
      "main": [
        [
          {
            "node": "Log reminder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}

Open in the playground to edit →

Tips

  • Only message customers who agreed to WhatsApp messages.
  • Salla can also send its own abandoned-cart SMS; turn one off so customers don't get two reminders.

Related flows