{
  "name": "Recover abandoned WooCommerce carts with custom coupon emails",
  "nodes": [
    {
      "id": "49fbfe38-6c4d-4d98-8bee-6f3cbed260ee",
      "name": "No Operation, do nothing1",
      "type": "n8n-nodes-base.noOp",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "9dffd428-e03e-4aaa-bef0-c9356dfd4c95",
      "name": "Fetching Cart Contents",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1024,
        80
      ]
    },
    {
      "id": "da6a3a81-4495-4b9a-acc9-9d756cb4f243",
      "name": "Waiting Time",
      "type": "n8n-nodes-base.wait",
      "position": [
        -848,
        80
      ]
    },
    {
      "id": "0a19f77e-d3b2-41e8-8a61-6be83fd536b7",
      "name": "Fetching If Customer has placed order",
      "type": "n8n-nodes-base.wooCommerce",
      "position": [
        -656,
        80
      ]
    },
    {
      "id": "f60a0edc-d6c3-40cf-8c56-7e469aff6faa",
      "name": "If, There's a Order Placed",
      "type": "n8n-nodes-base.if",
      "position": [
        -224,
        80
      ]
    },
    {
      "id": "fa08116b-5b16-4d35-a500-d5674fd9210b",
      "name": "Abandoned Cart Recovery Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        720,
        192
      ]
    },
    {
      "id": "152ac14f-ba84-4f0f-b413-7f53a37414fa",
      "name": "Set Default Order Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -448,
        80
      ]
    },
    {
      "id": "b7aaf7e2-acb5-4fc5-b995-695ad788faa6",
      "name": "Generate Unique Coupon Code",
      "type": "n8n-nodes-base.code",
      "position": [
        0,
        192
      ]
    },
    {
      "id": "554fc78c-2c70-441a-9a8a-6cab7006d139",
      "name": "Create Abandoned Cart Coupon (HTTP)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        240,
        192
      ]
    },
    {
      "id": "fb2119a3-91fb-4910-82d9-bb8cd139e5d8",
      "name": "Generate Email HTML",
      "type": "n8n-nodes-base.code",
      "position": [
        480,
        192
      ]
    },
    {
      "id": "18f67ec7-d8ee-4626-b52d-d1de37d5aaed",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1856,
        -304
      ],
      "parameters": {
        "width": 480,
        "height": 1392,
        "content": "# Recover abandoned carts with custom coupons for WooCommerce\n\n\nThis n8n workflow helps you recover lost sales opportunities by automatically sending personalized emails with a customized coupon to yo"
      }
    },
    {
      "id": "e184c052-e398-4b02-bd6d-ed5669afceaf",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1264,
        -256
      ],
      "parameters": {
        "width": 384,
        "height": 288,
        "content": "## 1. Configuring webhook in n8n and WooCommerce\n\nSet up the webhook path and configure it in WooCommerce. Follow the given steps:\n- Go to WooCommerce Settings > Advanced > Webhook\n- Create a webhook "
      }
    },
    {
      "id": "7480b529-059b-4033-9dd8-1250a5c44fda",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        304
      ],
      "parameters": {
        "width": 448,
        "height": 368,
        "content": "##  2. Add the provided code to your WP (WooCommerce) website to enable the features of fetching cart details and coupon code customization\n\n** This PHP Code Snippet needs to be added in either the fu"
      }
    },
    {
      "id": "fbc9567b-45b0-47a5-b283-c4a35938719c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        384
      ],
      "parameters": {
        "width": 416,
        "height": 304,
        "content": "## 3. Customize the coupon code according to your needs\n\n- In COUPON_PREFIX, you need to set the phrase of the coupon, for example, your coupon to be HELLOxxx, then you need to put it in HELLO.\n- In E"
      }
    },
    {
      "id": "286eb849-4c3a-46fc-9736-ec79a21054fa",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        -208
      ],
      "parameters": {
        "width": 336,
        "height": 352,
        "content": "## 4. Customize email HTML according to your needs\n\n\n- Add HTML Code and set the variables defined in it to fetch values dynamically.\n\n- In TIMEZONE, you need to set the timezone according to your WP "
      }
    }
  ],
  "connections": {
    "Waiting Time": {
      "main": [
        [
          {
            "node": "Fetching If Customer has placed order",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Email HTML": {
      "main": [
        [
          {
            "node": "Abandoned Cart Recovery Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetching Cart Contents": {
      "main": [
        [
          {
            "node": "Waiting Time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Default Order Data": {
      "main": [
        [
          {
            "node": "If, There's a Order Placed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If, There's a Order Placed": {
      "main": [
        [
          {
            "node": "No Operation, do nothing1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate Unique Coupon Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Unique Coupon Code": {
      "main": [
        [
          {
            "node": "Create Abandoned Cart Coupon (HTTP)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Abandoned Cart Coupon (HTTP)": {
      "main": [
        [
          {
            "node": "Generate Email HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetching If Customer has placed order": {
      "main": [
        [
          {
            "node": "Set Default Order Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}