Actions19
Overview
This node allows users to create a folder in Google Drive using a service account for authentication. It supports both credential-based and manual authentication methods. Users can specify the folder name and optionally set a parent folder ID to create the new folder within a specific directory. This node is useful for automating folder creation in Google Drive, such as organizing files by project or client automatically.
Use Case Examples
- Automatically create a project folder in Google Drive when a new project is initiated.
- Organize client files by creating a dedicated folder for each client automatically.
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 address of a user to impersonate, requires domain-wide delegation (used only in manual authentication). |
| Folder Name | The name of the folder to be created in Google Drive. |
| Parent Folder ID | The ID of the parent folder under which the new folder will be created. Leave empty to create the folder in the root directory. |
Output
JSON
id- The unique identifier of the created folder.name- The name of the created folder.mimeType- The MIME type indicating the item is a folder (application/vnd.google-apps.folder).parents- Array of parent folder IDs if the folder is created inside another folder.createdTime- Timestamp when the folder was created.modifiedTime- Timestamp when the folder was last modified.
Dependencies
- Google Drive API
- Google service account credentials (email and private key)
Troubleshooting
- Ensure that the service account has the necessary permissions to create folders in the target Google Drive.
- If using manual authentication, verify that the private key is correctly formatted and includes proper newline characters.
- If impersonation is used, confirm that domain-wide delegation is properly configured for the service account.
- Common error: 'No credentials provided' - occurs if no credentials are selected or provided; resolve by selecting saved credentials or entering manual credentials.
- API errors related to permissions or invalid folder IDs may occur if the parent folder ID is incorrect or the service account lacks access rights.
Links
- Google Drive API - Folders - Official documentation on managing folders with Google Drive API.
- Google Cloud Service Accounts - Information on creating and managing Google Cloud service accounts.