{
  "name": "Find businesses with no website and write AI cold-call openers into Google Sheets",
  "nodes": [
    {
      "parameters": {},
      "id": "8b2d3c74-4a7f-4cab-9c65-2e3f4a5b6c01",
      "name": "Run it",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        300
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "query",
              "value": "Nail salon",
              "type": "string"
            },
            {
              "id": "a2",
              "name": "country",
              "value": "us",
              "type": "string"
            },
            {
              "id": "a3",
              "name": "states",
              "value": "Ohio",
              "type": "string"
            },
            {
              "id": "a4",
              "name": "cities",
              "value": "Columbus",
              "type": "string"
            },
            {
              "id": "a5",
              "name": "max_total_results",
              "value": 25,
              "type": "number"
            },
            {
              "id": "a6",
              "name": "require_phone",
              "value": true,
              "type": "boolean"
            },
            {
              "id": "a8",
              "name": "exclude_website",
              "value": true,
              "type": "boolean"
            },
            {
              "id": "a7",
              "name": "min_rating",
              "value": 0,
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "id": "8b2d3c74-4a7f-4cab-9c65-2e3f4a5b6c02",
      "name": "Your search",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        220,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.mapsharvest.com/scrape",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ query: $json.query, country: $json.country, states: $json.states, cities: $json.cities || undefined, max_total_results: $json.max_total_results, require_phone: $json.require_phone, exclude_website: $json.exclude_website, min_rating: $json.min_rating || undefined, name: 'n8n: ' + $json.query + ' in ' + ($json.cities || $json.states) }) }}",
        "options": {}
      },
      "id": "8b2d3c74-4a7f-4cab-9c65-2e3f4a5b6c03",
      "name": "Start the search",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        440,
        300
      ]
    },
    {
      "parameters": {
        "amount": 30
      },
      "id": "8b2d3c74-4a7f-4cab-9c65-2e3f4a5b6c04",
      "name": "Wait 30 seconds",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        660,
        300
      ],
      "webhookId": "0d7c5f4e-3a1b-4c2d-9e8f-7a6b5c4d3e21"
    },
    {
      "parameters": {
        "url": "=https://api.mapsharvest.com/jobs/{{ $('Start the search').first().json.job_id }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "id": "8b2d3c74-4a7f-4cab-9c65-2e3f4a5b6c05",
      "name": "Check progress",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        880,
        300
      ]
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict"
                },
                "conditions": [
                  {
                    "id": "c1",
                    "leftValue": "={{ ['completed', 'stopped'].includes($json.status) }}",
                    "rightValue": true,
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Finished"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict"
                },
                "conditions": [
                  {
                    "id": "c2",
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "failed",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Failed"
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra",
          "renameFallbackOutput": "Still running"
        }
      },
      "id": "8b2d3c74-4a7f-4cab-9c65-2e3f4a5b6c06",
      "name": "Finished?",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        1100,
        300
      ]
    },
    {
      "parameters": {
        "url": "=https://api.mapsharvest.com/jobs/{{ $('Start the search').first().json.job_id }}/download?fmt=csv",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "id": "8b2d3c74-4a7f-4cab-9c65-2e3f4a5b6c07",
      "name": "Download the leads",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1340,
        160
      ]
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "8b2d3c74-4a7f-4cab-9c65-2e3f4a5b6c08",
      "name": "Read the CSV",
      "type": "n8n-nodes-base.extractFromFile",
      "typeVersion": 1,
      "position": [
        1560,
        160
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You write the first sentence a web designer says when cold-calling a local business.\n\nThe business: {{ $json.Name }}, a {{ $json.Category }} in {{ $json.City }}, rated {{ $json.Rating || 'unrated' }} from {{ $json['Review Count'] || 'no' }} Google reviews. It has no website.\n\nWrite one friendly, natural sentence of at most 25 words that mentions one specific detail above and leads into offering them a website. No greeting, no emojis, no exclamation marks. Reply with the sentence only.",
        "batching": {}
      },
      "id": "8b2d3c74-4a7f-4cab-9c65-2e3f4a5b6c20",
      "name": "Write the opener",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.9,
      "position": [
        1780,
        160
      ]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-5-mini",
          "mode": "list",
          "cachedResultName": "gpt-5-mini"
        },
        "options": {}
      },
      "id": "8b2d3c74-4a7f-4cab-9c65-2e3f4a5b6c21",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        1780,
        380
      ]
    },
    {
      "parameters": {
        "mode": "raw",
        "jsonOutput": "={{ { ...$('Read the CSV').item.json, 'Opening line': $json.text } }}",
        "options": {}
      },
      "id": "8b2d3c74-4a7f-4cab-9c65-2e3f4a5b6c22",
      "name": "Add the opener to the lead",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        2200,
        160
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "",
          "mode": "list",
          "cachedResultName": ""
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1"
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {},
          "matchingColumns": [],
          "schema": []
        },
        "options": {}
      },
      "id": "8b2d3c74-4a7f-4cab-9c65-2e3f4a5b6c09",
      "name": "Add to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        2440,
        160
      ]
    },
    {
      "parameters": {
        "errorMessage": "={{ 'The Maps Harvest search failed: ' + ($json.error || 'no reason given') }}"
      },
      "id": "8b2d3c74-4a7f-4cab-9c65-2e3f4a5b6c10",
      "name": "Stop: search failed",
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        1340,
        320
      ]
    },
    {
      "parameters": {
        "content": "## Businesses with no website, each with an AI-written opener\n\nBuilt for web designers and agencies. **Maps Harvest** finds businesses of one kind in one place that have **no website** and a phone number, then AI writes a one-sentence cold-call opener for each, using its rating and reviews. Everything lands in your Google Sheet, ready to call.\n\n### Set up (5 minutes)\n1. Get a free API key: sign up at [mapsharvest.com](https://www.mapsharvest.com/signup?utm_source=n8n&utm_medium=template&utm_campaign=nowebsite), then **Dashboard → Integrations → API access**. The free plan includes 50 leads.\n2. Create a **Header Auth** credential: Name `Authorization`, Value `Bearer mh_live_...` (your key). Pick it in the three Maps Harvest HTTP nodes.\n3. Add your OpenAI credential to **OpenAI Chat Model** (or swap it for any other chat model, such as Claude or Gemini).\n4. Edit **Your search**: business type, country (`us`, `uk`, `canada`, `australia`, `germany`, `india`), state or region, city, and how many leads.\n5. Connect Google Sheets and pick your spreadsheet in **Add to Google Sheets**. Use an empty sheet.\n\nIf the sheet stays empty, no business in that place matched: try a bigger area (leave the city empty to search the whole state) or another business type. Change the prompt in **Write the opener** to match what you sell. Each lead uses one Maps Harvest credit. API docs: [mapsharvest.com/docs](https://www.mapsharvest.com/docs)",
        "height": 600,
        "width": 420
      },
      "id": "8b2d3c74-4a7f-4cab-9c65-2e3f4a5b6c11",
      "name": "Read me",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -480,
        100
      ]
    },
    {
      "parameters": {
        "content": "Checks every 30 seconds until the search is done, however long it takes.",
        "height": 120,
        "width": 440,
        "color": 7
      },
      "id": "8b2d3c74-4a7f-4cab-9c65-2e3f4a5b6c12",
      "name": "Note: waiting",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        640,
        460
      ]
    }
  ],
  "connections": {
    "Run it": {
      "main": [
        [
          {
            "node": "Your search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Your search": {
      "main": [
        [
          {
            "node": "Start the search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start the search": {
      "main": [
        [
          {
            "node": "Wait 30 seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 30 seconds": {
      "main": [
        [
          {
            "node": "Check progress",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check progress": {
      "main": [
        [
          {
            "node": "Finished?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Finished?": {
      "main": [
        [
          {
            "node": "Download the leads",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Stop: search failed",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 30 seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download the leads": {
      "main": [
        [
          {
            "node": "Read the CSV",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read the CSV": {
      "main": [
        [
          {
            "node": "Write the opener",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write the opener": {
      "main": [
        [
          {
            "node": "Add the opener to the lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Write the opener",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Add the opener to the lead": {
      "main": [
        [
          {
            "node": "Add to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "pinData": {}
}