Actions19
Overview
This node allows users to delete a folder in Google Drive using a service account for authentication. It supports both credential-based and manual authentication methods. The node is useful for automating the management of Google Drive folders, such as cleaning up unused folders or organizing files programmatically.
Use Case Examples
- Automatically delete a specific folder by its ID after processing its contents.
- Remove temporary folders created during a workflow to maintain a clean Drive environment.
Properties
| Name | Meaning |
|---|---|
| Authentication | Choose the authentication method to access Google Drive API, either using saved credentials or manual entry. |
| Service Account Email | The email address of the 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). |
| Folder ID | The ID of the folder to be deleted in Google Drive. |
Output
JSON
success- Indicates whether the folder deletion was successful (true/false).folderId- The ID of the folder that was deleted.
Dependencies
- Google Drive API via googleapis library
Troubleshooting
- Common issues include missing or invalid credentials, which will cause authentication failures. Ensure the service account email and private key are correctly provided if using manual authentication.
- If the folder ID is incorrect or the folder does not exist, the API will return an error indicating the folder could not be found.
- Permissions errors may occur if the service account or impersonated user does not have sufficient rights to delete the folder. Verify the service account has appropriate access to the target folder.
Links
- Google Drive API - Delete File - Official documentation for deleting files and folders in Google Drive via the API.
- Google Cloud Service Accounts - Information about service accounts and how to use them for authentication.