Some of you have been talking to us about enriching and cleaning up data. Jobs in lead generation us it a lot, but if you don’t know what lead gen is, read on anyway. It’s cool what this app does!
There’ are a few steps to build this. First, you’ll have to activate the Google Maps Platform integration in dashdash’s Integrations menu by storing your Google API key there. This is how the app will look like in the end:
Cells where stuff is happening
A2: "McDonalds, Berlin" //the company you want to search B2: =iferror(parse(place_search_google(A2),"place_id"),"not found") C2: =iferror(place_detail_google(B2),"not found") D2: =iferror(parse(C4,"result.name"),"not found") E2: =iferror(parse(C4,"result.formatted_address"),"not found") F2: =iferror(parse(C4,"result.formatted_phone_number"),"not found") G2: =iferror(parse(C4,"result.website"),"not found")
What’s going on on the block above? Lets see:
B2has a 3 functions. A
PLACE_SEARCH_GOOGLEthat calls Google Places API/ Web Service/ Place Search/ Text Search, where you can provide an imprecise search term (its the
query=part) and get very nice places that exist on Google! The second part, is a
PARSEon this response to the
PLACE_SEARCH_GOOGLE, which is filtering just the variable
place_idinside first result (
results.place_id); this will return the unique identifier for that result, so that we can do more stuff in another Google API. The last function is just the
IFERRORthat returns a nice message in case the API request fails or doesn’t return any results.
IFERROR, same as above. Apart from it, the
PLACE_DETAIL_GOOGLEis calling Google Places API/ Web Service/ Place details, where we provide Google with a
place_idand it’ll give us all the info it has on that place. Beautiful .
G2are fetching individual parts of the response in
And that’s all folks!
If you want to directly talk with the Google Places API without our integration, you can do that, too:
(assuming you store your API key in H1)