A Simple Way To Store Data Into Google Sheets Using API

Adnan Sahinovic
3 min readJan 11, 2024

A simplistic guideline on how to store data in Google Sheets using an API.

Photo by Khachik Simonian on Unsplash

Introduction

Often, developers need to store simple data that doesn’t require an SQL database or writing an API and connecting these two.

NoSQL is a good option but, again, requires a connection with your DB client and building an API layer.

After researching the simplest way to store textual data using just an API, I discovered that Google Sheets is a good and viable option.

For this tutorial, I chose a sheet. best as it’s the best available Google Sheets wrapper option to store data – because it doesn’t require complicated Google setup + it’s less code, and it comes with many other features.

With sheets.best, everything is abstracted, and their service makes writing and querying sheets a piece of cake.

After completing the initial setup, you will receive a URL that will allow you to write and query data on the sheets.

1. Prepare your sheet

  • Create a simple Google sheet with a minimum of one column.

2. Connection URL

  • Once you have created your sheet, click on the “Share” button and then copy the link provided.

Note: Make sure to turn off restrictions so everyone can write to a file

3. Insert your Connection URL

  • Please log in to sheet.best account
  • After logging in, go to the initial page and click on the ‘+ CONNECTION’ button.
  • Input the title of your sheet and paste the link that you previously copied from Google Sheets.

4. Write Data

You can now connect to your sheet using an API via Postman or your client app.

Make sure to use your own generated API URL from the dashboard.

🎊 Voila! You should see your data populated in Google Spreadsheets.

If you want to find out how to query data or any more advanced options, here is a link to the official documentation.

--

--

Adnan Sahinovic

Mobile Tech Lead | building mobile & web apps, leading software teams, and documenting my journey on Medium