IP2Location.io with Pabbly Connect Integration
Tags: webdev, api, programming, tutorial
Published: 2023-08-18 05:48:31

If you haven’t heard of Pabbly Connect, it’s a workflow automation service that allows you to pass data from one online service to another to perform analyses, generate reports and various other tasks. There is no coding involved; users just have to select which service to read from and what data. Then choose another service to receive the data to perform the task you want. Once you have your workflow configured and turned on, any new data on the originating service will be automatically fed to the destination service.

## IP2Location.io Pabbly Connect integration
IP2Location.io provides a fast and accurate IP Geolocation API tool to determine a user’s location and use the geolocation information in different use cases. By using the IP2Location.io Pabbly Connect integration, users can seamlessly retrieve IP geolocation data based on IP address stored on various services like Google Sheet.

IP2Location.io Pabbly integration: [https://www.pabbly.com/connect/integrations/ip2location-io/](https://www.pabbly.com/connect/integrations/ip2location-io/)

NOTE: An IP2Location.io API key is required. Sign up for a [Free IP2Location.io API key](https://www.ip2location.io/sign-up#devto) if you don’t have one.

## Demo: Integrating IP2Location.io and Google Sheet via Pabbly
For our demonstration today, we’ll show how to read IP addresses from Google Sheet and sending it to IP2Location.io to retrieve the IP geolocation. Then we will store the results back into Google Sheet.

Step 1: [Sign up](https://accounts.pabbly.com/signup/) for a Pabbly account and [login](https://accounts.pabbly.com/login). You should see the page below. Then, click on “Access Now” under Pabbly Connect.
![Pabbly](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k1xlo7q4snk13xmf9l8c.png)

Step 2: After clicking on “Access Now”, you’ll see the Dashboard page below:
![Pabbly dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iu3kft4dxtz3xmv8uce5.png)

Step 3: Click on “Create Workflow” to get started. Write a name for your workflow. We’ll call ours “Test Pabbly” and click “Create”.
![Create workflow](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5z4tgpqookf4i7v95h8a.png)

Step 4: Select which application to read the IP address from. As we are going to go with Google Sheet, type “Google Sheet” into the Search field. Click on the Google Sheet app.
![Test Pabbly](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1ckvknujnps9yww96rf8.png)

Step 5: After clicking on Google Sheet, you will see your first step become Google Sheet.
![Google sheet](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y6wtyhn4dqkednxayj9c.png)

Step 6: Let’s configure the Trigger Event. Select “New or Updated Spreadsheet Row” for the trigger event.
![Pabbly Configuration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7wvnsm8ub6wmtpfoi6vg.png)

Step 7: Need to configure Google Sheet so let’s create a new sheet there. We’ll call ours “Test Pabbly”. We will also put a header for the first column called “IP”.
![Test Pabbly](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lkp7ihtflrxioehmeofo.png)

Step 8: Let’s install the Pabbly Connect Webhooks add-on. Navigate to the “Extensions” in the menu, move to “Add-ons” option and then click on “Get add-ons”. A dialog box will appear. Now, search for the Pabbly Connect Webhooks add-on and install it.
![Install the Pabbly Connect Webhooks add-on](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xjpn2hiolrxsitzlp8ua.png)


Step 9: After installing the add-on, refresh the page. Now, add “8.8.8.8” as the first row after the header. This will be our test data.
![Test IP data with Pabbly](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i658y8mo86jm51mqdqkr.png)

Step 10: Navigate to the “Extensions” menu again, and click on Pabbly Connect Webhooks. Click on the “Initial Setup” option, put the Webhook URL provided above, and specify the trigger column. Then, click “Send Test”.
![Pabbly Connect Webhooks](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4p0gzs7ehp5fwwudu5u.png)

Step 11: You should see “Test data sent successfully”. Now, click “Submit” and close the dialog box.
![Pabbly Connect Webhooks](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kn5tdn2aah71sx8p1k2r.png)

Step 12: Go back to the Pabbly workflow and you should see the test results.
![IP geolocation using Pabbly](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/33sx9y0tmczho4uyd74q.png)

Step 13: Go back to the Google Sheet and create another sheet inside our “Test Pabbly”. We will have column headers IP, country_code, country_name, region_name and city_name to store our IP geolocation result.
![IP geolocation test](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iicb1zoku160kaog9z1w.png)

Step 14: Head back to the Pabbly workflow and create the 2nd step which will be the IP2Location.io app. Search and select it as the 2nd step.
![IP2Location.io App](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vtmjlqzc8630920b1gwm.png)

Step 15: Select “Look Up IP Address” as the Action Event.
![IP Address Lookup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zirhtnf91h10bgsjtqng.png)

Step 16: Click on “Connect” to configure the IP2Location.io API key. Key in your API key and click “Save”.
![IP Address Lookup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88tf5abgb8mxfgwez1qv.png)

Step 17: Select the IP column from the Google Sheet as the IP Address source.
![IP Address Lookup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2qs4lhddhcn3ld9xkucm.png)

Step 18: Click “Save & Send Test Request” and you’ll see the results below:
![IP Address Lookup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mmokwe5s63m9xpdw9t3o.png)

Step 19: Create another step in the workflow to store the IP geolocation back into Google Sheet. We’ll add a new row into the 2nd sheet that we’ve created earlier.
![IP Address Lookup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hf55u3a47h3fzyszdz52.png)

Step 20: Click “Connect” and sign in your Google Sheet account. Give it all the permissions required. Then, select “Sheet2” and configure the fields to store the results coming from IP2Location.io.
![IP Address Lookup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4pe2p2pgk0iadatj297a.png)

Step 21: Click “Save & Send Test Request” and you’ll see the results stored in the Google Sheet.
![IP geolocation result](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q3fp0thlsb9yg7sytuwq.png)


## Conclusion
It’s that simple to setup a Pabbly workflow to read IP addresses from Google Sheet and retrieve the corresponding IP geolocation data. Then, store the results back into Google Sheet. Our example just stores a few fields but you get the idea.

---
For more tutorials, please visit [IP2Location](https://blog.ip2location.com/#devto)