AutomationFlowsData & Sheets › Look Up Contact Details with Searchbug Nap+e and Google Sheets

Look Up Contact Details with Searchbug Nap+e and Google Sheets

BySearchbug @searchbug on n8n.io

This workflow collects search inputs from an n8n form, queries the Searchbug NAP+E (api_nape) endpoint for name, address, phone, and email matches, then writes any returned records to Google Sheets and returns a no-results message when nothing is found. Receives a submission…

Event trigger★★★★☆ complexity12 nodesForm TriggerHTTP RequestGoogle Sheets
Data & Sheets Trigger: Event Nodes: 12 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #18068 — we link there as the canonical source.

This workflow follows the Form Trigger → Google Sheets recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "YAxZOWq18m7NuJNQ",
  "name": "Name, Address, Phone & Email \u2014 Searchbug API",
  "tags": [],
  "nodes": [
    {
      "id": "ee2b3f26-59c3-4d82-87f3-b8255804e966",
      "name": "NAP+E Search Form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        336,
        512
      ],
      "parameters": {
        "options": {
          "buttonLabel": "Search Contact Information"
        },
        "formTitle": "Searchbug Contact Lookup",
        "formFields": {
          "values": [
            {
              "fieldType": "dropdown",
              "fieldLabel": "Search Type",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Full Contact Lookup"
                  },
                  {
                    "option": "Find Phone Number"
                  },
                  {
                    "option": "Find Email Address"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldLabel": "First Name",
              "placeholder": "John"
            },
            {
              "fieldLabel": "Last Name",
              "placeholder": "Smith"
            },
            {
              "fieldLabel": "Company Name",
              "placeholder": "ABC Roofing"
            },
            {
              "fieldLabel": "Street Address",
              "placeholder": "123 Main Street"
            },
            {
              "fieldLabel": "City",
              "placeholder": "Dallas"
            },
            {
              "fieldLabel": "County",
              "placeholder": "Dallas"
            },
            {
              "fieldLabel": "State",
              "placeholder": "TX"
            },
            {
              "fieldLabel": "ZIP Code",
              "placeholder": "75201"
            },
            {
              "fieldLabel": "Phone Number",
              "placeholder": "2145551234"
            },
            {
              "fieldType": "email",
              "fieldLabel": "Email Address",
              "placeholder": "john@example.com"
            },
            {
              "fieldLabel": "Reference ID",
              "placeholder": "Client001"
            }
          ]
        },
        "responseMode": "lastNode",
        "formDescription": "Search for people or businesses and retrieve available contact information including name, address, phone number, and email address."
      },
      "typeVersion": 2.2
    },
    {
      "id": "29b806ae-5392-4ed7-adde-c19a592edc84",
      "name": "Set Search Input",
      "type": "n8n-nodes-base.set",
      "position": [
        592,
        512
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a0",
              "name": "SUBTYPE",
              "type": "string",
              "value": "={{ $json['Search Type'] === 'Find Phone Number' ? 'p' : ($json['Search Type'] === 'Find Email Address' ? 'e' : '') }}"
            },
            {
              "id": "a1",
              "name": "FNAME",
              "type": "string",
              "value": "={{ $json['First Name'] ?? '' }}"
            },
            {
              "id": "a2",
              "name": "LNAME",
              "type": "string",
              "value": "={{ $json['Last Name'] ?? '' }}"
            },
            {
              "id": "a3",
              "name": "CO_NAME",
              "type": "string",
              "value": "={{ $json['Company Name'] ?? '' }}"
            },
            {
              "id": "a4",
              "name": "ADDRESS",
              "type": "string",
              "value": "={{ $json['Street Address'] ?? '' }}"
            },
            {
              "id": "a5",
              "name": "CITY",
              "type": "string",
              "value": "={{ $json['City'] ?? '' }}"
            },
            {
              "id": "a6",
              "name": "COUNTY",
              "type": "string",
              "value": "={{ $json['County'] ?? '' }}"
            },
            {
              "id": "a7",
              "name": "STATE",
              "type": "string",
              "value": "={{ $json['State'] ?? '' }}"
            },
            {
              "id": "a8",
              "name": "ZIP",
              "type": "string",
              "value": "={{ $json['ZIP Code'] ?? '' }}"
            },
            {
              "id": "a9",
              "name": "PHONE",
              "type": "string",
              "value": "={{ $json['Phone Number'] ?? '' }}"
            },
            {
              "id": "a10",
              "name": "E_MAIL",
              "type": "string",
              "value": "={{ $json['Email Address'] ?? '' }}"
            },
            {
              "id": "a11",
              "name": "REF",
              "type": "string",
              "value": "={{ $json['Reference ID'] ?? '' }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "81ee315d-c56a-4614-8d46-689b1f8afc08",
      "name": "NAP+E API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        880,
        512
      ],
      "parameters": {
        "url": "https://data.searchbug.com/api/search.aspx",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "CO_CODE"
            },
            {
              "name": "PASS"
            },
            {
              "name": "TYPE",
              "value": "api_nape"
            },
            {
              "name": "FORMAT",
              "value": "JSON"
            },
            {
              "name": "SUBTYPE",
              "value": "={{ $json.SUBTYPE }}"
            },
            {
              "name": "FNAME",
              "value": "={{ $json.FNAME }}"
            },
            {
              "name": "LNAME",
              "value": "={{ $json.LNAME }}"
            },
            {
              "name": "CO_NAME",
              "value": "={{ $json.CO_NAME }}"
            },
            {
              "name": "ADDRESS",
              "value": "={{ $json.ADDRESS }}"
            },
            {
              "name": "CITY",
              "value": "={{ $json.CITY }}"
            },
            {
              "name": "COUNTY",
              "value": "={{ $json.COUNTY }}"
            },
            {
              "name": "STATE",
              "value": "={{ $json.STATE }}"
            },
            {
              "name": "ZIP",
              "value": "={{ $json.ZIP }}"
            },
            {
              "name": "PHONE",
              "value": "={{ $json.PHONE }}"
            },
            {
              "name": "E_MAIL",
              "value": "={{ $json.E_MAIL }}"
            },
            {
              "name": "REF",
              "value": "={{ $json.REF }}"
            }
          ]
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "6c601f23-1e2c-4d23-bffd-e0c958a32a08",
      "name": "Check Status",
      "type": "n8n-nodes-base.if",
      "position": [
        1136,
        512
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c1",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.STATUS }}",
              "rightValue": "SUCCESS"
            },
            {
              "id": "c2",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.DATA?.RECORD ? 'exists' : 'empty' }}",
              "rightValue": "exists"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "17246e57-6e9c-4f38-94c8-5374d6c390c8",
      "name": "Normalize Record",
      "type": "n8n-nodes-base.code",
      "position": [
        1392,
        416
      ],
      "parameters": {
        "jsCode": "const item = $input.first().json;\nconst record = item.DATA?.RECORD;\nconst meta = {\n  STATUS: item.STATUS ?? '',\n  SRC: item.DATA?.SRC ?? '',\n  PHFND: item.DATA?.PHFND ?? '',\n  ADFND: item.DATA?.ADFND ?? '',\n  EMFND: item.DATA?.EMFND ?? '',\n  ERROR: item.ERROR ?? ''\n};\nif (!record) return [];\nconst records = Array.isArray(record) ? record : [record];\nreturn records.map(r => ({ json: { ...meta, ...r } }));"
      },
      "typeVersion": 2
    },
    {
      "id": "212519b1-a843-4b41-8325-eadd3a50def1",
      "name": "Map Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1632,
        416
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "m0",
              "name": "STATUS",
              "type": "string",
              "value": "={{ $json.STATUS ?? '' }}"
            },
            {
              "id": "m1",
              "name": "SRC",
              "type": "string",
              "value": "={{ $json.SRC ?? '' }}"
            },
            {
              "id": "m2",
              "name": "PHFND",
              "type": "string",
              "value": "={{ $json.PHFND ?? '' }}"
            },
            {
              "id": "m3",
              "name": "ADFND",
              "type": "string",
              "value": "={{ $json.ADFND ?? '' }}"
            },
            {
              "id": "m4",
              "name": "EMFND",
              "type": "string",
              "value": "={{ $json.EMFND ?? '' }}"
            },
            {
              "id": "m5",
              "name": "FNAME",
              "type": "string",
              "value": "={{ $json.FNAME ?? '' }}"
            },
            {
              "id": "m6",
              "name": "LNAME",
              "type": "string",
              "value": "={{ $json.LNAME ?? '' }}"
            },
            {
              "id": "m7",
              "name": "BNAME",
              "type": "string",
              "value": "={{ $json.BNAME ?? '' }}"
            },
            {
              "id": "m8",
              "name": "PHONE",
              "type": "string",
              "value": "={{ $json.PHONE ?? '' }}"
            },
            {
              "id": "m9",
              "name": "ADDRESS",
              "type": "string",
              "value": "={{ $json.ADDRESS ?? '' }}"
            },
            {
              "id": "m10",
              "name": "CITY",
              "type": "string",
              "value": "={{ $json.CITY ?? '' }}"
            },
            {
              "id": "m11",
              "name": "STATE",
              "type": "string",
              "value": "={{ $json.STATE ?? '' }}"
            },
            {
              "id": "m12",
              "name": "ZIP",
              "type": "string",
              "value": "={{ $json.ZIP ?? '' }}"
            },
            {
              "id": "m13",
              "name": "EMAIL",
              "type": "string",
              "value": "={{ $json.EMAIL ?? '' }}"
            },
            {
              "id": "m14",
              "name": "ERROR",
              "type": "string",
              "value": "={{ $json.ERROR ?? '' }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "13274255-2c2b-47a4-85c7-0fa4870764bb",
      "name": "No Records Found",
      "type": "n8n-nodes-base.set",
      "position": [
        1392,
        672
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "e1",
              "name": "message",
              "type": "string",
              "value": "No records found. Please check your search inputs or try a different combination."
            },
            {
              "id": "e2",
              "name": "api_status",
              "type": "string",
              "value": "={{ $json.STATUS ?? 'FAILED' }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "3380de3b-c612-4618-aed8-444787a90834",
      "name": "Save to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2048,
        416
      ],
      "parameters": {
        "columns": {
          "value": {
            "SRC": "={{ $json.SRC }}",
            "ZIP": "={{ $json.ZIP }}",
            "CITY": "={{ $json.CITY }}",
            "ADFND": "={{ $json.ADFND }}",
            "BNAME": "={{ $json.BNAME }}",
            "EMAIL": "={{ $json.EMAIL }}",
            "EMFND": "={{ $json.EMFND }}",
            "ERROR": "={{ $json.ERROR }}",
            "FNAME": "={{ $json.FNAME }}",
            "LNAME": "={{ $json.LNAME }}",
            "PHFND": "={{ $json.PHFND }}",
            "PHONE": "={{ $json.PHONE }}",
            "STATE": "={{ $json.STATE }}",
            "STATUS": "={{ $json.STATUS }}",
            "ADDRESS": "={{ $json.ADDRESS }}"
          },
          "schema": [
            {
              "id": "STATUS",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "STATUS",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "SRC",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "SRC",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "PHFND",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "PHFND",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ADFND",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ADFND",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "EMFND",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "EMFND",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FNAME",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "FNAME",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LNAME",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "LNAME",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "BNAME",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "BNAME",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "PHONE",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "PHONE",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ADDRESS",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ADDRESS",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "CITY",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "CITY",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "STATE",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "STATE",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZIP",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ZIP",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "EMAIL",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "EMAIL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ERROR",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ERROR",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "NAP and Email"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "1XkeYRHD2qs145Ashc0qrisUDxDkrWu1WlhddaYyB8N8"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "8c1bfa01-495d-4caa-acc5-a4035bf9d41d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -352,
        -32
      ],
      "parameters": {
        "color": "#FEEA87",
        "width": 540,
        "height": 880,
        "content": "## \ud83d\udcc7 NAP+E \u2014 Searchbug (api_nape)\n\nLook up Name, Address, Phone & Email for a person or business \u2014 with a Full, Phone-only, or Email-only search mode \u2014 straight from a web form into Google Sheets.\n\n### How it works\n1. Choose a Search Type and fill in what you know (name/address, or just a phone/email).\n2. The workflow queries Searchbug's NAP+E API.\n3. Check Status routes found vs. not-found; each matching record becomes its own row.\n4. Matching contacts are saved to Google Sheets. If nothing matches, a \"No Records Found\" message is returned.\n\n### How to set up\n- [ ] Add your Searchbug CO_CODE + PASS in the HTTP Request (Body Parameters)\n- [ ] Connect your OWN Google Sheets account in the Save node\n- [ ] Change the Document to your own spreadsheet + tab\n- [ ] Create a tab whose row 1 headers match the 15 columns in the Save node\n- [ ] Activate and share the form link\n\n### Search Types\n- Full Contact Lookup \u2192 SUBTYPE blank\n- Find Phone Number \u2192 SUBTYPE = p\n- Find Email Address \u2192 SUBTYPE = e\n\n### Customization\n- Enter ONLY a phone or email for a reverse lookup.\n- Add a Slack/email alert after Save."
      },
      "typeVersion": 1
    },
    {
      "id": "7b1afa5b-95d8-4067-b84b-665afcfe00fe",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        224
      ],
      "parameters": {
        "color": 7,
        "width": 480,
        "height": 640,
        "content": "## 1. Enter Search\n\nChoose a Search Type, then fill in any valid combination: name + city + state, a company name, an address, or just a phone / email for reverse lookup. The inputs are mapped to the Searchbug API parameters."
      },
      "typeVersion": 1
    },
    {
      "id": "f0fd1509-cd57-4ec9-a13d-9465be5967c1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        768,
        224
      ],
      "parameters": {
        "color": 7,
        "width": 1080,
        "height": 640,
        "content": "## 2. Search, Validate & Normalize\n\nQueries the NAP+E API. Check Status routes found vs. not-found. Normalize Record safely handles single or multiple matches (one row each), and Map Fields shapes the columns. If nothing is found, No Records Found returns a message."
      },
      "typeVersion": 1
    },
    {
      "id": "4e3ef79f-8c4e-4d66-99b6-9453a3bc50c9",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1872,
        224
      ],
      "parameters": {
        "color": "#FCD9DD",
        "width": 460,
        "height": 640,
        "content": "## \u26a0\ufe0f 3. Save to Google Sheets\n\nConnect your OWN Google Sheets credential and select your spreadsheet and tab. Create your tab with headers matching the 15 columns in this node.\n\nDon't click \u22ee \u2192 Refresh \u2014 it erases the column mapping."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "848b60b4-a935-40ee-80ce-b326fa15e661",
  "nodeGroups": [],
  "connections": {
    "NAP+E API": {
      "main": [
        [
          {
            "node": "Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map Fields": {
      "main": [
        [
          {
            "node": "Save to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Status": {
      "main": [
        [
          {
            "node": "Normalize Record",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Records Found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Record": {
      "main": [
        [
          {
            "node": "Map Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Search Input": {
      "main": [
        [
          {
            "node": "NAP+E API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "NAP+E Search Form": {
      "main": [
        [
          {
            "node": "Set Search Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow collects search inputs from an n8n form, queries the Searchbug NAP+E (api_nape) endpoint for name, address, phone, and email matches, then writes any returned records to Google Sheets and returns a no-results message when nothing is found. Receives a submission…

Source: https://n8n.io/workflows/18068/ — original creator credit. Request a take-down →

More Data & Sheets workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Data & Sheets

Overview 🌐

Form Trigger, HTTP Request, Google Sheets
Data & Sheets

Splitout Code. Uses splitOut, httpRequest, googleSheets, stickyNote. Event-driven trigger; 36 nodes.

HTTP Request, Google Sheets, Form Trigger +1
Data & Sheets

This n8n workflow is designed for Customer Success Managers (CSM), marketers, sales teams, and data administrators who need to automate the process of uploading and processing CSV data in HubSpot. It

HTTP Request, Google Sheets, Form Trigger +1
Data & Sheets

The SEO On Page API is a powerful tool for keyword research, competitor analysis, backlink insights, and overall SEO optimization. With multiple endpoints, you can instantly gather actionable SEO data

Form Trigger, HTTP Request, Google Sheets
Data & Sheets

Demonstration video

Form Trigger, HTTP Request, Google Sheets