Actions19
Overview
This node allows uploading files to Google Drive using a service account for authentication. It supports both saved credentials and manual entry of service account details. Users can specify the file name, content (text or base64), parent folder ID, and additional metadata such as description and MIME type. This node is useful for automating file uploads to Google Drive in workflows, such as backing up data, sharing files, or integrating with other systems that generate files.
Use Case Examples
- Uploading a report generated by another node to a specific Google Drive folder.
- Automatically saving form submissions as text files in Google Drive.
- Uploading images or documents to Google Drive for further processing or sharing.
Properties
| Name | Meaning |
|---|---|
| Authentication | Choose authentication method: use saved credentials or enter service account details manually. |
| Service Account Email | Service account email address from the service account JSON, required if manual authentication is selected. |
| Private Key | Private key from the service account JSON, required if manual authentication is selected. |
| Impersonate Email (Optional) | Email of user to impersonate, requires domain-wide delegation, optional for manual authentication. |
| File Name | Name of the file to upload. |
| File Content | Content of the file, can be text or base64 encoded. |
| Parent Folder ID | ID of the parent folder in Google Drive where the file will be uploaded; leave empty to upload to root. |
| Additional Fields | Optional additional metadata for the file, including description and MIME type. |
Output
JSON
id- Unique identifier of the uploaded file in Google Drive.name- Name of the uploaded file.mimeType- MIME type of the uploaded file.description- Description of the uploaded file, if provided.parents- Array of parent folder IDs where the file is located.createdTime- Timestamp when the file was created.modifiedTime- Timestamp when the file was last modified.size- Size of the uploaded file in bytes.
Dependencies
- Google Drive API access via googleapis library
- Service account credentials including email and private key
Troubleshooting
- Ensure the service account has the necessary permissions to upload files to the specified Google Drive folder.
- If using manual authentication, verify the private key format is correct and newline characters are properly handled.
- Check that the parent folder ID is valid and accessible by the service account.
- Common errors include authentication failures due to incorrect credentials, permission denied errors if the service account lacks access, and invalid file content encoding.
Links
- Google Drive API Documentation - Official documentation for Google Drive API used by this node.
- Google Cloud Service Accounts - Information about creating and managing service accounts for Google Cloud APIs.