Escáner de geolocalización de IP y escaneo de puerto HTTP
Este es unSecOps, Multimodal AIflujo de automatización del dominio deautomatización que contiene 14 nodos.Utiliza principalmente nodos como Set, Code, SplitOut, HttpRequest, GoogleSheets. Geolocalización de IP y escaneo de puertos HTTP (integrado con Google Sheets)
- •Pueden requerirse credenciales de autenticación para la API de destino
- •Credenciales de API de Google Sheets
Nodos utilizados (14)
{
"id": "ZUiF05eiy3I0zdls",
"meta": {
"instanceId": "a28fa941f4dd50ba130162204d368b9dfd7d9b960d864f7ae0094ae8b516daa8",
"templateCredsSetupCompleted": true
},
"name": "IP_Info_&_HttpPortScanner",
"tags": [],
"nodes": [
{
"id": "d48dee47-1fed-49fe-bf32-9b6b9982616e",
"name": "Hojas de Google Trigger",
"type": "n8n-nodes-base.googleSheetsTrigger",
"position": [
-416,
-16
],
"parameters": {
"event": "rowAdded",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19MSjNyjzs1FeRI5_QLiVk8Hi9JNt5HD1bNulfpB6SzI/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "19MSjNyjzs1FeRI5_QLiVk8Hi9JNt5HD1bNulfpB6SzI",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19MSjNyjzs1FeRI5_QLiVk8Hi9JNt5HD1bNulfpB6SzI/edit?usp=drivesdk",
"cachedResultName": "IP-Info"
}
},
"credentials": {
"googleSheetsTriggerOAuth2Api": {
"id": "7konaOydpAUB7WbP",
"name": "GoogleSheetsTriggerMyAccount"
}
},
"typeVersion": 1
},
{
"id": "dc06f30b-8083-4e3b-8923-09f743ad7858",
"name": "Update_IP_Info_row",
"type": "n8n-nodes-base.googleSheets",
"position": [
48,
-16
],
"parameters": {
"columns": {
"value": {
"IP": "={{ $json.query }}",
"ISP": "={{ $json.isp }}",
"Lat": "={{ $json.lat }}",
"Lon": "={{ $json.lon }}",
"Org": "={{ $json.org }}",
"City": "={{ $json.city }}",
"Country": "={{ $json.country }}"
},
"schema": [
{
"id": "IP",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "IP",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Country",
"type": "string",
"display": true,
"required": false,
"displayName": "Country",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "City",
"type": "string",
"display": true,
"required": false,
"displayName": "City",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Lat",
"type": "string",
"display": true,
"required": false,
"displayName": "Lat",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Lon",
"type": "string",
"display": true,
"required": false,
"displayName": "Lon",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "ISP",
"type": "string",
"display": true,
"required": false,
"displayName": "ISP",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Org",
"type": "string",
"display": true,
"required": false,
"displayName": "Org",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"IP"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19MSjNyjzs1FeRI5_QLiVk8Hi9JNt5HD1bNulfpB6SzI/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "19MSjNyjzs1FeRI5_QLiVk8Hi9JNt5HD1bNulfpB6SzI",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19MSjNyjzs1FeRI5_QLiVk8Hi9JNt5HD1bNulfpB6SzI/edit?usp=drivesdk",
"cachedResultName": "IP-Info"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "j3NaEGOZ7YCvCMQu",
"name": "Google Sheets account"
}
},
"typeVersion": 4.7
},
{
"id": "5a0d22ee-2fb5-48e4-9000-e6799420bd8c",
"name": "Split Out",
"type": "n8n-nodes-base.splitOut",
"position": [
480,
-16
],
"parameters": {
"include": "selectedOtherFields",
"options": {},
"fieldToSplitOut": "ports",
"fieldsToInclude": "IP"
},
"typeVersion": 1
},
{
"id": "dcf55b8f-76b2-4f9f-96c8-93dec9258495",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
256,
-16
],
"parameters": {
"include": "selected",
"options": {},
"assignments": {
"assignments": [
{
"id": "60aefa6f-50dd-484e-af28-a65e7cc695c8",
"name": "ports",
"type": "array",
"value": "[80,443,8080,8000,3000]"
}
]
},
"includeFields": "IP",
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "8504d3c2-186c-4534-b3c9-b23641e2a47a",
"name": "Update_HTTP_Ports_State",
"type": "n8n-nodes-base.googleSheets",
"position": [
1152,
-16
],
"parameters": {
"columns": {
"value": {
"IP": "={{ $('Split Out').first().json.IP }}",
"Port_80": "={{ $json.result['80'] }}",
"Port_443": "={{ $json.result['443'] }}",
"PORT_3000": "={{ $json.result['3000'] }}",
"Port_8000": "={{ $json.result['8000'] }}",
"Port_8080": "={{ $json.result['8080'] }}"
},
"schema": [
{
"id": "IP",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "IP",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Country",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Country",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "City",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "City",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Lat",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Lat",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Lon",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Lon",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "ISP",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "ISP",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Org",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Org",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Port_80",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Port_80",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Port_443",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Port_443",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Port_8000",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Port_8000",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Port_8080",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Port_8080",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "PORT_3000",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "PORT_3000",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"IP"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19MSjNyjzs1FeRI5_QLiVk8Hi9JNt5HD1bNulfpB6SzI/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "19MSjNyjzs1FeRI5_QLiVk8Hi9JNt5HD1bNulfpB6SzI",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19MSjNyjzs1FeRI5_QLiVk8Hi9JNt5HD1bNulfpB6SzI/edit?usp=drivesdk",
"cachedResultName": "IP-Info"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "j3NaEGOZ7YCvCMQu",
"name": "Google Sheets account"
}
},
"typeVersion": 4.7
},
{
"id": "fe67923f-d24f-404b-a16f-6d860a8531ac",
"name": "CheckHttpPort",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
704,
-16
],
"parameters": {
"url": "=http://{{ $json.IP }}:{{$json.ports}}/",
"options": {
"timeout": 10000,
"allowUnauthorizedCerts": true
}
},
"typeVersion": 4.2
},
{
"id": "0b9969ad-6e89-4432-931d-311ea510fbb5",
"name": "PutAll_in_OneItem",
"type": "n8n-nodes-base.code",
"position": [
928,
-16
],
"parameters": {
"jsCode": "function startsWithHttpCode(error) {\n return /^\\s*\\d{3}\\b/.test(error);\n}\n\n// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nconst result = {};\nlet index = 0;\nfor (const item of $input.all()) {\n const portItem = $(\"Split Out\").itemMatching(index).json;\n \n if(item.json.error)\n result[portItem.ports] = startsWithHttpCode(item.json.error.message);\n else\n result[portItem.ports] = true;\n index++;\n}\n\nreturn {result};"
},
"typeVersion": 2
},
{
"id": "757ec413-fe8a-44c8-ac9c-49fc5694f59a",
"name": "Nota adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
-448,
-384
],
"parameters": {
"width": 704,
"height": 224,
"content": "## Automate IP geolocation and HTTP port scanning with Google Sheets trigger\nThis n8n template automatically enriches IP addresses with geolocation data and performs HTTP port scanning when new IPs are added to a Google Sheets document. Perfect for network monitoring, security research, or maintaining an IP intelligence database.\n\n**Sample Sheet** [Link](https://docs.google.com/spreadsheets/d/19MSjNyjzs1FeRI5_QLiVk8Hi9JNt5HD1bNulfpB6SzI/edit?usp=sharing)"
},
"typeVersion": 1
},
{
"id": "d442a1dc-be9c-4768-8350-584c8b291aa5",
"name": "Nota adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-464,
-96
],
"parameters": {
"color": 6,
"height": 240,
"content": "triggers whenever a new row containing an IP address is added to your Google Sheet"
},
"typeVersion": 1
},
{
"id": "7cfbe7d3-cf98-441b-a8a8-910c778deaed",
"name": "Nota adhesiva2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-224,
-96
],
"parameters": {
"color": 6,
"width": 208,
"height": 240,
"content": "\n**Get IP Geolocation Data**"
},
"typeVersion": 1
},
{
"id": "652acfc7-f734-4de4-a598-ec527d2ab20d",
"name": "Nota adhesiva3",
"type": "n8n-nodes-base.stickyNote",
"position": [
208,
-96
],
"parameters": {
"color": 6,
"width": 432,
"height": 240,
"content": "**Define HTTP ports list for scan**\nConvert the array to items list in order to execute http request for each port"
},
"typeVersion": 1
},
{
"id": "773abbaa-5b51-4914-aeb9-317f1ee55a92",
"name": "Nota adhesiva4",
"type": "n8n-nodes-base.stickyNote",
"position": [
640,
-96
],
"parameters": {
"color": 6,
"width": 224,
"height": 240,
"content": "\n**Test HTTP Port Connectivity**"
},
"typeVersion": 1
},
{
"id": "541c08d8-ff68-4110-8759-a9d95ee4415f",
"name": "Nota adhesiva5",
"type": "n8n-nodes-base.stickyNote",
"position": [
864,
-96
],
"parameters": {
"color": 6,
"width": 224,
"height": 240,
"content": "**Aggregate Port Scan Results**\nCheck is the port open for each port"
},
"typeVersion": 1
},
{
"id": "312c9a35-3cf4-4b38-be02-64482435589c",
"name": "GetIP_Info",
"type": "n8n-nodes-base.httpRequest",
"position": [
-176,
-16
],
"parameters": {
"url": "=http://ip-api.com/json/{{ $json.IP }}",
"options": {}
},
"typeVersion": 4.2
}
],
"active": true,
"pinData": {
"Google Sheets Trigger": [
{
"json": {
"IP": "188.245.126.16",
"ISP": "",
"Lat": "",
"Lon": "",
"Org": "",
"City": "",
"Country": "",
"Port_80": "",
"Port_443": "",
"PORT_3000": "",
"Port_8000": "",
"Port_8080": ""
}
}
]
},
"settings": {
"executionOrder": "v1"
},
"versionId": "ee0b130b-725e-4809-bbfc-0bdfb962f936",
"connections": {
"5a0d22ee-2fb5-48e4-9000-e6799420bd8c": {
"main": [
[
{
"node": "fe67923f-d24f-404b-a16f-6d860a8531ac",
"type": "main",
"index": 0
}
]
]
},
"312c9a35-3cf4-4b38-be02-64482435589c": {
"main": [
[
{
"node": "dc06f30b-8083-4e3b-8923-09f743ad7858",
"type": "main",
"index": 0
}
]
]
},
"dcf55b8f-76b2-4f9f-96c8-93dec9258495": {
"main": [
[
{
"node": "5a0d22ee-2fb5-48e4-9000-e6799420bd8c",
"type": "main",
"index": 0
}
]
]
},
"fe67923f-d24f-404b-a16f-6d860a8531ac": {
"main": [
[
{
"node": "0b9969ad-6e89-4432-931d-311ea510fbb5",
"type": "main",
"index": 0
}
]
]
},
"0b9969ad-6e89-4432-931d-311ea510fbb5": {
"main": [
[
{
"node": "8504d3c2-186c-4534-b3c9-b23641e2a47a",
"type": "main",
"index": 0
}
]
]
},
"dc06f30b-8083-4e3b-8923-09f743ad7858": {
"main": [
[
{
"node": "dcf55b8f-76b2-4f9f-96c8-93dec9258495",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets Trigger": {
"main": [
[
{
"node": "312c9a35-3cf4-4b38-be02-64482435589c",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Intermedio - Operaciones de seguridad, IA Multimodal
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
Compartir este flujo de trabajo