How to connect Google Cloud Storage
This tutorial shows you how to give Dattos access to a Google Cloud Storage bucket so that processes can retrieve input files and deliver exported files to it. To learn about the integration as a whole, see File repositories: which ones Dattos connects to and how to set them up.
What you need
Access to the Google Cloud console with permission to create service accounts and grant roles on the bucket (or someone on your cloud team who can do this).
The bucket must already be created.
Permission to generate a service account key.
Key creation may be blocked in your organization. In Google Cloud organizations created on or after May 3, 2024, service account key creation is blocked by default by the iam.managed.disableServiceAccountKeyCreation policy. If you get an error when clicking the button to create a key, your Google Cloud organization administrator needs to allow this policy for the bucket's project. Dattos only connects to Cloud Storage using the JSON key.
1. Create the folders in the bucket
In Cloud Storage, folders are prefixes in file names. To make a folder appear in Dattos' list even when it's empty, create it in the console first: open the bucket on the Buckets page and click Create folder. For example, dattos/entrada/extratos and dattos/saida/relatorios.
2. Create the service account
On the Service Accounts page in the console, in the bucket's project, create a service account dedicated to Dattos.
Open the bucket, go to Permissions › Grant access, enter the service account's email address, and assign the Storage Object User role (
roles/storage.objectUser). It allows listing, reading, writing, and deleting files in that bucket only, and it's the least-privileged role that meets Dattos' needs.Return to the Service Accounts page and click the email address of the account you created. On the Keys tab, open Add key › Create new key, choose JSON, and click Create. Google downloads a
.jsonfile to your computer, and you won't be able to download this file again.
Delete permission is required because Dattos moves the files it reads to control subfolders (.processing, .processed, and .error). In Cloud Storage, moving a file means copying it and deleting the original.
3. Add the credential to Dattos
Click the gear icon and open General › Credentials.
Click + New credential and, on the Storage tab, choose Google Cloud Storage.
Fill in the fields:
Field | What to enter | Required |
|---|---|---|
Credential name | A name that identifies the bucket, such as "GCS Finance - statements" | Yes |
Bucket name | The bucket name only, without | Yes |
Service Account JSON | The entire contents of the | Yes |
Prefix | Optional. Restricts Dattos to part of the bucket, for example | No |
Privacy profiles | Who can use this credential in processes | Yes |
Click Save. Once saved, delete the
.jsonfile from your computer: the key is stored in Dattos.
Google Cloud Storage doesn't have a Test connection button. To verify access, follow the next step.
4. Verify and connect the bucket to a process
Open a Turbo AI process with a published flow and go to Source Directory.
Click Edit for the desired source, then click Add destination.
Under Storage Integration, choose the credential you created.
If the bucket's folders appear under Import Folders, access is working. Choose the folder and save.
The complete step-by-step instructions, including for output, are in Integrating with file repositories: source and output directories.
How to view bucket files
Dattos shows folders, but not files. To check whether a file arrived, was moved to .processed or .error, or whether an export was delivered, open the bucket on the Buckets page in the Google Cloud console using a company user account with read access.
Common issues
What you see | Likely cause |
|---|---|
Error loading folders | JSON pasted incompletely, key revoked in Google Cloud, incorrect bucket name, or service account without a role on the bucket |
Folders appear, but the run ends with an error when writing or moving the file | The service account only has a read role; change it to Storage Object User |
A folder doesn't appear in the list | The folder is outside the specified Prefix or hasn't been created in the bucket yet |