Skip to content

Drive File Manager

Drive File Manager connects your flow to your Google Drive to work with files: upload new files, look up the files in a folder or search for them by name, read their content, copy them, move them, rename them, share them and delete them.

It is useful when documents are part of a process: reports the flow generates and stores in Drive, contracts an AI agent has to read, or files you need to share with a customer.

When to use it

  • A flow generates a PDF report and you want to store it in a specific Drive folder.
  • You want an AI agent to read the text of the documents in a folder to answer questions about them.
  • When you close a sale, you want to share a document from the customer’s project with them.
  • You need to move documents that have already been processed to an archive folder.
  • An agent handles document requests and has to be able to find them and send the link.

Configuration

You need a Google Drive credential, which connects by signing in with your Google account. To upload, change, share or delete files, the credential needs the Create, Update, Delete, Read access; with Read Only you can only look things up. See Credentials.

FieldWhat it does
Credential (required)The Google Drive credential of the account you work with.
OperationWhat the component does. See Operations. Default: Upload.
Mode of InputHow you point to the file or folder. By Selection shows a picker to choose it from your Drive; By Id asks for its ID; By Url asks for its link. In Get there are also All Files in Drive (every file in your Drive) and By Filename (search by name). Default: By Selection.
Selection ModeOnly in Get. Folder returns all the files in a folder; File returns one specific file. Default: Folder.
Select file / File Id / File UrlThe file you work with, depending on Mode of Input. Required in every operation except Upload.
Select folder / Folder Id / Folder UrlThe folder, depending on Mode of Input. In Upload it is the folder where the file is stored (if you leave it empty, the root of your Drive); in Move and Update, the folder the file is taken to; in Get with Selection Mode on Folder, the folder whose files you want.
FilenameIn Upload, the name the file will have; if you leave it empty, the file’s own name is used. In Get with By Filename, the text searched for in file names.
File ContentOnly in Upload. The files to upload. Connect a component that provides files here, or a link to a file. If you connect several, they are all uploaded.
New NameOnly in Update. The new name of the file.

Operations

OperationWhat it does
UploadUploads one or more files to a folder in your Drive.
GetReturns the details of a file, of the files in a folder, of the files whose name contains a text, or of your whole Drive. It can include their content.
CopyCreates a copy of a file, with the same name as the original.
UpdateRenames a file and, if you choose a folder, takes it there.
MoveTakes a file to another folder.
ShareGives a person, a group or anyone with the link access to the file.
DeleteDeletes a file permanently, without going through the trash.

Advanced options

FieldWhat it does
File Type RetrieveOnly in Get. Filters by file type: Any, Document, Spreadsheet, Forms, Presentation, Pdf, Image, Video or Audio. It is used when you search for files without choosing a specific one. Default: Any.
Download Base64 ContentOnly in Get. Includes the file content, ready to pass to another component that works with files. Default: off.
Process File ContentOnly in Get. Includes the file’s text, for example from a PDF, a document or a spreadsheet. Default: off.
Process Images with OCROnly in Get, when Process File Content is on. Also reads the text shown in images. Default: off.
EmailOnly in Share. The email of the person or group you share with. Required unless Type is anyone.
RoleOnly in Share. The permission given: reader (view), commenter (view and comment) or writer (edit). Default: reader.
TypeOnly in Share. Who gets access: user (one person), group (a Google group) or anyone (anyone with the link). Default: user.
Send NotificationOnly in Share. Sends a notification email to the person you share with. Default: off.

The content options (Download Base64 Content, Process File Content and Process Images with OCR) do not appear with All Files in Drive.

Output

The Data output returns one item per file you worked with, with its ID (id), name, type, the folder it is in and the link to open it (url). In Get it also includes the content or the text if you asked for them. In Share it adds the sharing link (share_url); with Type on anyone, it is a direct download link. Delete returns a confirmation.

You can connect the result to an AI agent so it reads the documents, to an email component to send the link, or to another component that stores the data. The component can also be connected to an Agent as a tool, so the agent decides when to search for, upload or share files. See Tool Mode.

Example

A consultancy stores each customer’s monthly report in Drive and shares it with them.

  1. The flow generates the report as a PDF.
  2. Add Drive File Manager with the Upload operation, connect the report to File Content, choose the Reports folder in Select folder and write March report followed by the customer’s name in Filename.
  3. Add another Drive File Manager with the Share operation, Mode of Input on By Id and the id returned by the previous step in File Id.
  4. In the advanced options, put the customer’s email in Email, leave Role on reader and turn on Send Notification so they get Google’s notice.

Good practices

  • Delete cannot be undone. If you want to be able to recover the file, move it to an archive folder with Move.
  • Sharing with anyone makes the file reachable by anyone who has the link. Use it only for public documents.
  • When you search with By Filename, every file whose name contains the text is returned. Use a specific enough text or combine it with File Type Retrieve.