This workflow corresponds to n8n.io template #12984 — we link there as the canonical source.
This workflow follows the Gmail → Googlegemini 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 →
{
"id": "SzH05B85Poq3IPej",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Discover local business leads and run automated cold email sequences with Google Maps and Gmail",
"tags": [],
"nodes": [
{
"id": "610f4b5e-b883-49e1-a89f-3038c710a118",
"name": "Stop and Error1",
"type": "n8n-nodes-base.stopAndError",
"position": [
3408,
2688
],
"parameters": {
"errorMessage": "Google Sheets API Limit has been triggered and the workflow has stopped"
},
"typeVersion": 1
},
{
"id": "7a36b46c-dd48-431d-8b09-161da8d69b28",
"name": "Update Status to Success",
"type": "n8n-nodes-base.googleSheets",
"onError": "continueErrorOutput",
"position": [
2608,
3120
],
"parameters": {
"columns": {
"value": {
"Zip": "={{ $json.Zip }}",
"status": "scraped"
},
"schema": [
{
"id": "Zip",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Zip",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Zip"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "={{ $('Settings').first().json.sheet }}"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "={{ $('Settings').first().json.gs_url }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"executeOnce": true,
"typeVersion": 4.2,
"alwaysOutputData": true
},
{
"id": "488670dd-498f-486c-9a57-23403095188c",
"name": "Stop and Error",
"type": "n8n-nodes-base.stopAndError",
"position": [
3408,
3120
],
"parameters": {
"errorMessage": "Google Sheets API Limit has been triggered and the workflow has stopped"
},
"typeVersion": 1
},
{
"id": "45a95e8c-f478-4ace-816c-f6d3f05f6847",
"name": "Stop and Error2",
"type": "n8n-nodes-base.stopAndError",
"position": [
3408,
2896
],
"parameters": {
"errorMessage": "Google Sheets API Limit has been triggered and the workflow has stopped"
},
"typeVersion": 1
},
{
"id": "4fe4e969-57ac-4f43-9b77-8ec757db5438",
"name": "Get Status",
"type": "n8n-nodes-base.googleSheets",
"onError": "continueErrorOutput",
"position": [
2608,
2896
],
"parameters": {
"options": {},
"filtersUI": {
"values": [
{
"lookupValue": "={{ $('Set Zip1').item.json.Zip }}",
"lookupColumn": "Zip"
}
]
},
"sheetName": {
"__rl": true,
"mode": "name",
"value": "={{ $('Settings').first().json.sheet }}"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "={{ $('Settings').first().json.gs_url }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"executeOnce": true,
"typeVersion": 4.2
},
{
"id": "839f3d83-1354-477e-b149-034069c9143e",
"name": "Get row(s) in sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
-464,
3600
],
"parameters": {
"sheetName": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "",
"cachedResultName": ""
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "your-gsheet-id"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "7b43b639-4cce-4289-b718-cc0f7789741f",
"name": "Update row in sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
656,
3600
],
"parameters": {
"columns": {
"value": {
"intro mail": "={{ JSON.parse($json.content.parts[0].text).intro_mail }}",
"row_number": "={{ $('Loop: Generate AI Emails').item.json.row_number }}",
"follow up mail 1": "={{ JSON.parse($json.content.parts[0].text).follow_up_mail_1 }}",
"follow up mail 2": "={{ JSON.parse($json.content.parts[0].text).follow_up_mail_2 }}"
},
"schema": [
{
"id": "place_id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "place_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "title",
"type": "string",
"display": true,
"required": false,
"displayName": "title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email",
"type": "string",
"display": true,
"required": false,
"displayName": "email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "phone",
"type": "string",
"display": true,
"required": false,
"displayName": "phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "website",
"type": "string",
"display": true,
"required": false,
"displayName": "website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "rating",
"type": "string",
"display": true,
"required": false,
"displayName": "rating",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "reviews",
"type": "string",
"display": true,
"required": false,
"displayName": "reviews",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "type",
"type": "string",
"display": true,
"required": false,
"displayName": "type",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "address",
"type": "string",
"display": true,
"required": false,
"displayName": "address",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intro mail",
"type": "string",
"display": true,
"required": false,
"displayName": "intro mail",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email_status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "email_status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intro_email_sent_date",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "intro_email_sent_date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 1",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 1",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up email send date 1",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up email send date 1",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 1 status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 1 status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 2",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 2",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up email send date 2",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up email send date 2",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 2 status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 2 status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "types",
"type": "string",
"display": true,
"required": false,
"displayName": "types",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"row_number"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1495216019,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nY4Os8IsdEmNW4W-MkLtnN05EMgLYyoaS2-BPoJ_Iu4/edit#gid=1495216019",
"cachedResultName": "Results"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1nY4Os8IsdEmNW4W-MkLtnN05EMgLYyoaS2-BPoJ_Iu4",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nY4Os8IsdEmNW4W-MkLtnN05EMgLYyoaS2-BPoJ_Iu4/edit?usp=drivesdk",
"cachedResultName": "Google Maps Scraper Setup File"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "52ce659b-e0aa-46cf-b654-023b85ea807a",
"name": "Get row(s) in sheet1",
"type": "n8n-nodes-base.googleSheets",
"position": [
1568,
3552
],
"parameters": {
"sheetName": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "",
"cachedResultName": ""
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "your-gsheet-id"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "7cc03b90-133d-4ca2-937f-12295eef351d",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-944,
3504
],
"parameters": {
"width": 1920,
"height": 320,
"content": "## Email Writer (Intro + Follow Up 1 + Follow Up 2)"
},
"typeVersion": 1
},
{
"id": "913f34f4-1f97-4720-afac-c1a41a0ac9a1",
"name": "Get row(s) in sheet4",
"type": "n8n-nodes-base.googleSheets",
"position": [
3520,
3584
],
"parameters": {
"sheetName": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "",
"cachedResultName": ""
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "your-gsheet-id"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "2e1717d7-4e10-4db5-8a36-70d416e556f8",
"name": "Get row(s) in sheet5",
"type": "n8n-nodes-base.googleSheets",
"position": [
1520,
4112
],
"parameters": {
"sheetName": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "",
"cachedResultName": ""
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "your-sheet-id"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "3b83eafc-ebaf-49cd-aaa3-d965d124b45c",
"name": "Update row in sheet3",
"type": "n8n-nodes-base.googleSheets",
"position": [
2736,
4112
],
"parameters": {
"columns": {
"value": {
"row_number": "={{ $('Loop: Send Follow Up 2').item.json.row_number }}",
"follow up mail 2 id": "={{ $json.id }}",
"follow up mail 2 status": "yes"
},
"schema": [
{
"id": "place_id",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "place_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "title",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "phone",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "website",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "rating",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "rating",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "reviews",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "reviews",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "type",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "type",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "address",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "address",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intro mail",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "intro mail",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intro mail id",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "intro mail id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email_status",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "email_status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intro_email_sent_date",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "intro_email_sent_date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 1",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "follow up mail 1",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 1 id",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "follow up mail 1 id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up email send date 1",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "follow up email send date 1",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 1 status",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "follow up mail 1 status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 2",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "follow up mail 2",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 2 id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 2 id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up email send date 2",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "follow up email send date 2",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 2 status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 2 status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "types",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "types",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"row_number"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1495216019,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nY4Os8IsdEmNW4W-MkLtnN05EMgLYyoaS2-BPoJ_Iu4/edit#gid=1495216019",
"cachedResultName": "Results"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1nY4Os8IsdEmNW4W-MkLtnN05EMgLYyoaS2-BPoJ_Iu4",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nY4Os8IsdEmNW4W-MkLtnN05EMgLYyoaS2-BPoJ_Iu4/edit?usp=drivesdk",
"cachedResultName": "Google Maps Scraper Setup File"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "f07823fd-fd84-425f-98b9-17a0f889dd28",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1072,
3472
],
"parameters": {
"width": 1904,
"height": 352,
"content": "## Intro Mail Send"
},
"typeVersion": 1
},
{
"id": "23dbb356-8889-489b-a3aa-70a0c96c3ffd",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
3056,
3488
],
"parameters": {
"width": 1904,
"height": 336,
"content": "## Follow Up 1 Mail Send"
},
"typeVersion": 1
},
{
"id": "05bb4778-419b-4c41-8ae5-f6f9950e8d32",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1072,
4000
],
"parameters": {
"width": 1904,
"height": 336,
"content": "## Follow Up 2 Mail Send"
},
"typeVersion": 1
},
{
"id": "c8443840-3fbe-4823-8d54-a3987ad6e5ea",
"name": "Settings",
"type": "n8n-nodes-base.set",
"position": [
864,
2384
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "fa469a25-eb00-4011-a626-87fae7fb8bbd",
"name": "gs_url",
"type": "string",
"value": "<ypur-google-sheets-link>"
},
{
"id": "df0a7a51-0ec6-47d2-9f73-bc8268385305",
"name": "catSheet",
"type": "string",
"value": "Google Maps Categories"
},
{
"id": "a1ff9a58-9ae6-4000-9fcd-6c11de23bd48",
"name": "sheet",
"type": "string",
"value": "Zips"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "30947e7d-836e-4ebf-820e-4b181ebc814f",
"name": "Get Zip Codes",
"type": "n8n-nodes-base.googleSheets",
"position": [
1056,
2384
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "name",
"value": "={{ $('Settings').item.json.sheet }}"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "={{ $('Settings').item.json.gs_url }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"executeOnce": true,
"typeVersion": 4.2
},
{
"id": "fdb0dce3-2873-4221-8d7a-12bdb9023cc9",
"name": "Zips",
"type": "n8n-nodes-base.set",
"position": [
1264,
2384
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "3d16d922-0ed3-4a0f-9707-43797438970d",
"name": "zip",
"type": "string",
"value": "={{ $json.Zip }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "4a5a8a75-1e28-419f-aa57-9877dcbcfac9",
"name": "Filter Zips",
"type": "n8n-nodes-base.filter",
"position": [
1456,
2384
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "9f5a5e37-faae-45db-8a22-ad7d5786ecfe",
"operator": {
"type": "string",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $json.status }}",
"rightValue": ""
},
{
"id": "0e38f9fa-c3f1-49c3-ad71-8dffc2555333",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "",
"rightValue": ""
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.2
},
{
"id": "7ecc5210-4ff7-453c-ae17-93f976ddd9ba",
"name": "Split Out",
"type": "n8n-nodes-base.splitOut",
"position": [
1648,
2384
],
"parameters": {
"include": "allOtherFields",
"options": {},
"fieldToSplitOut": "row_number"
},
"typeVersion": 1
},
{
"id": "902d0aca-bd6c-49c1-8578-134d90236116",
"name": "Get Category",
"type": "n8n-nodes-base.googleSheets",
"position": [
2128,
2496
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "name",
"value": "={{ $('Settings').item.json.catSheet }}"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "={{ $('Settings').item.json.gs_url }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"executeOnce": true,
"typeVersion": 4.2
},
{
"id": "30ae9253-1a34-49bf-8c20-94f49e4766d9",
"name": "Set Zip",
"type": "n8n-nodes-base.set",
"position": [
2736,
2416
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "f6442dd8-5638-4a18-8d1d-9a3a09398103",
"name": "Zip",
"type": "string",
"value": "={{ $json.Zip }}"
},
{
"id": "3a637f53-9f44-4f9d-8d6d-1338458df114",
"name": "Category",
"type": "string",
"value": "={{ $json.Category }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "2e336d7b-5001-459b-8dd8-d425e448c616",
"name": "Loop Subcats",
"type": "n8n-nodes-base.splitInBatches",
"position": [
704,
2944
],
"parameters": {
"options": {
"reset": false
}
},
"typeVersion": 3
},
{
"id": "595ac616-6b61-4410-af61-7c29e26050ea",
"name": "Set Zip1",
"type": "n8n-nodes-base.set",
"position": [
880,
2944
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "7b1629c5-cbfe-4769-8286-66b46c51cd7e",
"name": "Zip",
"type": "string",
"value": "={{ $('Set Zip').item.json.Zip }}"
},
{
"id": "9414efa6-bf07-480a-aec2-3f35a315bf2b",
"name": "Category",
"type": "string",
"value": "={{ $json.Category }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "97767fb6-1a01-492d-aade-e4e9b626b64b",
"name": "GMaps API",
"type": "n8n-nodes-base.httpRequest",
"position": [
1088,
2944
],
"parameters": {
"url": "https://places.googleapis.com/v1/places:searchText?key=YOUR_TOKEN_HERE",
"method": "POST",
"options": {
"response": {
"response": {
"fullResponse": true
}
}
},
"sendBody": true,
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "textQuery",
"value": "={{ $json.Category }} {{ $json.Zip }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "X-Goog-FieldMask",
"value": "*"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "fdfe9ea7-1c9a-49c6-b43a-5c2d3f684ca0",
"name": "Scrape URL",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
1680,
2944
],
"parameters": {
"url": "={{ $json.websiteUri }}",
"options": {
"response": {
"response": {
"neverError": true
}
},
"allowUnauthorizedCerts": true
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "User-Agent",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0 Safari/537.36"
},
{
"name": "Accept",
"value": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
},
{
"name": "Accept-Language",
"value": "en-US,en;q=0.9"
}
]
}
},
"retryOnFail": true,
"typeVersion": 4.3
},
{
"id": "1784f246-0b31-4270-a4f4-c9a2855163a4",
"name": "Add rows in Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"onError": "continueErrorOutput",
"position": [
2608,
2688
],
"parameters": {
"columns": {
"value": {
"type": "={{ $('Set Zip1').item.json.Category }}",
"email": "={{ $json.email }}",
"phone": "={{ $json.place.nationalPhoneNumber }}",
"title": "={{ $json.place.displayName.text }}",
"types": "={{ $json.place.types.join(', ') }}",
"rating": "={{ $json.place.rating }}",
"address": "={{ $json.place.formattedAddress }}",
"reviews": "={{ $json.place.userRatingCount }}",
"website": "={{ $json.place.websiteUri }}",
"place_id": "={{ $json.place.id }}"
},
"schema": [
{
"id": "place_id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "place_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "title",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "phone",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "website",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "rating",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "rating",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "reviews",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "reviews",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "type",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "type",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "address",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "address",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intro mail",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "intro mail",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "types",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "types",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"place_id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "=Results"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "={{ $('Settings').first().json.gs_url }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.2,
"alwaysOutputData": true
},
{
"id": "6311bb94-4b95-420b-9a58-ab51bb2c9cf7",
"name": "Email Writer",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
336,
3600
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.0-flash-lite",
"cachedResultName": "models/gemini-2.0-flash-lite"
},
"options": {
"systemMessage": "=You are a senior B2B sales copywriter.\nYou generate high-performing cold outreach email copy.\nYou must follow instructions strictly."
},
"messages": {
"values": [
{
"content": "=Generate a JSON object with 3 fields:\n- intro_mail\n- follow_up_mail_1\n- follow_up_mail_2\n\nEach field must contain a complete cold outreach email content.\n\nInputs:\n- Recipient title: {{ $json.title }}\n- Business type: {{ $json.type }}\n- Google Maps categories: {{ $json.types }}\n\nOur company:\nYOUR COMPANY NAME\n\nOur services:\n- Digital marketing\n- SEO\n- Website development\n- Automation (n8n)\n- AI-powered workflows\n- Business process optimization\n\nRules for EACH email:\n- Start with a friendly greeting using the business type or title (example: \"Hi there,\" or \"Hi {{ $json.title }},\").\n- DO NOT include any signature or closing.\n- DO NOT repeat the business name more than once.\n- Use <br><br> for line breaks.\n- No other HTML.\n- 4 to 5 short sentences.\n- Friendly, professional, human tone.\n- Mention automation or AI at least once.\n- End with a soft value-based statement (not a meeting request).\n\nAdditional sequencing rules:\n- intro_mail: general introduction and value.\n- follow_up_mail_1: gentle nudge, assume they saw the first email.\n- follow_up_mail_2: final follow-up, slightly more direct but still polite.\n\nOutput format:\nReturn ONLY valid JSON.\nNo explanations.\nNo extra text.\n"
}
]
},
"jsonOutput": true,
"builtInTools": {}
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.1
},
{
"id": "56cdb48b-1ed4-4f8d-97a5-9d96832740f0",
"name": "Send Intro Mail",
"type": "n8n-nodes-base.gmail",
"position": [
2320,
3552
],
"parameters": {
"sendTo": "={{ $json['email'] }}",
"message": "=<!DOCTYPE html>\n<html>\n <body style=\"margin:0;padding:0;background-color:#f6f8fa;font-family:Arial, Helvetica, sans-serif;\">\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color:#f6f8fa;padding:20px 0;\">\n <tr>\n <td align=\"center\">\n <table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color:#ffffff;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,0.05);padding:30px;\">\n \n <!-- Logo -->\n <tr>\n <td align=\"center\" style=\"padding-bottom:20px;\">\n <img \n src=\"your-company-logo-link-public\" \n alt=\"company name\" \n width=\"160\"\n style=\"display:block;border:0;outline:none;text-decoration:none;\"\n />\n </td>\n </tr>\n \n <!-- Dynamic Body -->\n <tr>\n <td style=\"font-size:14px;color:#374151;line-height:1.7;\">\n {{ $json['intro mail'] }}\n </td>\n </tr>\n\n <!-- CTA -->\n <tr>\n <td style=\"padding-top:18px;font-size:14px;color:#374151;\">\n YOUR CTA\n </td>\n </tr>\n\n <!-- Signature -->\n <tr>\n <td style=\"padding-top:28px;font-size:14px;color:#111827;\">\n Regards,<br>\n <strong>Founder Name</strong><br>\n <span style=\"color:#6b7280;\">your-company-name</span>\n </td>\n </tr>\n\n <!-- Footer -->\n <tr>\n <td style=\"padding-top:20px;font-size:11px;color:#9ca3af;\">\n Automation \u2022 AI \u2022 Data Engineering \u2022 Workflow Optimization\n </td>\n </tr>\n\n </table>\n </td>\n </tr>\n </table>\n </body>\n</html>",
"options": {
"senderName": "Your Company Name or Founder Name ",
"appendAttribution": false,
"replyToSenderOnly": true
},
"subject": "=Reducing manual work at {{ $json.title }}"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.2
},
{
"id": "f2d5bc92-f7ec-4b8e-b1b3-4bad71ac2399",
"name": "Update Row with all Follow Up Mail Dates",
"type": "n8n-nodes-base.googleSheets",
"position": [
2720,
3552
],
"parameters": {
"columns": {
"value": {
"row_number": "={{ $('Loop: Send Intro Emails').item.json.row_number }}",
"email_status": "={{ $json.intro_sent }}",
"intro mail id": "={{ $json.id }}",
"intro_email_sent_date": "={{ $json.intro_date }}",
"follow up mail 1 status": "={{ $json.fu1_sent }}",
"follow up mail 2 status": "={{ $json.fu2_sent }}",
"follow up email send date 1": "={{ $json.fu1_date }}",
"follow up email send date 2": "={{ $json.fu2_date }}"
},
"schema": [
{
"id": "place_id",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "place_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "title",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "phone",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "website",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "rating",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "rating",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "reviews",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "reviews",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "type",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "type",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "address",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "address",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intro mail",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "intro mail",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intro mail id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "intro mail id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email_status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "email_status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intro_email_sent_date",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "intro_email_sent_date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 1",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 1",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 1 id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 1 id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up email send date 1",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up email send date 1",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 1 status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 1 status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 2",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 2",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 2 id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 2 id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up email send date 2",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up email send date 2",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 2 status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 2 status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "types",
"type": "string",
"display": true,
"required": false,
"displayName": "types",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"row_number"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1495216019,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nY4Os8IsdEmNW4W-MkLtnN05EMgLYyoaS2-BPoJ_Iu4/edit#gid=1495216019",
"cachedResultName": "Results"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1nY4Os8IsdEmNW4W-MkLtnN05EMgLYyoaS2-BPoJ_Iu4",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nY4Os8IsdEmNW4W-MkLtnN05EMgLYyoaS2-BPoJ_Iu4/edit?usp=drivesdk",
"cachedResultName": "Google Maps Scraper Setup File"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "e40cca03-2199-442b-8cc1-fb3e7d08364c",
"name": "Update row with follow up status 1",
"type": "n8n-nodes-base.googleSheets",
"position": [
4720,
3584
],
"parameters": {
"columns": {
"value": {
"row_number": "={{ $('Loop: Send Follow Up 1').item.json.row_number }}",
"follow up mail 1 id": "={{ $json.id }}",
"follow up mail 1 status": "=yes"
},
"schema": [
{
"id": "place_id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "place_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "title",
"type": "string",
"display": true,
"required": false,
"displayName": "title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email",
"type": "string",
"display": true,
"required": false,
"displayName": "email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "phone",
"type": "string",
"display": true,
"required": false,
"displayName": "phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "website",
"type": "string",
"display": true,
"required": false,
"displayName": "website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "rating",
"type": "string",
"display": true,
"required": false,
"displayName": "rating",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "reviews",
"type": "string",
"display": true,
"required": false,
"displayName": "reviews",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "type",
"type": "string",
"display": true,
"required": false,
"displayName": "type",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "address",
"type": "string",
"display": true,
"required": false,
"displayName": "address",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intro mail",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "intro mail",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intro mail id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "intro mail id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email_status",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "email_status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intro_email_sent_date",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "intro_email_sent_date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 1",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 1",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 1 id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 1 id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up email send date 1",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "follow up email send date 1",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 1 status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 1 status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 2",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 2",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 2 id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow up mail 2 id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up email send date 2",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "follow up email send date 2",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow up mail 2 status",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "follow up mail 2 status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "types",
"type": "string",
"display": true,
"required": false,
"displayName": "types",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"row_number"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
gmailOAuth2googlePalmApigoogleSheetsOAuth2Api
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
How this works
Local businesses gain a steady stream of qualified leads without manual searching or writing emails from scratch. The workflow pulls business data from Google Maps, extracts contact details, then uses Google Gemini to craft personalised cold emails before sending them through Gmail in a timed follow-up sequence. It keeps everything tracked in Google Sheets so teams can monitor progress and pause any campaign instantly.
Use this when you need to reach many prospects in one city or region on a recurring schedule. It suits teams that already have a clear offer and basic email copy templates; it is less suitable for one-off outreach or when you require live phone verification. Common variations include swapping the Maps scraper for a different lead source or changing the number of follow-ups based on reply rates.
About this workflow
This workflow is a complete outbound automation system that discovers local businesses, extracts contact emails, generates personalized cold emails using AI, and runs a multi-step follow-up sequence — fully automated.
Source: https://n8n.io/workflows/12984/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow automatically fetches the latest business news, analyzes its impact on clients using AI and sends alerts for high-impact articles while logging all processed data in Google Sheets. It en
This workflow automatically fetches daily stock market news, analyzes sentiment using Gemini AI, calculates impact scores, sends alerts for high-impact news and stores structured results in Google She
This workflow automatically generates a weekly financial advisory briefing every Monday at 8 AM. It fetches live market data (SPY), collects top financial news, uses Google Gemini AI to generate clien
This workflow automatically generates a weekly sales performance report from Google Sheets data. It runs on a schedule, cleans and filters the dataset, and calculates week-over-week performance metric
AI Institutional Stock Valuation Engine with Risk Scoring & Scenario Targets