{
  "name": "Ping WhatsApp the Instant a New Magento Order Comes In",
  "nodes": [
    {
      "name": "Magento — New Order",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "parameters": {
        "method": "POST",
        "url": "https://api.example.com/replace-with-real-endpoint",
        "sendBody": true,
        "options": {}
      },
      "notes": "Magento has no dedicated n8n node — use an HTTP Request to the Magento API. Use Magento's \"Order Created\" trigger; a Webhook works too.",
      "position": [
        260,
        300
      ]
    },
    {
      "name": "Build Summary",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "630",
              "name": "summary",
              "value": "=New order #{{ $json.order_number }} — {{ $json.customer.name }} — {{ $json.total_price }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "notes": "",
      "position": [
        500,
        300
      ]
    },
    {
      "name": "Send WhatsApp",
      "type": "n8n-nodes-base.twilio",
      "typeVersion": 1,
      "parameters": {
        "operation": "send",
        "message": "={{ $json.summary }}"
      },
      "notes": "Use a Twilio number; WhatsApp requires an approved sender.",
      "position": [
        740,
        300
      ]
    },
    {
      "name": "Respond / Finish",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "parameters": {},
      "notes": "End of flow — extend with extra steps as needed.",
      "position": [
        980,
        300
      ]
    }
  ],
  "connections": {
    "Magento — New Order": {
      "main": [
        [
          {
            "node": "Build Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Summary": {
      "main": [
        [
          {
            "node": "Send WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send WhatsApp": {
      "main": [
        [
          {
            "node": "Respond / Finish",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
