Automate IP geolocation lookups and HTTP port scanning directly from Google Sheets using this powerful n8n workflow. Perfect for network monitoring and security research. Discover more n8n templates.
Download this n8n workflow template and start using it instantly.
Network security analysts and researchers.
DevOps engineers needing automated external IP monitoring.
IT professionals building IP intelligence databases.
Users seeking advanced, practical n8n templates for data enrichment.
This specialized n8n workflow automates the crucial, time-consuming task of IP address reconnaissance. It starts the moment a new IP address is logged in your Google Sheet. The workflow immediately executes a geolocation lookup, enriching the data with ISP, city, and country information. Following this enrichment, the n8n workflow automatically initiates an HTTP port scan across commonly used ports (80, 443, 3000, 8000, 8080) to check for live services. The entire process—from detection via the n8n trigger to final data update—is seamless, ensuring your security intelligence is current and accurate without manual intervention. This robust n8n workflow demonstrates complex flow control and error handling.
The automation begins with the Google Sheets n8n trigger, which monitors a specified sheet for newly added rows containing an IP address.
[80, 443, 8080, 8000, 3000]) to the data structure.http://{{ $json.IP }}:{{$json.ports}}/. Crucially, this n8n node is configured to continue on error, capturing connection refusals or timeouts as scan failures.PutAllinOneItem) aggregates the results from the parallel port scans. It checks the response status or error message for each port and compiles a dictionary indicating whether the port is open (true) or inaccessible/closed.To use this n8n workflow template, follow these steps:
Google Sheets Trigger n8n node to enable polling.Google Sheets n8n nodes (UpdateIPInforow and UpdateHTTPPortsState) for write access.GetIP_Info n8n node uses a free API endpoint (ip-api.com). No credentials are required, but be mindful of usage limits. Google Sheets Trigger (n8n trigger):
Function: Starts the n8n workflow when a new row is detected.
Key Configuration: Operation: rowAdded, configured to monitor 'Sheet1' of the 'IP-Info' document.
GetIPInfo (HTTP Request n8n node):
Function: Retrieves geolocation details for the input IP.
Key Configuration: URL is dynamically set to http://ip-api.com/json/{{ $json.IP }}.
UpdateIPInforow (Google Sheets n8n node):
Function: Updates the triggering row with the newly fetched geolocation data.
Key Configuration: Operation: update, matches the row based on the IP column.
Edit Fields (Set n8n node):
Function: Introduces a defined list of ports to scan.
Key Configuration: Sets the ports field to the array: [80, 443, 8080, 8000, 3000].
Split Out (Item Lists n8n node):
Function: Converts the array of ports into individual items, enabling parallel port scanning.
Key Configuration: Splits on the ports field.
CheckHttpPort (HTTP Request n8n node):
Function: Performs the HTTP connectivity check for each port.
Key Configuration: URL is set dynamically to http://{{ $json.IP }}:{{$json.ports}}/. Crucially, onError is set to continueRegularOutput to capture connection errors gracefully.
PutAllinOneItem (Code n8n node):
Function: Aggregates the results of all individual port scans back into one summary object.
Key Configuration: Custom JavaScript logic determines port status based on successful response or specific error codes.
UpdateHTTPPortsState (Google Sheets n8n node):
Function: Writes the final scan results (Port status) back to the Google Sheet.
Key Configuration: Operation: update, uses the IP address to match the correct row and updates columns like Port80 and Port_443 based on the aggregated results.
Automate IoT device control (e.g., ESP32 GPIO) using a simple HTTP webhook and MQTT publishing. This n8n workflow is a perfect example of n8n templates for infrastructure control.

Automate Agile CRM company data enrichment using the French INSEE API. This powerful n8n workflow fetches official addresses and SIREN IDs for French firms, ensuring data accuracy.

Enforce AWS security policies automatically using this n8n workflow. Daily monitor IAM users for MFA devices and deactivate access keys for non-compliant accounts, integrating Slack for immediate alerts and key approval.

Deploy an n8n workflow as an MCP server for AI agents. Get detailed IP geolocation data using BigDataCloud API endpoints. Learn how to use the n8n trigger and advanced n8n node configurations for AI tools.

Use this powerful n8n workflow to automate Security Operations Center (SOC) tasks. Triggered by Splunk alerts, it checks IP reputation using VirusTotal and AlienVault, generates summary reports via Gmail, and automatically creates ServiceNow incidents and Slack alerts for suspicious threats.








































