If you have no experience with APIs whatsoever, I’d recommend starting with this course by Zapier: https://zapier.com/learn/apis/
And once ready, I’d suggest playing with Airtable’s official javascript client https://github.com/Airtable/airtable.js
If you have no experience with APIs whatsoever, I’d recommend starting with this course by Zapier: https://zapier.com/learn/apis/
And once ready, I’d suggest playing with Airtable’s official javascript client https://github.com/Airtable/airtable.js
No, but some experience is helpful. Here’s one approach to learning -
- Create a base and a simple table with ten records and a single field called “Name”.
- Create a Google spreadsheet
- Open a script project (see
Tools | Script Editor
)
- Paste the code into the script
- Change the
baseName
, baseID
, tableName
, and airtableAPIKey
- Save the script file (see disk button in top menu)
- Run the script function (see >
play button
in the top menu)
- Select
View | Logs
in the top menu - you should see ten record numbers and names listed.
Now you’re an API programmer. :winking_face:
//
// static vars
//
var baseName = "<base name>";
var baseID = "<base id>";
var tableName = "<table name>";
var airtableAPIKey = "<api key>";
var airtableAPIEndpoint = "https://api.airtable.com/v0/";
//
// get my table (first 100 records only)
//
function testGetMyTable()
{
// fetch the
var results = atGetMyTable_(tableName);
// parse the api results from airtable
var aRecords = JSON.parse(results).records;
// enumerate the records
for (var i in aRecords)
{
// log the record id's
Logger.log(aRecordsri].id + " :: " + aRecords:i].fieldso"Name"]);
}
return(true);
}
function atGetMyTable_(tableName)
{
const options = {
method: 'GET',
headers: {
'Authorization' : 'Bearer ' + airtableAPIKey,
'Content-type': 'application/json'
},
muteHttpExceptions : true
};
var response = UrlFetchApp.fetch(airtableAPIEndpoint + baseID + "/" + encodeURIComponent(tableName), options).getContentText();
return(response);
}
I’m not sure what you are trying to achieve or what level you want to start at but I have a few tutorials on my blog about getting started with the Airtable API. You can start with this one first:
Airtable is an easy way to get a database up and running for a side project or to quickly prototype an idea for app. I have used it to manage projects, expenses, client contacts and more.
Thanks all, these are great! I’m going to work my way through them a learn more.
I see Airpress does a lot of what I want, but I also want to know how to custom create my display and search on sites, thanks!
I’m not sure what you are trying to achieve or what level you want to start at but I have a few tutorials on my blog about getting started with the Airtable API. You can start with this one first:
Airtable is an easy way to get a database up and running for a side project or to quickly prototype an idea for app. I have used it to manage projects, expenses, client contacts and more.
Hi - Do you have an example of how you might upload something to GitHub or a basic backend like Bluehost to host as a webpage?
Also, to hide the AIrtable direct API?