{
  "name": "Order → GHL Contact Sync (abuusof.com)",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "new-order",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "9f1c2a10-1111-4a01-9c01-a1b2c3d4e501",
      "name": "New order (Webhook)",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [0, 0],
      "webhookId": "new-order"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://services.leadconnectorhq.com/contacts/upsert",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "Authorization", "value": "Bearer YOUR_PRIVATE_INTEGRATION_TOKEN" },
            { "name": "Version", "value": "2021-07-28" },
            { "name": "Content-Type", "value": "application/json" }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ locationId: 'YOUR_LOCATION_ID', email: $json.body.email, phone: $json.body.phone, firstName: $json.body.firstName, lastName: $json.body.lastName, tags: ['ordered', 'source:online-ordering'] }) }}",
        "options": {}
      },
      "id": "9f1c2a10-1111-4a01-9c01-a1b2c3d4e502",
      "name": "Upsert GHL contact",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [240, 0]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({ ok: true, contactId: $json.contact ? $json.contact.id : null }) }}",
        "options": {}
      },
      "id": "9f1c2a10-1111-4a01-9c01-a1b2c3d4e503",
      "name": "Respond",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [480, 0]
    }
  ],
  "connections": {
    "New order (Webhook)": { "main": [[{ "node": "Upsert GHL contact", "type": "main", "index": 0 }]] },
    "Upsert GHL contact": { "main": [[{ "node": "Respond", "type": "main", "index": 0 }]] }
  },
  "pinData": {},
  "settings": { "executionOrder": "v1" },
  "meta": {
    "notes": "POST your order payload (email, phone, firstName, lastName) to the webhook. Replace YOUR_PRIVATE_INTEGRATION_TOKEN (GHL Settings → Private Integrations, scopes: contacts.write) and YOUR_LOCATION_ID. From abuusof.com/connect-n8n-to-gohighlevel/"
  }
}
