Use client/server relationships and GCF to create a new Google Spreadsheet.
Last updated: July, 2019
This solution uses Google Cloud Functions to automatically create a new Google Spreadsheet in the end-user's account, when the end-user signs in. The client (JavaScript in HTML) obtains end-user authentication & sends it in as a parameter of a 'POST' request to the server (GCF written in Node.js). The server then makes a call to the Google Sheets API, creates a new Spreadsheet, and sends back its URL to the client. Lastly, the client displays the sheet's URL as a link to the end-user.
- The client makes a 'POST' request to the Google Cloud Function, securely sending an authorization parameter.
- The server makes a call to the Google Sheets API.
- The client deals with the GCF's response, and displays it appropriately.
First, set up Google Calendar:
- Open [Google Calendar][calendar] in your browser.
- [Create a new calendar][calendar_setup] called "Team Vacations".
- Still in the settings screen, select the new calendar from the left menu.
- Scroll to Integrate calendar and copy the value under Calendar ID.
You can view the corresponding blog post where I discuss client/ server relationships.