Google Cloud Storage (GCS)

To allow Capacity to pull call recording and CSV files from your Google Cloud Storage (GCS) bucket, you'll need to create a dedicated service account, grant it read-only access to your bucket, and share the generated credentials file with Capacity.

Follow the steps below in your Google Cloud Console.


Configuration

Identify or Create the Bucket

Confirm which GCS bucket contains (or will contain) the files Capacity should ingest. If you don't already have a bucket for this purpose:

  • Go to Cloud Storage > Buckets in the Google Cloud Console.
  • Click Create.
  • Choose a unique bucket name, region, and storage class (Standard is sufficient for most use cases).
  • Under Access Control, select Uniform (recommended).

Create Service Account

A service account is a non-human identity that Capacity will use to connect to your bucket. We recommend creating a new service account specifically for this integration, rather than reusing an existing one.

  • Go to IAM & Admin > Service Accounts
  • Click Create Service Account
  • Give it a clear name, e.g. capacity-service-account

  • Click Create and close
  • Copy the Email generated for the service account

Grant Access

Rather than granting project-wide access, permissions should be scoped to the specific bucket Capacity needs to access.

  • Navigate to the appropriate bucket
  • Go to the Permissions tab and click Grant Access
  • Add the service account's email address as a new principal (i.e. the one copied above)
  • Search and assign the role: Storage Object Viewer

  • Click Save

Generate JSON Key File

This file contains the credentials Capacity's systems will use to authenticate as the service account

  • Go back to IAM & Admin > Service Accounts
  • Click on the service account you created
  • Select the Keys tab
  • Click Add Key > Create New Key
  • Select JSON as the key type and click Create

A .json file will download automatically. It will look similar to this (values redacted):

{
    "type": "service_account",
    "project_id": "spatial-garden-505309-t6",
    "private_key_id": "XX123XX",
    "private_key": "-----BEGIN PRIVATE KEY-----\nXXxxXX\n-----END PRIVATE KEY-----\n",
    "client_email": "capacity-service-account@spatial-garden-505309-t6.iam.gserviceaccount.com",
    "client_id": "114270393607082274722",
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://oauth2.googleapis.com/token",
    "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
    "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/capacity-service-account%40spatial-garden-505309-t6.iam.gserviceaccount.com",
    "universe_domain": "googleapis.com"
}

What to Share with Capacity

ItemDescription
Bucket NameFull name given to the GCS bucket where Capacity will pull files from
Folder/PrefixShare the prefix of the bucket where Capacity will pull files from (if not the root)
JSON Key FileShare the JSON file securely with Capacity



Was this article helpful?