Back to APIs list

Airtable API examples & templates

Use these vals as a playground to view and fork Airtable API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
metart43 avatar
getOctopusEnergyRates
@metart43
HTTP
// Declare the function as async and export it
stevekrouse avatar
lucia_sqlite
@stevekrouse
Script
Forked from pomdtr/lucia_sqlite
byjonathanleung avatar
csvToArray
@byjonathanleung
Script
// https://www.30secondsofcode.org/js/s/csv-to-array
sleexyz avatar
newValTownSignUp
@sleexyz
Script
Forked from stevekrouse/newValTownSignUp
nbbaier avatar
maroonTiger
@nbbaier
Script
Forked from easrng/kyselyVtDemo
dthyresson avatar
whatsThatInHotDogs
@dthyresson
HTTP
What's that in Hot Dogs? Inspired by the 2014 Boston Baseball Hackday submission, this val shows how many hot dogs a baseball player can buy in a year based on his annual salary and the average price of a hot dog sold at their home team's stadium. Back then, the team spent most of the hackday time collecting data, building s javascript app from scratch and then deployed to Heroku. It took some time. It had much nicer design, artwork, styling, etc to be sure. I wanted to see how quickly a similar app could be created and made available on Val.town 10 years later. I asked Chat GPT to build the app: You are a javascript web developer and a baseball fan. Build a web app using Hono called "What's that in hot dogs?". The app should let you select a baseball player. Based on 1) the player annual salary calculate the number of hot dogs they could buy based on the average price of a hot dog sold at their stadium. For example, Mike Trout played for the Los Angeles Angels and makes $35M per year. The Los Angeles Angels play at Angel Stadium a hot dog costs $8. That means he can buy 35,000,000/8 = 4.375M hot dogs. The app lets you pick a player and then will display an emoji icon of a hot dog. One emoji hot dog is worth 100,000 hot dogs. So picking Mike Trout will show 43.75 (or 44) hot dog icons. It worked! But, it only had one player's worth of data. The app needs more player salary and hot dog price data. Find the top players in each MLB team, their salary, and the price of a hot dog at their home stadium. I then asked for a small improvement: Improve the app by also showing the team the play plays for, the stadium, salary and price of the hot dog. Include it in a nice table below the hot dog emoji list. Within 10 minutes, I had a working "What's that in Hot Dogs?". I then re-worked the headings and added a legend and it matched what I remember seeing back in 2014 ... but built and deployed in minutes versus hours. Note: Much of the 2014 team's time was spent collecting data manually by looking up players' salaries and finding the cost of a hot dog at stadiums. In this example, I've not validated that ChaptGPT correctly identified these figures.
postpostscript avatar
sqliteExplorerApp
@postpostscript
HTTP
Forked from nbbaier/sqliteExplorerApp
joseph_c100 avatar
smallboatsapi
@joseph_c100
HTTP
An API that fetches the html table of small boat arrivals data from the UK gov website. This data is from the last 7 days and updated daily.
invisal avatar
sqlite_explorer
@invisal
HTTP
Forked from stevekrouse/sqlite_explorer
benvinegar avatar
counterscaleWeeklyReport
@benvinegar
Cron
// borrowed from: https://github.com/benvinegar/counterscale/blob/main/app/analytics/query.ts#L24
stevekrouse avatar
sqlite_admin
@stevekrouse
HTTP
Forked from stevekrouse/reactExample
petermillspaugh avatar
june2024
@petermillspaugh
Script
@jsxImportSource https://esm.sh/preact
easrng avatar
sql
@easrng
Script
An interactive, runnable TypeScript val by easrng
stevekrouse avatar
plants
@stevekrouse
HTTP
Made with val writer With prompt The app is just a simple plant watering app. Had a bunch of plants with different watering schedules. I want to be able to add new plants. I want to open the app and mark a plant as watered. I want to track all watering events. Store only a `waterings` table where the plant name is a string.
stevekrouse avatar
calorieapp
@stevekrouse
HTTP
@jsxImportSource npm:hono/jsx
mattx avatar
gsheet_example
@mattx
Script
// Appending to a sheet