Back to APIs list![sarahxc avatar](https://img.clerk.com/eyJ0eXBlIjoicHJveHkiLCJzcmMiOiJodHRwczovL2ltYWdlcy5jbGVyay5kZXYvdXBsb2FkZWQvaW1nXzJsaUxDRzRtWURyT0FKdGYwTWc1eXBHeE8yTCJ9)
![rlesser avatar](https://images.clerk.dev/uploaded/img_2QGEZ0ui5UEoQpzrCTbFslYSosv.jpeg)
![dvdsgl avatar](https://images.clerk.dev/oauth_github/img_2P4kUJCVmzhr86JK45fuJloIUzo.jpeg)
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.
slackScout
@sarahxc
Cron
Slack scout sends a slack notification every time your keywords are mentioned on Twitter, Hacker News, or Reddit. Get notified whenever you, your company, or topics of interest are mentioned online. Built with Browserbase . Inspired by f5bot.com . Full code tutorial . Getting Started To run Slack Scout, you’ll need a Browserbase API key Slack Webhook URL: setup here Twitter Developer API key Browserbase Browserbase is a developer platform to run, manage, and monitor headless browsers at scale. We’ll use Browserbase to navigate to, and scrape our different news sources. We’ll also use Browserbase’s Proxies to ensure we simulate authentic user interactions across multiple browser sessions . Get started with Browserbase for free here . Twitter We’ve decided to use the Twitter API to include Twitter post results. It costs $100 / month to have a Basic Twitter Developer account. If you decide to use Browserbase, we can lend our token. Comment below for access. Once you have the SLACK_WEBHOOK_URL , BROWSERBASE_API_KEY , and TWITTER_BEARER_TOKEN , input all of these as Val Town Environment Variables . Project created by Sarah Chieng and Alex Phan 💌
![rlesser avatar](https://images.clerk.dev/uploaded/img_2QGEZ0ui5UEoQpzrCTbFslYSosv.jpeg)
sqliteTableExportUtils
@rlesser
Script
SQLite Table Export Utils This allows for a val.town-hosted SQLite table to be exported as: JSON ( Record<string, unknown>[] ) Arrow IPC ( Uint8Array ) TODO: Others? This can then be used by a HTTP endpoint, like so: import { exportSQLiteTable, SQLiteTableExportFormat } from "https://esm.town/v/rlesser/sqliteTableExportUtils";
export default async function(req: Request): Promise<Response> {
const tableName = new URL(req.url).searchParams.get("table");
if (!tableName) {
return new Response("Table name is required", { status: 400 });
}
const format = (new URL(req.url).searchParams.get("format") || "arrowIPC") as SQLiteTableExportFormat;
const data = await exportSQLiteTable(tableName, format);
if (data instanceof Uint8Array) {
return new Response(data, {
headers: { "Content-Type": "application/octet-stream" },
});
} else {
return Response.json(data);
}
} TODO Specify limit and offset of export, for pagination Smart assessment of if the export is going to be over the val.town limit of 10MB, adjust to paginated of so. Support other export formats. PRs welcome!
![dvdsgl avatar](https://images.clerk.dev/oauth_github/img_2P4kUJCVmzhr86JK45fuJloIUzo.jpeg)
glide
@dvdsgl
Script
Glide API 2.0 Effects and utility functions for working with Glide API 2.0. Authentication Set glide environment variable to authenticate. If using effect, you can also provide a layer constructed with Glide.layer . Examples Simplest case, use runIngest with an async fetch : import * as Glide from "https://esm.town/v/dvdsgl/glide";
await Glide.importTable({
table: "abc123-def456-ghi789",
getRows: async function*() {
// yield Row[] to add them to the stash
yield [{ Name: "David" }];
},
}); Load 20k pull requests: import * as Glide from "https://esm.town/v/dvdsgl/glide";
await Glide.importTable({
table: "abc123-def456-ghi789",
getRows: async function*() {
const octokit = new Octokit({ auth: "..." });
for await (
const { data: prs } of octokit.paginate.iterator(octokit.rest.pulls.list, {
owner: "glideapps",
repo: "glide",
state: "all"
})
) yield prs;
},
});