In this guide, we'll learn how to look up the weather forecast by latitude and longitude in Airtable. We'll use the Data Fetcher Airtable extension to connect Airtable to the OpenWeather API and import weather data such as temperature, humidity and wind speed.
We'll also schedule this so that we look up the weather forecast in Airtable automatically.
Install Data Fetcher from the Airtable marketplace. After the extension 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 extension, 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'.
OpenWeather is an online service that provides global weather data. Either sign up for a free OpenWeather account or sign into your existing one. Your API Key can be found here.
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. Latitude and longitude will always be numerical values (no letters).
If you do not know your location's latitude and longitude, you can first follow this tutorial to look up latitude and longitude for addresses.
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 extension and click 'I've done this'.
Under Schedule click '+ Authorize'.
A window will open for you to authorize the Airtable bases you need Data Fetcher to access.
By selecting 'All current and future bases in all current and future workspaces', you'll avoid any issues with authorization in the future.
Click 'Grant access'.
In Data Fetcher, Schedule this request will now be toggled on.
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.
Oct 7, 2024
•Zayyad Muhammad Sani
•Custom RequestsData FetcherSep 20, 2024
•Zayyad Muhammad Sani
•Custom RequestsSep 5, 2024
•Zayyad Muhammad Sani
•Anthropic