How to build API for free using Google Sheets

Google Sheets as database, Apps Script as backend

Rafał Rybnik
5 min readJul 19, 2021

Sometimes we have some data stored in a spreadsheet that we would like to make available to other applications, such as dashboards that visualise it. Of course, the growing number of applications and functionalities most often leads to a transition to the use of a real database. But sometimes, we have to deal with a one-shot to test an idea or a set-and-forget tool. Then dealing with the administrative side of things, servers, etc., can be extremely cumbersome. In these situations, I usually turn to the Google ecosystem and their Apps Script.

Unless stated otherwise, all pictures in the article are by the author. Brands belong to their respective owners and are used for information purposes.

In this article, I will show you how to make a simple Rest-ish API that will have Google Sheets as its base. The API after accessing its URL will return JSON with the data from the table. To understand this article, all you need is a basic knowledge of programming (preferably JavaScript) and Google Workspace.

🔔 Want more articles like this? Sign up here.

Google Apps Script

Apps Script is a very interesting tool to automate many tasks using Google services. The scripts (written in JavaScript dialect) can access many Google Workspace elements such as Google Sheets, Gmail, Google Docs, Google Calendar, and more. With Apps Script, you…

--

--

Rafał Rybnik
Rafał Rybnik

Written by Rafał Rybnik

I write to stock up my business toolbox. Marketing, politics, AI.

Responses (1)