Delete File Permission
Removes a permission from a file in Google Drive, effectively revoking access for a user or group.
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 from which to remove the permission.
- Permission Id - The unique identifier of the permission to be removed.
How It Works
The Delete File Permission node removes an existing permission from a file in Google Drive, revoking access for the associated user or group. When executed, the node:
- Validates the required inputs (Drive Id, File Id, and Permission Id)
- Retrieves the Google Drive service client using the provided Drive Id
- Uses the Google Drive API to delete the permission with the Permissions.Delete method
- The permission is permanently removed and cannot be recovered through the API
Requirements
- A valid Google Drive connection established using the Connect node
- The File Id of an existing file in Google Drive
- The Permission Id of an existing permission on that file
- Appropriate permissions to modify 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
- Empty or invalid Permission Id
- Google Drive API errors during permission deletion
- Insufficient permissions to modify sharing settings of the file
- Attempting to delete a permission that doesn't exist
Usage Notes
- This operation is permanent and cannot be undone through the API
- The user or group associated with the deleted permission will no longer have access to the file
- Make sure you have the correct Permission Id before executing this node
- Consider using caution with this node, especially in production environments
- The node does not return any output as the permission is completely removed
- You can use the List File Permissions node to find the Permission Id before deleting it