Google Drive (Service Account) icon

Google Drive (Service Account)

Access Google Drive API using Service Account

Overview

This node operation copies a file in Google Drive using a service account for authentication. It allows users to duplicate an existing file by specifying the file's ID and optionally providing a new name for the copied file. This is useful for scenarios where you want to create backups, templates, or versions of files without altering the original.

Use Case Examples

  1. Copy a Google Drive file to create a backup with a new name.
  2. Duplicate a template file to use as a starting point for a new document.

Properties

Name Meaning
Authentication Choose the authentication method: use saved credentials or enter them manually.
Service Account Email The email address of the Google service account used for authentication (required if manual authentication is selected).
Private Key The private key from the service account JSON used for authentication (required if manual authentication is selected).
Impersonate Email (Optional) Email of the user to impersonate, requires domain-wide delegation (optional, manual authentication only).
File ID The ID of the file to be copied (required).
New File Name Optional new name for the copied file.

Output

JSON

  • json - The JSON object representing the copied file's metadata and details returned from Google Drive API.

Dependencies

  • Google Drive API
  • Google service account credentials

Troubleshooting

  • Ensure the service account has the necessary permissions to access and copy the specified file.
  • If using manual authentication, verify the service account email and private key are correctly entered and formatted.
  • Check that the file ID is valid and the file exists in Google Drive.
  • If impersonation is used, confirm domain-wide delegation is properly configured for the service account.

Links

Discussion