List File Labels
Definition
The "List File Labels" action in the Google Workspace category enables you to retrieve all labels assigned to a specific file in Google Drive for a given user. Labels are metadata tags that can help categorize, organize, and manage files with additional information such as status, department, review date, or any custom field.
This action is particularly useful for organizations leveraging Google Drive labels for compliance, document lifecycle tracking, or workflow automation. It returns detailed information including the label ID, its revision ID, and all label fields — with structured data about each field’s type and values. It is ideal for audits, process automation, and integrating label-based decisions in your flow.
Example Use Cases
1. Compliance Monitoring
Use this action to ensure sensitive documents have the correct compliance labels (e.g., "Confidential", "Financial", etc.) assigned for auditing or regulatory reporting.
2. Workflow Triggering Based on Labels
Retrieve labels to determine the next step in a workflow — for example, if a file is labeled "Ready for Review", automatically send it to a reviewer.
3. Content Organization Audits
Audit how well documents are labeled across departments or projects to maintain consistency and improve searchability within Drive.
4. Automating Label-Based Notifications
Check for specific labels on files and trigger automated alerts or emails — for instance, notify a manager when a file is labeled "Pending Approval".
5. Label Usage Reporting
Use the action to collect label data across files for analytics or dashboard reporting on how labels are being utilized throughout your organization.
Input:
Connection
This is your Google Workspace connection that authorizes the action to access Google Drive data securely on your behalf. It ensures the action can retrieve file labels using the permissions granted.
User Email
Enter the primary email address of the Google Workspace user whose file labels you want to list. This specifies the user context for accessing the file and ensures you retrieve labels assigned to files they own or have access to.
File Id
Provide the unique identifier of the file for which you want to list labels. The File ID is a specific string found in the file's URL in Google Drive, helping the system locate exactly which file’s labels to retrieve.
Outputs:
Labels
This is a collection of all labels currently assigned to the specified file. Each label includes detailed information about its properties and values.
-
IdThe unique identifier for the label itself. This helps distinguish one label from another when managing or referencing them.
-
Revision IdThe version or revision number of the label. This indicates the most recent update or change to the label’s definition, helping track its history.
-
FieldsContains the specific fields or attributes within the label. Each field represents a distinct piece of data or metadata assigned under the label.
-
Field IdThe unique identifier of each label field, used to identify and reference the exact field within the label.
-
Value TypeDescribes the kind of data stored in the field. Possible types include:
dateString
(a date value),integer
(a whole number),selection
(a predefined choice),text
(freeform text),user
(a user reference).
-
ValuesThe actual values assigned to the field. This can be a list or array, depending on how many values are attached.
-
First ValueIf multiple values exist, this returns the first one from the list, providing quick access to primary data.
-
This output structure allows you to fully understand what labels are applied to a file, what kind of metadata each label carries, and the current values set for those metadata fields. This is particularly useful for tracking, organizing, or automating workflows based on file metadata.
Example Situation:
Imagine you work in a marketing team where files in Google Drive are tagged with labels like “Campaign Status”, “Approval Date”, and “Responsible User” to organize projects efficiently. You want to create an automated workflow that reviews these labels on specific files to check the status of ongoing campaigns and send reminders if approvals are pending.
Using the “List File Labels” action, you can:
- Connect to the user’s Google Workspace account who owns or manages the files (using their primary email).
- Provide the File ID of the document you want to inspect. This ID uniquely identifies the file in Google Drive.
- Run the action to retrieve all labels assigned to that file along with their detailed fields and values, such as the current status of the campaign or the approval date.
Based on this information, your automated process can:
- Identify which campaigns are still pending approval.
- Notify the responsible user(s) based on the “Responsible User” label.
- Track and report label changes for auditing purposes.
This action enables you to seamlessly integrate metadata-driven automation into your workflow, improving team efficiency and project visibility without manual file checks.
Updated about 8 hours ago