Sitemap
Adnan Sahinovic

Adnan Sahinovic

I build and secure mobile apps at scale. Mobile tech lead, React Native community contributor, and Creator of rnsec - first security scanner for React Native

A Simple Way To Store Data Into Google Sheets Using API

3 min readJan 11, 2024

--

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

Press enter or click to view image in full size
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.

Get Adnan Sahinovic’s stories in your inbox

Join Medium for free to get updates from this writer.

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.
Press enter or click to view image in full size

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.
Press enter or click to view image in full size

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.

Press enter or click to view image in full size

🎊 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

Written by Adnan Sahinovic

I build and secure mobile apps at scale. Mobile tech lead, React Native community contributor, and Creator of rnsec - first security scanner for React Native