{
  "name": "Meta Lead Ads → Lancer",
  "nodes": [
    {
      "parameters": {
        "page": { "__rl": true, "mode": "list", "value": "" },
        "form": { "__rl": true, "mode": "list", "value": "" },
        "event": "newLead",
        "options": { "simplifyOutput": false }
      },
      "id": "5a4b1c2d-0001-4000-8000-000000000001",
      "name": "Facebook Lead Ads Trigger",
      "type": "n8n-nodes-base.facebookLeadAdsTrigger",
      "typeVersion": 1,
      "position": [0, 0],
      "notes": "Connect your Facebook account, then pick the page and the lead form."
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://api.lancer-erp.com/webhooks/leads/PASTE_YOUR_FORM_TOKEN?format=meta",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ form_name: $json.form?.name ?? '', campaign_name: $json.campaign?.name ?? '', field_data: $json.data?.field_data ?? $json.field_data ?? [] }) }}",
        "options": { "response": { "response": { "neverError": false } } }
      },
      "id": "5a4b1c2d-0001-4000-8000-000000000002",
      "name": "Send to Lancer",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [320, 0],
      "notes": "Replace the URL with the webhook URL of a lead form in Lancer (Settings → Sales → Lead forms)."
    }
  ],
  "connections": {
    "Facebook Lead Ads Trigger": { "main": [[{ "node": "Send to Lancer", "type": "main", "index": 0 }]] }
  },
  "settings": { "executionOrder": "v1" },
  "pinData": {}
}
