GCS Connection

Prerequisite

For the GCS Data Sources and Emitters to run successfully in Gathr applications, the following permissions/policy actions should be assigned in Google Cloud:

  • storage.buckets.get

  • storage.buckets.create

  • storage.buckets.list

  • storage.objects.create

  • storage.objects.delete

  • storage.objects.get

  • storage.objects.list

Connection Configuration

Configure the GCS Batch connection by providing the details for each field as described below:

Connection Name: Name of the connection to be created.

Service Account Key: Upload the JSON file having the service account credentials.

See the sub-topic Generate Service Account Key to know the steps required for generating Service Account ID and Service Account Key for upload.

To know more about how to create and manage service account keys using the Google Cloud Console, click here.

After entering all the details, click on the TEST button.

If the connection service identification and authentication details are provided correctly, a success message stating “connection available” is generated. Click on the CREATE button to save the changes.

If the details are incorrect or the server is down, you will get a message “Connection unavailable”.

Generate Service Account Key

Prerequisite

  • You must have a Google account to access the GCP services.

Steps required to generate service account key

Follow these steps in Google Cloud to allow Gathr the access to your Google Sheets:

  • Create a Service Account and key

  • Enable the required APIs

  • Share a Spreadsheet from your Google Drive with the Service Account ID

Each of these steps are explained below:

Generate Service Account ID and Key

  1. To access/create Google account, click here.

  2. Sign in to GCP.

  3. Create a new project to proceed further. Else, use any existing project to continue.

  4. Navigate to IAM & Admin section and click on the Service Accounts option.

  5. On the Service Accounts page, click on the CREATE SERVICE ACCOUNT option as shown below:

    Create_Service_Account_1

  6. Provide the service account details and click CREATE AND CONTINUE.

    Create_Service_Account_2

  7. (Optional steps) Grant the service account access to project and users.

    Create_Service_Account_3

    Click Done.

  8. The created service account will be listed on the Service Accounts page along with the available ones (if any).

    This Service Account ID should be provided in Gathr during the Google Spreadsheet connection configuration.

    Create_Service_Account_4

    Click on the ellipses under Actions and select Manage Keys.

  9. Click on ADD KEY to create a new key or download an existing key.

    Choose a key type from the available options, JSON or P12, and click CREATE.

    Create_Service_Account_5

    The created Private key will be downloaded and saved locally.

    Create_Service_Account_6

    This Private Key file should be uploaded in Gathr during the Google Spreadsheet connection configuration.

Enable the Google Sheets API and Drive API

  1. Search for APIs & Services on Google console, or, follow the link given below:

    https://console.cloud.google.com/apis

    Enable_APIs_&_Services

  2. Click on ENABLE APIS AND SERVICES option.

  3. On the API Library page, search and open google sheets api.

    Enable_Google_Sheets_API_1

    Enable_Google_Sheets_API_2

  4. On the Google Sheets API page, click on ENABLE.

    Create_Service_Account_7

    A confirmation will appear once the Google Sheets API is enabled.

    Enable_Google_Sheets_API_4

  5. On the API Library page, search and open google drive api.

    Enable_Google_Drive_API_1

    Enable_Google_Drive_API_2

  6. On the Google Drive API page, click on ENABLE.

    Enable_Google_Drive_API_3

    A confirmation will appear once the Google Drive API is enabled.

    Enable_Google_Drive_API_4

After completing all the required steps navigate to Gathr console and provide the necessary details to create the connection.

To know more about how to create and manage service account keys using the Google Cloud Console, click here.

Top