Google Drive (Service Account) icon

Google Drive (Service Account)

Access Google Drive API using Service Account

Overview

This node allows users to interact with Google Drive permissions using a service account for authentication. Specifically, the 'Permission - List' operation retrieves and lists all permissions associated with a specified Google Drive file. This is useful for scenarios where you need to audit or manage access controls on files programmatically, such as listing who has access to a file and their roles.

Use Case Examples

  1. Listing all permissions for a file to review who can access it.
  2. Automating permission audits for files in a Google Drive folder.

Properties

Name Meaning
Authentication Choose the authentication method: use saved n8n credentials or enter service account credentials 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 address of the user to impersonate, requiring domain-wide delegation (optional, manual authentication only).
File ID The ID of the Google Drive file whose permissions are to be listed.

Output

JSON

  • json - Each item contains a permission object representing a single permission entry for the specified file.

Dependencies

  • Google Drive API accessed via googleapis library

Troubleshooting

  • Common issues include authentication errors if credentials are missing or incorrect. Ensure the service account email and private key are valid and have appropriate permissions.
  • If the file ID is invalid or the file does not exist, the node will throw an error indicating the file could not be found.
  • Permission listing may fail if the service account lacks access to the file or if domain-wide delegation is required but not configured properly.

Links

Discussion