Add location and internet provider to Airtable IP logs

By General Input

Every time a new IP address lands in your Airtable log, it gets the city, country and internet provider filled in automatically.

Integrations

  • IPinfo
  • Airtable

Type

Deterministic Code

Categories

  • Operations
  • Engineering

Whenever a new record lands in my IP log table in Airtable, look the address up with IPinfo and write the results straight back onto that same record. Trigger this as a poll on Airtable for new records in the IP log table. Build it as a deterministic code workflow: there is no judgement involved, it is a straight field for field enrichment.

For each new record, read the IP address out of the address column and call the IPinfo "Get Full IP Details" operation on it. Map the response onto the matching Airtable columns using "Update Record", which patches only the fields I specify and leaves the rest of the row untouched.

Field mapping: city goes to City, region goes to Region, country goes to Country, and timezone goes to Timezone. The loc field comes back as a single "latitude,longitude" string, so split it on the comma and write Latitude and Longitude separately, or write it through whole if the table has a single Coordinates column instead. The org field is one combined string like "AS15169 Google LLC" rather than separate fields, so split it on the first space: the leading ASxxxxx token goes to the ASN column and everything after it goes to the Network Owner column.

Handle two edge cases explicitly. First, private and bogon addresses such as 10.x.x.x and 192.168.x.x come back as {"ip": "...", "bogon": true} with no geolocation or ASN data at all. When that flag is set, skip the geo mapping entirely, write "Private" into the status column, and leave the geo columns empty. The row should read as deliberately private rather than as a lookup that never ran.

Second, if a lookup fails for any other reason, write the reason into the status column instead of leaving the row silently empty. Cover an invalid or unparseable value in the source column, a 401 for a bad token, a 429 when the IPinfo quota is exhausted, and a 403 when the requested data is not included in the current plan. Keep the text short and human readable, for example "Invalid IP", "Rate limited" or "Auth failed". On a clean enrichment, set the status column to "Enriched".

Every record the workflow touches must end up with something in the status column. Never leave a triggered row where all the enrichment columns are blank and there is no explanation why.

Related prompts

Explore more prompts
Creator roster board for rebook, test, or pause callsRun your nutrition clients' weekly meal plans from one consoleInstagram UGC rights tracker and repost approval boardSpot duplicate and throwaway Auth0 accounts by networkReview high risk Shopify orders before anything gets pickedA verification desk for every document your team scansOkta sign-in review board with location and VPN checksBrowse and shortlist creators without burning audit creditsGlobal operations exposure map for your sites and suppliersDeal sourcing kanban board for your Harmonic saved searches