Easiest cheap CMS

I needed some non-technical people to manage dynamic data. I discovered google sheets now has a query wrapper (gviz ) that exports to CSV with CORS enabled. So if you have a public sheet, this is all you need to extract it as an array of objects whose feildnames are the header row in the sheet. Its awesome!

const sheetId = '1Z7Dja43FepxVOJc5_pMdP0etERM6h0BPAWT74zjdbno';
  const sheetName = 'Sheet1'; // Change if your sheet name is different
  const url = `https://docs.google.com/spreadsheets/d/${sheetId}/gviz/tq?tqx=out:csv&sheet=${sheetName}`;
  
  return d3.csv(url)
5 Likes

I think you don’t even need the gviz part: Google Sheets Starter / Observable | Observable

1 Like

But yeah I love Google Sheets as CMS, my wife runs a hotel and their CMS for updating room info & upcoming music is now just a Google Sheet…

2 Likes

OMG even simpler!

Using the GoogleFinance function, the pattern can also be used to provide near real-time stock data:

1 Like