List File Permissions
Lists all permissions for a file in Google Drive.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Drive Id - The identifier for the connected Google Drive service obtained from the Connect node.
- File Id - The unique identifier of the file whose permissions should be listed.
Output
- result - An array of permission objects containing details about each permission on the specified file. Each object includes:
- Id - The unique identifier of the permission
- Role - The role granted (owner, writer, commenter, reader)
- Type - The type of entity (user, group, domain, anyone)
- EmailAddress - The email address of the user or group (if applicable)
- Domain - The domain name (if applicable)
- DisplayName - The display name of the user or group (if available)
How It Works
The List File Permissions node retrieves all permissions for a specified file in Google Drive. When executed, the node:
- Validates the required inputs (Drive Id and File Id)
- Retrieves the Google Drive service client using the provided Drive Id
- Uses the Google Drive API to list permissions with the Permissions.List method
- Returns the array of permission objects
Requirements
- A valid Google Drive connection established using the Connect node
- The File Id of an existing file in Google Drive
- Appropriate permissions to view the sharing settings of the file
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Drive Id
- Empty or invalid File Id
- Google Drive API errors during permission listing
- Insufficient permissions to view the sharing settings of the file
- Attempting to list permissions for a file that doesn't exist
Usage Notes
- This node is useful for auditing file access or preparing to modify permissions
- The output contains all permissions, including those granted to individual users, groups, domains, and public access
- Permission IDs from the output can be used with the Delete File Permission node
- The role field indicates what level of access each entity has to the file
- The type field indicates what kind of entity has been granted permission
- This node does not modify any permissions - it only retrieves them for viewing