Find File/Folder
📖 Definition
The Find File/Folder action 🔍 in the Google Workspace category retrieves detailed information about a specific file or folder stored in Google Drive. By providing the file or folder ID, you can access metadata such as its name, description, size, ownership details, permissions, and more. This action is highly useful for validating files, managing access rights, automating file management tasks, and tracking document properties within workflows. 🚀
🎯 Example Use Cases
1. Validate File Existence
Quickly check if a specific file or folder exists in Google Drive before proceeding with other workflow steps.
2. Retrieve File Details for Reports
Automatically pull file metadata (like size, owner, or created time) to generate audit or compliance reports.
3. Monitor Shared Files
Track whether a file or folder has been shared publicly or within a domain to ensure security compliance.
4. Permission Verification
Fetch and review the list of users or groups who have access to a file to maintain proper access control.
5. Update File Management Systems
Sync Google Drive file properties with internal databases or document management systems for better record-keeping.
📥 Inputs
Connection
A Google Workspace Administration connection is required to interact securely with Google Drive. You must upload a credential JSON file for a service account with domain-wide delegation. 👉 Guide to create it
User Email
Enter the primary email address of the Google Workspace user whose drive you want to access. This ensures the correct user's drive is being queried.
File or Folder ID
Provide the unique identifier of the file or folder you want to retrieve information about. Every file or folder in Google Drive has a specific ID that can be found in the URL or through search results.
📤 Outputs
Id
The unique identifier of the retrieved file or folder.
Drive Id
The ID of the shared drive where the file resides. Only shown if the file is stored in a shared drive.
Description
A short description that provides additional details about the file or folder.
Name
The name (title) of the file or folder as it appears in Google Drive.
Mime Type
The MIME type describes the type of file (e.g., application/pdf
, application/vnd.google-apps.folder
).
Version
The version number of the file, which updates with each modification.
View Link
A direct link to open the file or folder in the appropriate Google editor or viewer in a web browser.
Original Filename
The original filename at the time of upload, useful for identifying the file if the current name was changed.
File Extension
The file's extension (like .docx
, .pdf
, or .tar.gz
), derived from the name.
Download Link
A direct link to download the file’s content through a browser.
Size
The size of the file's content measured in bytes.
Trashed
Indicates whether the file or folder has been moved to the trash (true or false).
Modified Time
The last time the file or folder was modified by any user.
Created Time
The original time and date when the file or folder was first created.
Owners
The people who own the file, including:
- Display Name: The visible name of the owner.
- Email Address: The owner’s email address.
Permissions
Details about who can access the file and what actions they can take:
- Id: ID of the permission.
- Display Name: Name associated with the permission.
- Type: Type of permission target (user, group, domain, anyone).
- Email Address: Email of the user or group linked to the permission.
- Role: Level of access granted (owner, editor, viewer, etc.).
- Domain: Domain associated with the permission (e.g., company.com).
- Deleted: Indicates if the user or group tied to the permission has been deleted.
- Pending Owner: Indicates if ownership transfer is pending.
- Allow File Discovery: Shows if the file can be discovered in searches (for domain or public permissions).
Parents
IDs of the parent folders containing this file or folder.
Shared
Indicates whether the file has been shared with other users (true or false). Not available for items inside shared drives.
💡 Example
Imagine you are building an automated workflow to manage company documents. After an employee uploads a file to a shared Google Drive folder, you want to automatically retrieve and log detailed information about that file — like its owner, size, and download link — into a spreadsheet for tracking purposes.
Here’s how you would set it up:
- First, use the File or Folder ID (captured when the file is uploaded) and feed it into the Find File/Folder action.
- Configure the Connection and provide the User Email and the file's unique ID.
- Once the flow runs, it will return detailed information about the file (like name, size, view link, owners, permissions, etc.).
- You can then use these outputs in the next steps of your flow, such as updating a Google Sheet or sending an email notification to the HR team.
✅ Result: You automate the file tracking process, reduce manual errors, and maintain a clear and up-to-date record of uploaded documents!
Updated 3 days ago