In this tutorial, we'll look up geolocation (latitude & longitude), Google Maps rating & opening hours for a list of businesses in Airtable. All you need to get started are the addresses of the businesses you want this information for. We'll then use the Data Fetcher Airtable extension to connect to the Google Places API and import this data. This tutorial is 100% no-code!
Add the business names you want to look up in the 'Name' field in your Airtable table. Use the full address if you have it, separated by commas. If not, a name and city are sufficient. For example, 'Smoking Goat, London', a restaurant in London, is sufficient.
Add the following fields to your table:
In order to look up the ratings etc. for these addresses, we need to do two steps. First, we'll grab a place id from Google Places. Then we'll use this place id to look up the other information. Let's set two filtered views in order to do this.
Create a new Grid view called 'Needs place id' with the following filters:
Create another new Grid view called 'Needs details' with the following filters:
In order to connect to the Google Places API, we first need to get an API key in Google Cloud Console. First, you need to create a project with a linked billing account. Then, enable the Google Place API for this project. Finally, create an API key for the Google Places API.
The Google Places API is a paid API (from Google, not Data Fetcher). The costs are explained on this page. Google currently gives you $200 in free credit each month.
We're going to use the Data Fetcher extension to connect to the Google Places API with no-code. You can install Data Fetcher from the Airtable marketplace here.
After the extension launches, sign up for a free Data Fetcher account by entering a password and clicking 'Sign up for free'. This keeps your details, e.g. your API key, secure. Your Data Fetcher account is separate from your Airtable account.
The first thing we need to do is look up a place id for every business name in our table. We will then use this place id to look up further details (opening hours, Google Maps rating etc.) for each business.
On the home screen of the Data Fetcher extension, click the 'Create your first request' button.
You will land on the create request screen. Select 'Google Maps' for the Application.
Under Authorization, enter your Google Places API Key from the previous step.
For Endpoint, select 'Find a place from name/address/phone number'
Enter a Name for your request, e.g. 'Import Place Id'. Click the 'Save & Continue' button in the bottom right.
We want to use the values in our Airtable table's 'Name' field for the Input option in Data Fetcher. Under Input, click the + button to insert a reference to the table.
A modal will open where we can create the table reference. For Field, select 'Name'.
For Run for every record in view, select 'Needs place id'. Click 'Confirm'.
The Input now has a reference to our table.
For Fields, select 'Place id'. For now, we're just going to look up the place id, as we need to use it to look up opening hours and other details.
Click 'Save & Run' in the bottom right.
The request will run and the Response field mapping modal will open. This is where you set which fields to import from the Google Places API and how they should map to your output table. For each Google Places API field, you can either import or filter it. For an imported field, you can set whether to map them to an existing field or create a new field.
Make sure 'Place id' is imported and mapped to the existing 'Place id' field in the Airtable table. Then click 'Save & Run'.
Data Fetcher then run the request again for every record and look up the Google Places place id based on the business name. The records in the 'Needs place id' view will be updated and moved out of the filtered view.
Now we will create a second request using the place ids to look up details about each business such as latitude & longitude, rating and opening hours. To do this we're going to create a second request in Data Fetcher.
Click 'Back' to return to the Data Fetcher home screen. On the home screen, Click 'Create request'.
On the create request screen, for Application, again select 'Google Maps'.
Your API Key should populate automatically. If not, then add your Google Places API key from earlier.
For Endpoint, select 'Find details for a place id'.
For the Name of your request, enter 'Import Place Details'. Then click 'Save & Continue' in the bottom right.
We want to use the values in our 'Place id' Airtable field for Place id. Under Place id, click the + button to insert a reference to the table.
A modal will open where we can create the table reference. For Place id, select 'Place id'. For Run on every record in view, select 'Needs details'. Then Click 'Confirm'.
Place id now has a reference to our table.
Select the Fields you want to import from Google Places. Most of these should be self-explanatory but note the following:
Click 'Save & Run'.
Import the fields you want on the Response field mapping, then click 'Save & Run'.
Data Fetcher will create the missing fields in the table, then run the request again and import rating, geolocation, opening hours and other fields for every business in the 'Needs details' view.
At the moment we have to manually click the 'Run' button for each request to look up the info from Google Maps. Let's combine the two requests into a sequence, so they run together.
On the Data Fetcher home screen, click the blue dropdown icon on the 'Create request' button. Then click 'Create sequence'.
Give the sequence a name, like 'Import Place Id & Details'.
Select 'Import Place Id' for the first request and 'Import Place Details' for the second. Then click 'Save'. We've no created a sequence that will run the 'Import Place Id' request, followed by the 'Import Place Details' request.
We'll also schedule this to run automatically without us even being logged in to Airtable!
This requires a paid Data Fetcher account. Under Schedule, click 'Upgrade'.
A new tab will open where you can select a plan and enter your payment details to upgrade.
Back in the Data Fetcher extension, click 'I've done this'.
Under Schedule click '+ Authorize'.
A window will open where you'll be prompted to authorize which Airtable bases you want Data Fetcher to have access to.
We recommended selecting 'All current and future bases in all current and future workspaces' to avoid any issues with unauthorized bases in the future.
Click 'Grant access'.
Back in Data Fetcher, you'll see Schedule this request is now toggled on.
Select how often you want the sequence to run, e.g. 'Every hour'. Click 'Save' The sequence will now run on the schedule and pull in the info from Google Places automatically.
Nov 9, 2022
•Rosie Threlfall
•Google MapsMay 17, 2022
•Rosie Threlfall
•Google MapsJul 30, 2021
•Andy Cloke
•Google MapsGoogle