In this guide, we'll learn how to look up the weather forecast in Airtable. We'll use the Data Fetcher Airtable app to connect Airtable to the OpenWeather API and import weather data such as temperature, humidity and wind speed.
We'll also schedule the weather forecast to sync with Airtable automatically.
Install Data Fetcher from the Airtable app marketplace. After the app launches, sign up for a free Data Fetcher account by entering a password and clicking 'Sign up for free'. If you already have a Data Fetcher account, sign in using the 'Have an account?' button at the bottom left of the box.
On the home screen of the Data Fetcher app, click 'Create your first request'. Requests in Data Fetcher are how you import data to or send data from your Airtable base.
On the create request screen in Data Fetcher, for Application, select 'OpenWeather'.
Enter this API key into the API Key input in Data Fetcher.
For Endpoint, select 'Current weather & forecast for location(s)'.
Enter a Name for your request, e.g. 'Import Weather Forecast'. Then click 'Save & Continue'.
Enter the Latitude and Longitude for your location. For this example, we are using 51.503399 and -0.119519 which are the latitude and longitude of the London Eye. Lattitude and longitude will always be numerical values (no letters).
If you do not know your location's latitude and longitude, you can use Google Maps to find them.
For Forecast choose either 'Hourly Forecast for 24hrs' or 'Daily Forecast for 7 Days'.
Temperature Units are set as Celcius by default, or you can choose either Farenhight or Kelvin.
You can set the Language for your weather forecast description. Or leave it blank to use English.
Select the Output Table & View in Airtable where you want to create your weather forecast. Click 'Save & Run'.
The request will run and the Response field mapping modal will open. This is where you set which fields to import from OpenWeather and how they should map to the fields in the output table.
You can easily find the fields you want to import using the 'Find field' search bar.
We are going to import the 'Hour', 'Temperature', 'Humidity', 'Wind speed' and 'Description' fields from OpenWeather into Airtable.
You can choose whether to add these to existing Airtable fields or to create new ones. You can also choose the type of any new field.
Click 'Save & Run'.
Data Fetcher will create any new fields that need to be created in the output table, then run the request again and import the weather forecast data from OpenWeather to Airtable. You can now view the output table in Airtable.
We can also use Data Fetcher's scheduled requests feature to automatically update the weather data in Airtable every 15 minutes/ hour/ day etc. To do this, you'll need a paid Data Fetcher account.
In Data Fetcher, scroll to Schedule and click 'Upgrade'.
A new tab will open where you can select a plan and enter your payment details to upgrade.
Return to the Data Fetcher app and click 'I've done this'.
Click 'Add API key' in order to add your Airtable API key. You can find your Airtable API key here.
Enter your Airtable API key and click 'Save'.
Enable Schedule this request.
Select how often you want the request to run, e.g. 'Every 15 mins'. Click 'Save'. The request will now run on the schedule and update our weather forecast automatically.