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:

  1. 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).
  2. Click Create Project to create a new one.
  3. Enter a project name and organization as necessary.

Google Sheet Project

Step 2 - Enable Google Sheets API:

  1. Make sure your project is still selected as the current project. From the navigation menu, hover over APIs and Services and select Library.
  2. Search for and click the Google Sheets API tile.
  3. Click Enable.

Google Sheet Navigation 1 Google Sheet Enable

Step 3 - Download Service Account credentials:

  1. To create credentials, hover over “APIs & Services” on the left menu again and select “Credentials”.
  2. On the Credentials page, click Create credentials and select the “Service account” option.
  3. Enter a name for the service account, for example, Node-RED Sheets API.
  4. Click “CREATE AND CONTINUE”.
  5. Select Owner in the Role drop-down window.
  6. Click on your newly created service account.
  7. Click “KEYS” on the top menu and select JSON.
  8. Click “CREATE” To download a JSON file you will use in a later step.

Google Sheet account 0Google Sheet account 1 Google Sheet account 2 Google Sheet account 3Google Sheet account 4

Step 4 - Give permission to your Google Sheet for editing:

  1. On the Google Cloud site, navigate back to Credentials.
  2. Highlight and copy the service account’s randomly generated email address. It will look similar to “node-red-sheets-account@————-.iam.gserviceaccount.com”.
  3. 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.