{
  "name": "tool_lookup_crm",
  "nodes": [
    {
      "id": "Start",
      "name": "Start",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1,
      "position": [
        -420,
        120
      ],
      "parameters": {}
    },
    {
      "id": "Airtable Search",
      "name": "Airtable Search",
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        -180,
        120
      ],
      "parameters": {
        "operation": "search",
        "base": "={{ $env.AIRTABLE_BASE_ID }}",
        "table": "Contacts",
        "filterByFormula": "=OR(SEARCH(\"{{$json.name}}\",{Name}),SEARCH(\"{{$json.email || ''}}\",{Email}))"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "Shape",
      "name": "Shape",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        60,
        120
      ],
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "name",
              "value": "={{ $json.fields?.Name }}"
            },
            {
              "name": "email",
              "value": "={{ $json.fields?.Email }}"
            },
            {
              "name": "company",
              "value": "={{ $json.fields?.Company }}"
            },
            {
              "name": "last_contact",
              "value": "={{ $json.fields?.LastContactDate }}"
            }
          ]
        }
      }
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Airtable Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Airtable Search": {
      "main": [
        [
          {
            "node": "Shape",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false
}