in API, Digital Workflow
Use Quick Base Pipelines to reverse geocode addresses with API (Part 2)
First lets add a condition based on Request status
If Request succeeds, we'll update the Work Order
Lets also Update Record if the request is not status 200
We'll need to add a Failed status to our Reverse Geocode Status field
If the request fails, we'll be able to trigger other steps
Lets make a Pipeline Logs table, so we can monitor and trigger workflows based on these logs
For now lets store the Web Request Status and Content
We want to create a Pipeline Log step
Here, we can convert the content to json object and target a specific area of the object
The data we want is under the "results"
Now, a quick test to see if it's narrowing results and converting to json object
At this point, I found out Google Maps API doesn't allow you to store data...
So I went searching for alternatives
I found this URL in the API docs
We will put our Latitude and Longitude variables in the URL in the correct spot and add our API key
I made a quick test to see the response...
We need to check if 'results' is still relevant and it is... keep it
Lets test it in Quick Base....
The content was converted to a json object, now we can make magic happen!
Now we can add the Reverse Geocode Address fields to the Update Record step
The data we want is stored in "address_components"
Inside "address_components", we can select "city", "zip", etc.
Here is how I mapped the Geocodio response
Lets run it and see what we get
Note: All API keys were harmed in the making of this video... Have fun!
1 Comment
Garcie
February 17, 2021 at 12:43 pm -Thanks for the blog. Really looking forward to read more. Really Cool.
Comments are closed.