IP Geolocation Lookup Service via Custom Webhook - n8n Workflow

Instantly look up IP geolocation data using a simple n8n workflow. This n8n template uses a webhook trigger and the IP-API service to provide location details as a custom API endpoint.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Developers and Integrators: Need a quick, serverless way to look up IP information from external applications. System Administrators: Analyzing access logs and needing geographical context for user IPs. n8n Users: Looking for practical examples of how to use the n8n webhook trigger and HTTP Request n8n node together. Automation Specialists: Building advanced n8n workflow processes that require real-time geographic data.

Overview

This powerful n8n workflow demonstrates how to transform any external public API service, like IP-API.com, into a lightweight, internal microservice accessible via a custom URL. By leveraging the built-in n8n webhook trigger, you can send an IP address (via a POST request) and receive comprehensive geographical details instantly.

This specific n8n workflow is highly valuable for integrating IP lookup functionality into systems that cannot directly call external APIs, or for centralizing API usage within your n8n infrastructure. Mastering this type of n8n node combination—triggering actions and returning responses—is fundamental for building robust, scalable automations using n8n templates.

How it Works

This automation functions as a direct API proxy service, initiated by the n8n trigger and concluding with a structured response.


  1. Webhook Activation (The n8n trigger): The Receive IP Webhook n8n node is configured to listen for incoming POST requests on the path /ip-lookup. It specifically expects a JSON body containing an 'ip' property (e.g., {"ip": "203.0.113.45"}).

  2. API Call: Once triggered, the Get IP Geolocation n8n node executes an HTTP GET request to IP-API.com. Crucially, the URL is dynamically built using an n8n expression: it inserts the IP address received from the webhook body into the API endpoint.

  3. Data Retrieval: IP-API returns a detailed JSON payload containing data such as country, region, city, latitude/longitude, ISP, and organization.

  4. Response: The Respond with Geolocation Data n8n node takes the complete JSON output from the previous n8n node and immediately transmits it back to the client that originally called the webhook. This completes the full execution of the n8n workflow.

Installation Guide


  1. Import: Copy the full n8n workflow JSON provided and paste it directly into your n8n instance using the 'New' -> 'Import from JSON' option.

  2. Webhook Configuration: The Receive IP Webhook n8n node is pre-configured. After saving the n8n workflow, click 'Activate'. n8n will provide a production URL for this webhook (e.g., https://your.n8n.instance/webhook/ip-lookup). This is your new lookup API endpoint.

  3. No Credentials Needed: The Get IP Geolocation n8n node calls the public IP-API service, which typically requires no API key for basic lookups. No credential setup is required for this specific n8n template.

Node Details

Receive IP Webhook (n8n trigger):
Function: Serves as the starting point (the n8n trigger) and the external API endpoint for this n8n workflow.
Key Configuration: HTTP Method set to POST, Response Mode set to 'Response Node', Path set to /ip-lookup. It waits for a JSON body containing the IP to lookup.
Get IP Geolocation (HTTP Request n8n node):
Function: Executes the external API call to IP-API.com.
Key Configuration: The URL is dynamic: http://ip-api.com/json/{{ $json.body.ip }}. This expression retrieves the IP property passed by the webhook trigger and constructs the API request URL.
Respond with Geolocation Data (Respond to Webhook n8n node):
Function: Closes the loop by sending the retrieved data back to the calling client.
* Key Configuration: Responds with 'All Incoming Items', meaning it passes the full JSON structure received from the HTTP Request n8n node back as the HTTP response.

Related n8n Workflows

Free

Nodes: 4 Nodes
Updated: December 26 2025
View all
Created by
ist00dent
ist00dent

I’m a dedicated automation engineer passionate about no-code and low-code solutions. I design and implement robust n8n workflows—integrating APIs, databases, and messaging—to eliminate manual tasks and accelerate delivery. Leveraging Python and C#, I build scalable, adaptable automations that empower teams to focus on high-value work.

Featured*