{
  "name": "Detect WooCommerce order delays with Gmail and Slack alerts in real time",
  "nodes": [
    {
      "id": "018e39a3-9113-48a2-87ba-33ac1339cfdc",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        -112
      ],
      "parameters": {
        "width": 464,
        "height": 368,
        "content": "## Trigger & Order Intake\n### This workflow starts with a WooCommerce Order Update Webhook, which listens to real-time order status changes.\n\n### The incoming payload is normalized to extract only req"
      }
    },
    {
      "id": "24403a4d-d5a4-4d4a-a123-84e260636025",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        -208
      ],
      "parameters": {
        "width": 704,
        "height": 464,
        "content": "## Order Eligibility & Validation\n### The workflow validates whether the order is eligible for delay tracking by checking its status.\n### Only orders with the following statuses are processed:\n### • p"
      }
    },
    {
      "id": "8873155c-3b09-4c61-8d38-13fb2a402f2f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1856,
        -96
      ],
      "parameters": {
        "width": 576,
        "height": 304,
        "content": "## Delay Calculation & Decision\n\n### - Once the order is validated, a JavaScript logic node calculates the delay by  comparing the current date with the estimated delivery date.\n### - The delay is con"
      }
    },
    {
      "id": "6ef68189-4ddf-47b7-92ff-5875796204ad",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2464,
        -176
      ],
      "parameters": {
        "width": 704,
        "height": 368,
        "content": "## Notifications & Visibility\n### Customer Notification & Internal Visibility\n\n### For delayed orders, the workflow automatically:\n### • Sends an email notification to the customer\n### • Sends an inte"
      }
    },
    {
      "id": "2ca074e6-44c8-4706-9e1b-937f85342631",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -144
      ],
      "parameters": {
        "width": 736,
        "height": 944,
        "content": "## How it Works:\n\n### This workflow automatically listens for WooCommerce order updates using a webhook trigger.\nWhenever an order status changes, the workflow receives the updated order payload in re"
      }
    },
    {
      "id": "8188b649-fb3a-4e23-a320-93fb4d504f4a",
      "name": "Normalize Order",
      "type": "n8n-nodes-base.set",
      "position": [
        1232,
        288
      ]
    },
    {
      "id": "2ab2de7d-3768-4e37-ab63-e31b99c3df2b",
      "name": "Processing",
      "type": "n8n-nodes-base.if",
      "position": [
        1472,
        288
      ]
    },
    {
      "id": "3333563f-4dd0-48ca-b86d-8630e172e196",
      "name": "Calculate Delivery Delay",
      "type": "n8n-nodes-base.code",
      "position": [
        2288,
        224
      ]
    },
    {
      "id": "baed3046-8cb8-412b-95b5-cbdffece87ae",
      "name": "Validate Delivery Delay",
      "type": "n8n-nodes-base.if",
      "position": [
        2480,
        224
      ]
    },
    {
      "id": "8375cef7-eb2f-43ec-9b2f-05b8aa54fca9",
      "name": "Email Customer",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2752,
        208
      ]
    },
    {
      "id": "f64a0598-c795-4d5c-8421-79ba5b616a8f",
      "name": "Delay Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        3024,
        208
      ]
    },
    {
      "id": "ab91877c-f695-4831-a0b7-a33a7b95970c",
      "name": "ETA Exists?",
      "type": "n8n-nodes-base.if",
      "position": [
        2064,
        240
      ]
    },
    {
      "id": "91ae4ae6-d5b5-4714-8bd0-0ba40efae263",
      "name": "Fetch ETA",
      "type": "n8n-nodes-base.set",
      "position": [
        1872,
        240
      ]
    },
    {
      "id": "c292c93e-1adb-4f63-b23d-3069271485d3",
      "name": "WooCommerce Trigger",
      "type": "n8n-nodes-base.wooCommerceTrigger",
      "position": [
        800,
        288
      ]
    }
  ],
  "connections": {
    "Fetch ETA": {
      "main": [
        [
          {
            "node": "ETA Exists?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Processing": {
      "main": [
        [
          {
            "node": "Fetch ETA",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ETA Exists?": {
      "main": [
        [
          {
            "node": "Calculate Delivery Delay",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Customer": {
      "main": [
        [
          {
            "node": "Delay Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Order": {
      "main": [
        [
          {
            "node": "Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WooCommerce Trigger": {
      "main": [
        [
          {
            "node": "Normalize Order",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Delivery Delay": {
      "main": [
        [
          {
            "node": "Email Customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Delivery Delay": {
      "main": [
        [
          {
            "node": "Validate Delivery Delay",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}