Looking for help? Type your search string. Minimum 4 characters are required.

Open Category List

Google Service Account Setup Guide (Google Sheets Integration) — WPBot Automator

2 minutesread

This guide explains how to configure a Google Service Account and connect it to a Google Sheet. At the end, you will have the following three values:

  1. Service Account JSON
  2. Google Sheet ID
  3. Google Sheet Name
    • Prerequisites
    • A Google account
    • A Google Cloud Project
    • A Google Spreadsheet

Step 1: Create a Google Cloud Project

  1. Open the Google Cloud Console.
  2. Go to Console Home.
  3. Click Select Project.
  4. Click New Project.
  5. Enter:
    • Project Name
    • Organization (optional)
  6. Click Create.

Step 2: Enable Google Sheets API

  1. Open APIs & ServicesLibrary.
  2. Search for:Google Sheets API
  1. Click it.
  2. Click Enable.

This is useful if your application needs to locate or manage spreadsheets.


Step 3: Create a Service Account

Open:

https://console.cloud.google.com/iam-admin/serviceaccounts

or navigate to:

IAM & Admin → Service Accounts

ClickCreate Service Account

Fill in:

Field Example
Service Account Name sheet-access
Service Account ID auto-generated
Description Google Sheets Integration

ClickCreate and Continue

You can skip assigning roles if your application only needs access to specific shared spreadsheets.

ClickDone

Your Service Account is now created.


Step 4: Create the Service Account JSON Key

Open your Service Account.

Go to theKeystab. Click

Add Key->Create New KeyChoose->JSONClickCreate

A JSON file will automatically download to your computer.

Example:my-service-account.json

Keep this file secure. Google only lets you download the private key once; if you lose it, you’ll need to create a new key.


Step 5: Get the Service Account Email

Open the downloaded JSON file.

Find:

{
  "client_email": "[email protected]"
}

Copy the value ofclient_email

Example:[email protected]


Step 6: Share Your Google Sheet

Open your Google Spreadsheet.

ClickShare

Add the Service Account email[email protected]

Permission:Editor

ClickSend

Without sharing the sheet, the Service Account cannot access it.


Step 7: Get the Sheet ID

Open your Google Sheet.

Example URL:https://docs.google.com/spreadsheets/d/1AbCdEfGhIjKlMnOpQrStUvWxYz123456789/edit#gid=0

The Sheet ID is:1AbCdEfGhIjKlMnOpQrStUvWxYz123456789


Step 8: Get the Sheet Name

At the bottom of the spreadsheet, you’ll see the worksheet tabs.

Example:Sheet1

This tab name is your Sheet Name.

Example:Products


Final Configuration

You should now have the following:

1. Service Account JSON

my-service-account.json

2. Sheet ID

1AbCdEfGhIjKlMnOpQrStUvWxYz123456789

3. Sheet Name

Products

Example Configuration

Service Account JSON:
credentials.json

Sheet ID:
1AbCdEfGhIjKlMnOpQrStUvWxYz123456789

Sheet Name:
Products

WPBot Pro license holders are entitled to get premium support. Open a Support Ticket to get professional help.

Follow by Email
LinkedIn
Share
WhatsApp
Reddit