{
  "name": "Gary Club — Airtable New Record → Create Contact",
  "nodes": [
    {
      "parameters": {
        "content": "## ⚡ After import — 3 steps\n\n**1. Set your Airtable credential**\nClick **Airtable Trigger** → set an Airtable Personal Access Token credential. Make sure the token has `data.records:read` scope for the base.\n\n**2. Set your Gary Club credential**\nClick **Upsert Contact** → set **Credential for Header Auth** to your Gary Club Agency key.\n\n**3. Configure the Airtable base**\nIn **Airtable Trigger**, set:\n- **Base** — select your Airtable base.\n- **Table** — select the table to watch.\nThen in **Map Fields**, map the `email`, `first_name`, `last_name`, and `phone` fields to your actual Airtable column names.\n\n📋 **Notes**\n- Airtable polling checks for new records every minute by default.\n- The contact upsert is **idempotent on email + phone** — safe to re-run.\n- If your Airtable table has a single `Name` column, use a **Code** node to split it: `const [first, ...rest] = name.split(' '); return { first_name: first, last_name: rest.join(' ') }`.\n- `source` is set to `airtable` for CRM attribution tracking.\n\n📚 Docs: https://docs.gary.club/api/contacts",
        "height": 420,
        "width": 400,
        "color": 5
      },
      "id": "cc000000-0000-4000-8000-000000000000",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-220, 60]
    },
    {
      "parameters": {
        "baseId": { "__rl": true, "value": "YOUR_BASE_ID", "mode": "id" },
        "tableId": { "__rl": true, "value": "YOUR_TABLE_ID", "mode": "id" },
        "triggerField": "Created",
        "additionalOptions": {}
      },
      "id": "cc000000-0001-4000-8000-000000000001",
      "name": "Airtable Trigger",
      "type": "n8n-nodes-base.airtableTrigger",
      "typeVersion": 1,
      "position": [260, 300],
      "webhookId": "cc000000-webhook-4000-8000-000000000001"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            { "id": "f1", "name": "email", "value": "={{ $json.fields.Email }}", "type": "string" },
            { "id": "f2", "name": "first_name", "value": "={{ $json.fields['First Name'] }}", "type": "string" },
            { "id": "f3", "name": "last_name", "value": "={{ $json.fields['Last Name'] }}", "type": "string" },
            { "id": "f4", "name": "phone", "value": "={{ $json.fields.Phone }}", "type": "string" }
          ]
        },
        "options": {}
      },
      "id": "cc000000-0002-4000-8000-000000000002",
      "name": "Map Fields",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [500, 300]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://agency.gary.club/api/public/v1/crm/contacts",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            { "name": "email", "value": "={{ $json.email }}" },
            { "name": "first_name", "value": "={{ $json.first_name }}" },
            { "name": "last_name", "value": "={{ $json.last_name }}" },
            { "name": "phone", "value": "={{ $json.phone }}" },
            { "name": "source", "value": "airtable" }
          ]
        },
        "options": {}
      },
      "id": "cc000000-0003-4000-8000-000000000003",
      "name": "Upsert Contact",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [740, 300]
    }
  ],
  "connections": {
    "Airtable Trigger": { "main": [[{ "node": "Map Fields", "type": "main", "index": 0 }]] },
    "Map Fields": { "main": [[{ "node": "Upsert Contact", "type": "main", "index": 0 }]] }
  },
  "active": false,
  "settings": { "executionOrder": "v1" },
  "tags": [{ "name": "gary-club-api" }]
}
