Google Drive (Service Account) icon

Google Drive (Service Account)

Access Google Drive API using Service Account

Overview

This node allows updating permissions on a Google Drive file using a service account for authentication. It supports updating the role of an existing permission on a specified file. This is useful for managing access control on files programmatically, such as changing a user's role from reader to writer or owner.

Use Case Examples

  1. Updating a user's permission role on a shared Google Drive file to grant them write access.
  2. Changing the role of a group permission on a file to organizer to allow managing the file's sharing settings.

Properties

Name Meaning
Authentication Choose the authentication method to use, either saved credentials or manual entry.
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 Google Drive file whose permission is to be updated.
Permission ID The ID of the permission to update on the specified file.
Role The new role to assign to the permission, such as owner, organizer, writer, commenter, or reader.

Output

JSON

  • * - The updated permission object returned from the Google Drive API, including the new role and other permission details.

Dependencies

  • Google Drive API via googleapis library
  • Google service account credentials or manual authentication details

Troubleshooting

  • Ensure the service account has the necessary permissions and domain-wide delegation if impersonation is used.
  • Verify that the file ID and permission ID are correct and exist on Google Drive.
  • Common errors include authentication failures due to invalid credentials or insufficient scopes, and permission update failures if the user does not have rights to modify the permission.

Links

Discussion