Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// Modified from @mutsuda's
// by @levelsio
// 1) Make a Google Sheet, we'll pull the first cell e.g. A1
// 2) Publish your Google Sheet, File -> Publish To Web
// 3) Copy the SHEET_ID in the URL, put it in here below:
const endpoint = ""
// 4) Install Scriptable @
// 5) Copy this entire script in to Scriptable (tip: you can send it to your iPhone via Whatsapp/Messenger/Telegram etc)
// Function that performs the request to the JSON endpoint
async function loadItems() {
let at = endpoint
let req = new Request(at)
let corpo = await req.loadJSON()
// We return just the cells
return corpo.feed.entry
// Request the spreadsheet data
let json = await loadItems()
// Obtaining the content of the exact cell we are looking for
stockValue = json[0].content["$t"]
// Create the widget
let w = new ListWidget()
// w.backgroundColor = new Color("#000080")
// Add the value of the stock to the widget
t = w.addText(stockValue)
t.textColor =
t.font = new Font("Avenir-Heavy",24)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment