{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Automated Workflows","type":"markdown"},"seo":{"title":"Google Drive File operations","description":"Everything about Mosaic Journeys, SDKs, and APIs","siteUrl":"https://developer.transmitsecurity.com/","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"google-drive-file-operations","__idx":0},"children":["Google Drive File operations"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this operation to create, delete, change, and manage files in Google Drive. Refer to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/automated-workflows/integrations/builtin/app-nodes/ts-wf-nodes-base.googledrive"},"children":["Google Drive"]}," for more information on the Google Drive node itself."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"copy-a-file","__idx":1},"children":["Copy a file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this operation to copy a file to a drive."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enter these parameters:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Credential to connect with"]},": Create or select an existing ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#"},"children":["Google Drive credentials"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Operation"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Copy"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File"]},": Choose a file you want to copy.",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From list"]}," to choose the title from the dropdown list, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By URL"]}," to enter the URL of the file, or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By ID"]}," to enter the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fileId"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You can find the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fileId"]}," in a shareable Google Drive file URL: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://docs.google.com/document/d/fileId/edit#gid=0"]},". In your Google Drive, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Share > Copy link"]}," to get the shareable file URL."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File Name"]},": The name to use for the new copy of the file."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Copy In The Same Folder"]},": Choose whether to copy the file to the same folder. If disabled, set the following:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parent Drive"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From list"]}," to choose the drive from the dropdown list, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By URL"]}," to enter the URL of the drive, or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By ID"]}," to enter the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["driveId"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parent Folder"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From list"]}," to choose the folder from the dropdown list, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By URL"]}," to enter the URL of the folder, or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By ID"]}," to enter the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["folderId"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You can find the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["driveId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["folderID"]}," by visiting the shared drive or folder in your browser and copying the last URL component: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://drive.google.com/drive/u/1/folders/driveId"]},"."]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"options","__idx":2},"children":["Options"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Copy Requires Writer Permissions"]},": Select whether to enable readers and commenters to copy, print, or download the new file."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]},": A short description of the file."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Refer to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/drive/api/reference/rest/v2/files/copy"},"children":["Method: files.copy | Google Drive"]}," API documentation for more information."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-from-text","__idx":3},"children":["Create from text"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this operation to create a new file in a drive from provided text."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enter these parameters:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Credential to connect with"]},": Create or select an existing ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#"},"children":["Google Drive credentials"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Operation"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create From Text"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File Content"]},": Enter the file content to use to create the new file."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File Name"]},": The name to use for the new file."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parent Drive"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From list"]}," to choose the drive from the dropdown list, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By URL"]}," to enter the URL of the drive, or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By ID"]}," to enter the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["driveId"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parent Folder"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From list"]}," to choose the folder from the dropdown list, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By URL"]}," to enter the URL of the folder, or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By ID"]}," to enter the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["folderId"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can find the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["driveId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["folderID"]}," by visiting the shared drive or folder in your browser and copying the last URL component: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://drive.google.com/drive/u/1/folders/driveId"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"options-1","__idx":4},"children":["Options"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["APP Properties"]},": A bundle of arbitrary key-value pairs which are private to the requesting app."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Properties"]},": A bundle of arbitrary key-value pairs which are visible to all apps."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Keep Revision Forever"]},": Choose whether to set the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["keepForever"]}," field 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."]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OCR Language"]},": An ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://en.wikipedia.org/wiki/ISO_639-1"},"children":["ISO 639-1"]}," language code to help the OCR interpret the content during import."]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use Content As Indexable Text"]},": Choose whether to mark the uploaded content as indexable text."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Convert to Google Document"]},": Choose whether to create a Google Document instead of the default ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".txt"]}," format. You must enable the Google Docs API in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://console.cloud.google.com/apis/library/docs.googleapis.com"},"children":["Google API Console"]}," for this to work."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Refer to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/drive/api/reference/rest/v2/files/insert"},"children":["Method: files.insert | Google Drive"]}," API documentation for more information."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"delete-a-file","__idx":5},"children":["Delete a file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this operation to delete a file from a drive."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enter these parameters:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Credential to connect with"]},": Create or select an existing ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#"},"children":["Google Drive credentials"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Operation"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Delete"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File"]},": Choose a file you want to delete.",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From list"]}," to choose the title from the dropdown list, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By URL"]}," to enter the URL of the file, or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By ID"]}," to enter the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fileId"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You can find the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fileId"]}," in a shareable Google Drive file URL: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://docs.google.com/document/d/fileId/edit#gid=0"]},". In your Google Drive, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Share > Copy link"]}," to get the shareable file URL."]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"options-2","__idx":6},"children":["Options"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Delete Permanently"]},": Choose whether to delete the file now instead of moving it to the trash."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Refer to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/drive/api/reference/rest/v2/files/delete"},"children":["Method: files.delete | Google Drive"]}," API documentation for more information."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"download-a-file","__idx":7},"children":["Download a file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this operation to download a file from a drive."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enter these parameters:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Credential to connect with"]},": Create or select an existing ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#"},"children":["Google Drive credentials"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Operation"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Download"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File"]},": Choose a file you want to download.",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From list"]}," to choose the title from the dropdown list, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By URL"]}," to enter the URL of the file, or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By ID"]}," to enter the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fileId"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You can find the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fileId"]}," in a shareable Google Drive file URL: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://docs.google.com/document/d/fileId/edit#gid=0"]},". In your Google Drive, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Share > Copy link"]}," to get the shareable file URL."]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"options-3","__idx":8},"children":["Options"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Put Output File in Field"]},": Choose the field name to place the binary file contents to make it available to following nodes."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Google File Conversion"]},": Choose the formats to export as when downloading Google Files:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Google Docs"]},": Choose the export format to use when downloading Google Docs files:  ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTML"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MS Word Document"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Open Office Document"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PDF"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Rich Text (rtf)"]},", or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Text (txt)"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Google Drawings"]},": Choose the export format to use when downloading Google Drawing files: ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JPEG"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PDF"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PNG"]},", or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["SVG"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Google Slides"]},": Choose the export format to use when downloading Google Slides files: ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MS PowerPoint"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OpenOffice Presentation"]},", or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PDF"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Google Sheets"]},": Choose the export format to use when downloading Google Sheets files: ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["CSV"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MS Excel"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Open Office Sheet"]},", or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PDF"]},"."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File Name"]},": The name to use for the downloaded file."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Refer to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/drive/api/reference/rest/v2/files/get"},"children":["Method: files.get | Google Drive"]}," API documentation for more information."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"move-a-file","__idx":9},"children":["Move a file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this operation to move a file to a different location in a drive."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enter these parameters:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Credential to connect with"]},": Create or select an existing ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#"},"children":["Google Drive credentials"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Operation"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Move"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File"]},": Choose a file you want to move.",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From list"]}," to choose the title from the dropdown list, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By URL"]}," to enter the URL of the file, or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By ID"]}," to enter the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fileId"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You can find the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fileId"]}," in a shareable Google Drive file URL: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://docs.google.com/document/d/fileId/edit#gid=0"]},". In your Google Drive, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Share > Copy link"]}," to get the shareable file URL."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parent Drive"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From list"]}," to choose the drive from the dropdown list, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By URL"]}," to enter the URL of the drive, or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By ID"]}," to enter the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["driveId"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parent Folder"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From list"]}," to choose the folder from the dropdown list, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By URL"]}," to enter the URL of the folder, or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By ID"]}," to enter the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["folderId"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can find the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["driveId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["folderID"]}," by visiting the shared drive or folder in your browser and copying the last URL component: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://drive.google.com/drive/u/1/folders/driveId"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Refer to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/drive/api/reference/rest/v2/parents/insert"},"children":["Method: parents.insert | Google Drive"]}," API documentation for more information."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"share-a-file","__idx":10},"children":["Share a file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this operation to add sharing permissions to a file."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enter these parameters:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Credential to connect with"]},": Create or select an existing ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#"},"children":["Google Drive credentials"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Operation"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Share"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File"]},": Choose a file you want to share.",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From list"]}," to choose the title from the dropdown list, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By URL"]}," to enter the URL of the file, or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By ID"]}," to enter the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fileId"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You can find the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fileId"]}," in a shareable Google Drive file URL: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://docs.google.com/document/d/fileId/edit#gid=0"]},". In your Google Drive, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Share > Copy link"]}," to get the shareable file URL."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Permissions"]},": The permissions to add to the file:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Role"]},": Select what users can do with the file. Can be one of ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Commenter"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File Organizer"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Organizer"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Owner"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Reader"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Writer"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]},": Select the scope of the new permission:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["User"]},": Grant permission to a specific user, defined by entering their ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Email Address"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Group"]},": Grant permission to a specific group, defined by entering its ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Email Address"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Domain"]},": Grant permission to a complete domain, defined by the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Domain"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Anyone"]},": Grant permission to anyone. Can optionally ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Allow File Discovery"]}," to make the file discoverable through search."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"options-4","__idx":11},"children":["Options"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Email Message"]},": A plain text custom message to include in the notification email."]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Move to New Owners Root"]},": Available when trying to transfer ownership while sharing an item not in a shared drive. When enabled, moves the file to the new owner's My Drive root folder."]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Send Notification Email"]},": Whether to send a notification email when sharing to users or groups."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Transfer Ownership"]},": Whether to transfer ownership to the specified user and downgrade the current owner to writer permissions."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use Domain Admin Access"]},": Whether to perform the action as a domain administrator."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Refer to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/drive/api/reference/rest/v2/files"},"children":["REST Resources: files | Google Drive"]}," API documentation for more information."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"update-a-file","__idx":12},"children":["Update a file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this operation to update a file."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enter these parameters:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Credential to connect with"]},": Create or select an existing ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#"},"children":["Google Drive credentials"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Operation"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Update"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File to Update"]},": Choose a file you want to update.",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From list"]}," to choose the title from the dropdown list, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By URL"]}," to enter the URL of the file, or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By ID"]}," to enter the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fileId"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You can find the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fileId"]}," in a shareable Google Drive file URL: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://docs.google.com/document/d/fileId/edit#gid=0"]},". In your Google Drive, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Share > Copy link"]}," to get the shareable file URL."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Change File Content"]},": Choose whether to send new binary data to replace the existing file content. If enabled, fill in the following:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Input Data Field Name"]},": The name of the input field that contains the binary file data you wish to use."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New Updated File Name"]},": A new name for the file if you want to update the filename."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"options-5","__idx":13},"children":["Options"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["APP Properties"]},": A bundle of arbitrary key-value pairs which are private to the requesting app."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Properties"]},": A bundle of arbitrary key-value pairs which are visible to all apps."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Keep Revision Forever"]},": Choose whether to set the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["keepForever"]}," field 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."]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OCR Language"]},": An ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://en.wikipedia.org/wiki/ISO_639-1"},"children":["ISO 639-1"]}," language code to help the OCR interpret the content during import."]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use Content As Indexable Text"]},": Choose whether to mark the uploaded content as indexable text."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Move to Trash"]},": Whether to move the file to the trash. Only possible for the file owner."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Return Fields"]},": Return metadata fields about the file. Can be one or more of the following: ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[All]"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["explicitlyTrashed"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["exportLinks"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["hasThumbnail"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["iconLink"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ID"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Kind"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["mimeType"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Name"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Permissions"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Shared"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Spaces"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Starred"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["thumbnailLink"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Trashed"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Version"]},", or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["webViewLink"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Refer to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/drive/api/reference/rest/v2/files/update"},"children":["Method: files.update | Google Drive"]}," API documentation for more information."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"upload-a-file","__idx":14},"children":["Upload a file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this operation to upload a file."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enter these parameters:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Credential to connect with"]},": Create or select an existing ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#"},"children":["Google Drive credentials"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Operation"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Upload"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Input Data Field Name"]},": The name of the input field that contains the binary file data you wish to use."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File Name"]},": The name to use for the new file."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parent Drive"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From list"]}," to choose the drive from the dropdown list, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By URL"]}," to enter the URL of the drive, or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By ID"]}," to enter the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["driveId"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parent Folder"]},": Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From list"]}," to choose the folder from the dropdown list, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By URL"]}," to enter the URL of the folder, or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By ID"]}," to enter the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["folderId"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can find the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["driveId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["folderID"]}," by visiting the shared drive or folder in your browser and copying the last URL component: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://drive.google.com/drive/u/1/folders/driveId"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"options-6","__idx":15},"children":["Options"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["APP Properties"]},": A bundle of arbitrary key-value pairs which are private to the requesting app."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Properties"]},": A bundle of arbitrary key-value pairs which are visible to all apps."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Keep Revision Forever"]},": Choose whether to set the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["keepForever"]}," field 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."]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OCR Language"]},": An ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://en.wikipedia.org/wiki/ISO_639-1"},"children":["ISO 639-1"]}," language code to help the OCR interpret the content during import."]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use Content As Indexable Text"]},": Choose whether to mark the uploaded content as indexable text."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Simplify Output"]},": Choose whether to return a simplified version of the response instead of including all fields."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Refer to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/drive/api/reference/rest/v2/files/insert"},"children":["Method: files.insert | Google Drive"]}," API documentation for more information."]}]},"headings":[{"value":"Google Drive File operations","id":"google-drive-file-operations","depth":1},{"value":"Copy a file","id":"copy-a-file","depth":2},{"value":"Options","id":"options","depth":3},{"value":"Create from text","id":"create-from-text","depth":2},{"value":"Options","id":"options-1","depth":3},{"value":"Delete a file","id":"delete-a-file","depth":2},{"value":"Options","id":"options-2","depth":3},{"value":"Download a file","id":"download-a-file","depth":2},{"value":"Options","id":"options-3","depth":3},{"value":"Move a file","id":"move-a-file","depth":2},{"value":"Share a file","id":"share-a-file","depth":2},{"value":"Options","id":"options-4","depth":3},{"value":"Update a file","id":"update-a-file","depth":2},{"value":"Options","id":"options-5","depth":3},{"value":"Upload a file","id":"upload-a-file","depth":2},{"value":"Options","id":"options-6","depth":3}],"frontmatter":{"priority":"high","seo":{"title":"Google Drive File operations"}},"lastModified":"2025-11-23T13:19:36.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/automated-workflows/integrations/builtin/app-nodes/ts-wf-nodes-base.googledrive/file-operations","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}