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.
| Field | What it does |
|---|---|
| Credential (required) | The Google Drive credential of the account you work with. |
| Operation | What the component does. See Operations. Default: Upload. |
| Mode of Input | How 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 Mode | Only in Get. Folder returns all the files in a folder; File returns one specific file. Default: Folder. |
| Select file / File Id / File Url | The file you work with, depending on Mode of Input. Required in every operation except Upload. |
| Select folder / Folder Id / Folder Url | The 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. |
| Filename | In 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 Content | Only 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 Name | Only in Update. The new name of the file. |
Operations
| Operation | What it does |
|---|---|
Upload | Uploads one or more files to a folder in your Drive. |
Get | Returns 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. |
Copy | Creates a copy of a file, with the same name as the original. |
Update | Renames a file and, if you choose a folder, takes it there. |
Move | Takes a file to another folder. |
Share | Gives a person, a group or anyone with the link access to the file. |
Delete | Deletes a file permanently, without going through the trash. |
Advanced options
| Field | What it does |
|---|---|
| File Type Retrieve | Only 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 Content | Only in Get. Includes the file content, ready to pass to another component that works with files. Default: off. |
| Process File Content | Only in Get. Includes the file’s text, for example from a PDF, a document or a spreadsheet. Default: off. |
| Process Images with OCR | Only in Get, when Process File Content is on. Also reads the text shown in images. Default: off. |
Only in Share. The email of the person or group you share with. Required unless Type is anyone. | |
| Role | Only in Share. The permission given: reader (view), commenter (view and comment) or writer (edit). Default: reader. |
| Type | Only in Share. Who gets access: user (one person), group (a Google group) or anyone (anyone with the link). Default: user. |
| Send Notification | Only 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.
- The flow generates the report as a PDF.
- Add Drive File Manager with the
Uploadoperation, connect the report to File Content, choose theReportsfolder in Select folder and writeMarch reportfollowed by the customer’s name in Filename. - Add another Drive File Manager with the
Shareoperation, Mode of Input onBy Idand theidreturned by the previous step in File Id. - In the advanced options, put the customer’s email in Email, leave Role on
readerand turn on Send Notification so they get Google’s notice.
Good practices
Deletecannot be undone. If you want to be able to recover the file, move it to an archive folder withMove.- Sharing with
anyonemakes 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.
Related components
- Drive Folder Manager: create, look up, share and delete folders.
- Google Drive Webhook: start a flow when a file changes.
- Drive Search: search for files in Drive.