Actions19
Overview
This node allows moving a file within Google Drive using a service account for authentication. It supports both credential-based and manual authentication methods. The node is useful for automating file organization tasks, such as relocating files to different folders programmatically. For example, it can be used in workflows that manage document storage by moving files to appropriate project folders based on certain triggers.
Use Case Examples
- Automatically move a file to a project folder after it is uploaded.
- Reorganize files by moving them to archive folders based on their metadata.
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 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 file to be moved within Google Drive. |
| New Parent Folder ID | The ID of the destination folder where the file will be moved. |
Output
JSON
json- Contains the updated file metadata after the move operation, including file ID, name, parents, and other file properties.
Dependencies
- Google Drive API access via a Google service account with appropriate permissions.
Troubleshooting
- Ensure the service account has the necessary permissions to access and modify files in the target Google Drive.
- If using manual authentication, verify that the service account email and private key are correctly entered and formatted.
- Check that the file ID and new parent folder ID are valid and accessible by the service account.
- Common errors include authentication failures, permission denied errors, and invalid file or folder IDs. Resolving these typically involves verifying credentials, permissions, and input parameters.
Links
- Google Drive API - Files: update - Official documentation for updating file metadata, including moving files by changing parent folders.
- Using OAuth 2.0 for Server to Server Applications - Google's guide on using service accounts for authentication.