Back to APIs list

Google Sheets API examples & templates

Use these vals as a playground to view and fork Google Sheets API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
theGetter
rustamli
theGetter
An interactive, runnable TypeScript val by rustamli
pipedream
lnenad
pipedream
Remix of: stevekrouse/pipedream
enigmaticCrimsonFelidae
Livingston23
enigmaticCrimsonFelidae
An interactive, runnable TypeScript val by Livingston23
shiningCyanMuskox
steveruizok
shiningCyanMuskox
Remix of: steveruizok/tldraw_computer_example
Jumpchain_Website
willthereader
Jumpchain_Website
Remix of: willthereader/oldHomepage
yc_finder
stevekrouse
yc_finder
Remix of: stevekrouse/yc_database
yc_database
stevekrouse
yc_database
YC companies from this google sheet This doesn't automatically get new data, yet.
frozenSapphireIguana
shapedlines
frozenSapphireIguana
Remix of: shapedlines/calculateTransitTimeVal
Jumpchain_Website
stevekrouse
Jumpchain_Website
Remix of: willthereader/Jumpchain_Website
milligramCss
xkonti
milligramCss
An interactive, runnable TypeScript val by xkonti
pipedream
stevekrouse
pipedream
Pipedream helpers Pipedream offers an Accounts API to handle OAuth for you, automatically, and for free. How to do it is covered in this guide . The helper functions below can make it easier to work with various Google API. For example, I used them like so to get all my free/busy times for this week from all my google calendars: import { pipeDreamGoogle } from "https://esm.town/v/stevekrouse/pipedream"; const accountId = "REPLACE_WITH_YOUR_GCAL_ACCOUNT_ID_FROM_PIPEDREAM"; const calendar = await pipeDreamGoogle("calendar", accountId); // Function to get free/busy information async function getFreeBusyTimes(calendarId: string) { const now = new Date(); const startOfWeek = new Date(now); startOfWeek.setDate(now.getDate() - now.getDay()); const endOfWeek = new Date(startOfWeek); endOfWeek.setDate(startOfWeek.getDate() + 6); const requestBody = { timeMin: startOfWeek.toISOString(), timeMax: endOfWeek.toISOString(), items: [{ id: calendarId }], }; const freeBusyResponse = await calendar.freebusy.query({ requestBody, }); return freeBusyResponse.data.calendars[calendarId].busy; } const calendars = (await calendar.calendarList.list()).data.items; const freeBusy = await Promise.all(calendars.map(calendar => getFreeBusyTimes(calendar.id))); console.log(freeBusy); In order for this to work you need to follow the instructions in this guide to save your pipedream API key into your Val Town Environment Variables under pipedream , then connect the google account you care about to Pipedream, and copy it's Pipedream "account id" into your val code. Let me know if you need any help by commenting on this val!
extractReceiptEndpoint
clayway
extractReceiptEndpoint
Remix of: clayway/testApi
getDictCSV
byjonathanleung
getDictCSV
An interactive, runnable TypeScript val by byjonathanleung
googleSheetsDate
kognise
googleSheetsDate
An interactive, runnable TypeScript val by kognise
dateMeDocs
stevekrouse
dateMeDocs
An interactive, runnable TypeScript val by stevekrouse
googleSheetBatchUpdate
rlesser
googleSheetBatchUpdate
An interactive, runnable TypeScript val by rlesser