Google Drive File operations
Use this operation to create, delete, change, and manage files in Google Drive. Refer to Google Drive for more information on the Google Drive node itself.
Note
This node can be used as an AI tool This node can be used to enhance the capabilities of an AI agent. When used in this way, many parameters can be set automatically, or with information directed by AI - find out more in the AI tool parameters documentation.
Copy a file
Use this operation to copy a file to a drive.
Enter these parameters:
Credential to connect with: Create or select an existing Google Drive credentials.
Resource: Select File.
Operation: Select Copy.
File: Choose a file you want to copy.
Select From list to choose the title from the dropdown list, By URL to enter the URL of the file, or By ID to enter the
fileId.You can find the
fileIdin a shareable Google Drive file URL:https://docs.google.com/document/d/fileId/edit#gid=0. In your Google Drive, select Share > Copy link to get the shareable file URL.
File Name: The name to use for the new copy of the file.
Copy In The Same Folder: Choose whether to copy the file to the same folder. If disabled, set the following:
Parent Drive: Select From list to choose the drive from the dropdown list, By URL to enter the URL of the drive, or By ID to enter the
driveId.Parent Folder: Select From list to choose the folder from the dropdown list, By URL to enter the URL of the folder, or By ID to enter the
folderId.You can find the
driveIdandfolderIDby visiting the shared drive or folder in your browser and copying the last URL component:https://drive.google.com/drive/u/1/folders/driveId.
Options
Copy Requires Writer Permissions: Select whether to enable readers and commenters to copy, print, or download the new file.
Description: A short description of the file.
Refer to the Method: files.copy | Google Drive API documentation for more information.
Create from text
Use this operation to create a new file in a drive from provided text.
Enter these parameters:
Credential to connect with: Create or select an existing Google Drive credentials.
Resource: Select File.
Operation: Select Create From Text.
File Content: Enter the file content to use to create the new file.
File Name: The name to use for the new file.
Parent Drive: Select From list to choose the drive from the dropdown list, By URL to enter the URL of the drive, or By ID to enter the
driveId.Parent Folder: Select From list to choose the folder from the dropdown list, By URL to enter the URL of the folder, or By ID to enter the
folderId.
You can find the driveId and folderID by visiting the shared drive or folder in your browser and copying the last URL component: https://drive.google.com/drive/u/1/folders/driveId.
Options
APP Properties: A bundle of arbitrary key-value pairs which are private to the requesting app.
Properties: A bundle of arbitrary key-value pairs which are visible to all apps.
Keep Revision Forever: Choose whether to set the
keepForeverfield in the new head revision. This only applies to files with binary content. You can keep a maximum of 200 revisions, after which you must delete the pinned revisions.
OCR Language: An ISO 639-1 language code to help the OCR interpret the content during import.
Use Content As Indexable Text: Choose whether to mark the uploaded content as indexable text.
Convert to Google Document: Choose whether to create a Google Document instead of the default
.txtformat. You must enable the Google Docs API in the Google API Console for this to work.
Refer to the Method: files.insert | Google Drive API documentation for more information.
Delete a file
Use this operation to delete a file from a drive.
Enter these parameters:
Credential to connect with: Create or select an existing Google Drive credentials.
Resource: Select File.
Operation: Select Delete.
File: Choose a file you want to delete.
Select From list to choose the title from the dropdown list, By URL to enter the URL of the file, or By ID to enter the
fileId.You can find the
fileIdin a shareable Google Drive file URL:https://docs.google.com/document/d/fileId/edit#gid=0. In your Google Drive, select Share > Copy link to get the shareable file URL.
Options
Delete Permanently: Choose whether to delete the file now instead of moving it to the trash.
Refer to the Method: files.delete | Google Drive API documentation for more information.
Download a file
Use this operation to download a file from a drive.
Enter these parameters:
Credential to connect with: Create or select an existing Google Drive credentials.
Resource: Select File.
Operation: Select Download.
File: Choose a file you want to download.
Select From list to choose the title from the dropdown list, By URL to enter the URL of the file, or By ID to enter the
fileId.You can find the
fileIdin a shareable Google Drive file URL:https://docs.google.com/document/d/fileId/edit#gid=0. In your Google Drive, select Share > Copy link to get the shareable file URL.
Options
Put Output File in Field: Choose the field name to place the binary file contents to make it available to following nodes.
Google File Conversion: Choose the formats to export as when downloading Google Files:
Google Docs: Choose the export format to use when downloading Google Docs files: HTML, MS Word Document, Open Office Document, PDF, Rich Text (rtf), or Text (txt).
Google Drawings: Choose the export format to use when downloading Google Drawing files: JPEG, PDF, PNG, or SVG.
Google Slides: Choose the export format to use when downloading Google Slides files: MS PowerPoint, OpenOffice Presentation, or PDF.
Google Sheets: Choose the export format to use when downloading Google Sheets files: CSV, MS Excel, Open Office Sheet, or PDF.
File Name: The name to use for the downloaded file.
Refer to the Method: files.get | Google Drive API documentation for more information.
Move a file
Use this operation to move a file to a different location in a drive.
Enter these parameters:
Credential to connect with: Create or select an existing Google Drive credentials.
Resource: Select File.
Operation: Select Move.
File: Choose a file you want to move.
Select From list to choose the title from the dropdown list, By URL to enter the URL of the file, or By ID to enter the
fileId.You can find the
fileIdin a shareable Google Drive file URL:https://docs.google.com/document/d/fileId/edit#gid=0. In your Google Drive, select Share > Copy link to get the shareable file URL.
Parent Drive: Select From list to choose the drive from the dropdown list, By URL to enter the URL of the drive, or By ID to enter the
driveId.Parent Folder: Select From list to choose the folder from the dropdown list, By URL to enter the URL of the folder, or By ID to enter the
folderId.
You can find the driveId and folderID by visiting the shared drive or folder in your browser and copying the last URL component: https://drive.google.com/drive/u/1/folders/driveId.
Refer to the Method: parents.insert | Google Drive API documentation for more information.
Update a file
Use this operation to update a file.
Enter these parameters:
Credential to connect with: Create or select an existing Google Drive credentials.
Resource: Select File.
Operation: Select Update.
File to Update: Choose a file you want to update.
Select From list to choose the title from the dropdown list, By URL to enter the URL of the file, or By ID to enter the
fileId.You can find the
fileIdin a shareable Google Drive file URL:https://docs.google.com/document/d/fileId/edit#gid=0. In your Google Drive, select Share > Copy link to get the shareable file URL.
Change File Content: Choose whether to send new binary data to replace the existing file content. If enabled, fill in the following:
Input Data Field Name: The name of the input field that contains the binary file data you wish to use.
New Updated File Name: A new name for the file if you want to update the filename.
Options
APP Properties: A bundle of arbitrary key-value pairs which are private to the requesting app.
Properties: A bundle of arbitrary key-value pairs which are visible to all apps.
Keep Revision Forever: Choose whether to set the
keepForeverfield in the new head revision. This only applies to files with binary content. You can keep a maximum of 200 revisions, after which you must delete the pinned revisions.
OCR Language: An ISO 639-1 language code to help the OCR interpret the content during import.
Use Content As Indexable Text: Choose whether to mark the uploaded content as indexable text.
Move to Trash: Whether to move the file to the trash. Only possible for the file owner.
Return Fields: Return metadata fields about the file. Can be one or more of the following: [All], explicitlyTrashed, exportLinks, hasThumbnail, iconLink, ID, Kind, mimeType, Name, Permissions, Shared, Spaces, Starred, thumbnailLink, Trashed, Version, or webViewLink.
Refer to the Method: files.update | Google Drive API documentation for more information.
Upload a file
Use this operation to upload a file.
Enter these parameters:
Credential to connect with: Create or select an existing Google Drive credentials.
Resource: Select File.
Operation: Select Upload.
Input Data Field Name: The name of the input field that contains the binary file data you wish to use.
File Name: The name to use for the new file.
Parent Drive: Select From list to choose the drive from the dropdown list, By URL to enter the URL of the drive, or By ID to enter the
driveId.Parent Folder: Select From list to choose the folder from the dropdown list, By URL to enter the URL of the folder, or By ID to enter the
folderId.
You can find the driveId and folderID by visiting the shared drive or folder in your browser and copying the last URL component: https://drive.google.com/drive/u/1/folders/driveId.
Options
APP Properties: A bundle of arbitrary key-value pairs which are private to the requesting app.
Properties: A bundle of arbitrary key-value pairs which are visible to all apps.
Keep Revision Forever: Choose whether to set the
keepForeverfield in the new head revision. This only applies to files with binary content. You can keep a maximum of 200 revisions, after which you must delete the pinned revisions.
OCR Language: An ISO 639-1 language code to help the OCR interpret the content during import.
Use Content As Indexable Text: Choose whether to mark the uploaded content as indexable text.
Simplify Output: Choose whether to return a simplified version of the response instead of including all fields.
Refer to the Method: files.insert | Google Drive API documentation for more information.