The script creates a Node JS endpoint which will save data to a Google Sheets spreadsheet.
- Clone the repository.
- Run
npm install
. - Update
SPREADSHEET_ID
inindex.js
to your desired spreadsheet. - Go to the documentation and follow Step 1 to turn on the Google Sheets API. Save the resulting
credentials.json
file in your project root. - Run
node .
. You will be asked to visit a URL and paste the resulting code into your command line. - Success. You can now send POST requests to your endpoint (e.g. localhost:3000) and the data will be saved to your Google Sheets spreadsheet. Below is an example JSON POST request and the resulting update:
{
"data": [[1,2], [3,4]]
}