How to use Google Sheets API with NodeJS?

Tudip Technologies
2 min readAug 16, 2021

--

When we want to access spreadsheet data or want to modify spreadsheet data programmatically then Google sheet API service is required for the same. It provides different inbuilt methods to access or modify spreadsheet content.

Follow below steps to use Google sheet API service:

  • To use Google sheet API functionality we need to first enable Google sheet API service from the Google developer console for this we first need to create a project on Google developer console.
  • After creating a project on the Google developer console, you will find the option to enable Google sheet API.

We are now able to use the google sheet API services.

  • After that, Login into your Gmail account and create one spreadsheet document. In the spreadsheet URL you will see the spreadsheet ID which will be required to access the spreadsheet.
  • We will need to create a service account to configure the Google sheet API service. Go to your Google developer console project and open the google sheet API service. You will find the credentials tab in the sidebar option. Click on the credentials tab and fill in all information to create a service account. Here you will get a service account ID which will help to access the spreadsheet with Google sheet API service. Service account ID we can use as email ID just like we share spreadsheet access with others email IDs.
  • In the next step, we need to generate a credentials JSON file that will be required for the API authentication. You will get an option to create a key while creating a service account ID. Download credentials file in directory as “credentials.json” file.
  • Share the spreadsheet access with a service account ID.

Read more: https://tudip.com/blog-post/how-to-use-google-sheets-api-with-nodejs/

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response