How can I create a feature in Express JS where users can authorize their Google account with our app. So, we can fetch the google sheet from their accounts and show it in my express app, and if users do something on the spreadsheet on my app, it will save automatically and reflect that on the google sheet.
Also, is there any tutorial and documentation to do that?
Prerequisite:- Creating access credentials
The file Looks like
1. Install googleapis
2. Require in the root file
3. Creating the auth object
4. Client instance of the auth object
5. The instance of Google sheets API
6. Extract the spreadsheets ID from the URL
7. Writing into the spreadsheet
Writing into a spreadsheet via frontend
The function to write into the spreadsheets takes the auth object, spreadsheet ID, and the range of cells to write onto, the value entered by the user, and the resource object containing the information to insert into the rows.