Skip to content

Google Drive Credential

FlowMint works in Google Drive as a service account: a Google identity for software, with its own email address and a key file instead of a password. It sees only the folders and shared drives you share with it.

  1. In the Google Cloud console, create a project (or pick one) and enable the Google Drive API for it.
  2. Under APIs & Services → Credentials, create a service account. It needs no project roles. Note its email address, which ends in iam.gserviceaccount.com.
  3. Open the service account, go to Keys, add a key of type JSON and download it. Keep this file like a password.
  4. In Google Drive, create or choose a shared drive for the workflow’s files, and add the service account’s email address to it as a Content manager (or a role that can add files).
  5. Store the whole key file as the drive_service_account credential; see Managing credentials.
  6. Copy the id of the folder the workflow should use: the part of its Drive address after /folders/. Use it as parent_id in the Drive steps.

flowmint_test_credential with drive_service_account reads the stored key and returns the service account’s email and project id. It does not contact Google, so an ok means only that the key is stored and readable.

To prove Drive access, run a workflow with a drive_find_or_create_folder step against your parent_id and check that the folder appears.

  • Files fail, folders work. The quota rule above: move the target into a shared drive.
  • auth_failed on every Drive step. The folder or shared drive is not shared with the service account’s email, or the Drive API is not enabled in its project.
  • config_error saying the JSON is invalid. The stored value is not the whole key file, or it lacks client_email. Store the file again.
  • You cannot find a folder FlowMint created. A folder the service account creates in someone’s My Drive is owned by the service account and does not show in Drive search. Open the parent folder by its address. In a shared drive this does not happen.