Overview
In these next steps, you will create a Service Account API for Google Sheets, which will provide a JSON file that you will later input into your Google Sheet Node.
Step 1 - Create Cloud Project with Google:
- Go to Google Cloud console and sign in to your Google/Gmail account. Once signed in, you’ll see a list of existing projects (if there are any).
- Click Create Project to create a new one.
- Enter a project name and organization as necessary.
Step 2 - Enable Google Sheets API:
- Make sure your project is still selected as the current project. From the navigation menu, hover over APIs and Services and select Library.
- Search for and click the Google Sheets API tile.
- Click Enable.
Step 3 - Download Service Account credentials:
- To create credentials, hover over “APIs & Services” on the left menu again and select “Credentials”.
- On the Credentials page, click Create credentials and select the “Service account” option.
- Enter a name for the service account, for example, Node-RED Sheets API.
- Click “CREATE AND CONTINUE”.
- Select Owner in the Role drop-down window.
- Click on your newly created service account.
- Click “KEYS” on the top menu and select JSON.
- Click “CREATE” To download a JSON file you will use in a later step.
Step 4 - Give permission to your Google Sheet for editing:
- On the Google Cloud site, navigate back to Credentials.
- Highlight and copy the service account’s randomly generated email address. It will look similar to “node-red-sheets-account@————-.iam.gserviceaccount.com”.
- In Google Sheets, click share in the sheet you will be using, paste the address over “Add People and Groups” and click send.
Next Step
Continue to Configuring Nodes in Node-RED.
Previous Step
Return to Overview.