Delete Label from File
📘 Definition
The "🗑️ Delete Label from File" action in the Google Workspace category allows you to remove one or more labels from a specific file stored in Google Drive. This is particularly useful for managing metadata, access control, and classification of files across your organization.
With this action, administrators can efficiently update file organization by removing outdated, incorrect, or unnecessary labels programmatically. It supports bulk label removal using multiple label IDs, helping to maintain a clean and consistent file system.
Key Capabilities:
🔄 Bulk removal of labels from a file using label IDs.
👤 Works at the user-level with domain-wide delegation.
⚙️ Ideal for automating label management within document workflows or compliance processes.
💡 Example Use Cases
📁 Clean Up Obsolete File Tags
Automatically remove outdated or deprecated labels from files across user drives to maintain consistency and avoid confusion in document categorization.
✅ Post-Approval Label Management
After a document is reviewed or approved, remove temporary workflow labels (like "Pending Review") to reflect its new status.
🔐 Remove Sensitive Classifications
Remove sensitivity or confidentiality labels from files once they are declassified or no longer restricted.
🔄 Label Restructuring Projects
During a relabeling or reorganization initiative, delete old labels before assigning new ones in bulk.
🧾 Compliance & Auditing Cleanup
Ensure compliance by removing incorrect or unauthorized labels that may have been added manually to sensitive files.
📝 Inputs
🔌 Connection
A Google Workspace Administration connection.
To authenticate, you must upload a credential JSON file for a service account with domain-wide delegation.
👉 Guide to create one
📧 User Email
The email address of the user who owns the file.
This tells the system on whose behalf the label deletion will occur.
📄 File ID
The unique ID of the Google Drive file from which labels should be removed.
✅ You can find this in the file’s URL (e.g., https://drive.google.com/file/d/<FILE_ID>/view
).
🏷️ Label IDs
A list of label IDs to delete from the file.
You can enter multiple IDs separated by commas.
🧪 Example: LabelId1, LabelId2
📌 Example
Scenario:
An IT admin needs to remove outdated or incorrectly assigned labels from a set of internal documents in a shared Google Drive folder. These labels were used for an old project and are no longer relevant.
How to Set It Up:
- The admin sets up a Google Workspace Administration connection using a service account with domain-wide delegation.
- In the Zenphi flow, they add the Delete Label from File action.
- They input the user's email (who owns the files), the File ID of the document, and the Label IDs to be removed (e.g.,
Project-Alpha-2023, Outdated
). - Once the flow is triggered, the specified labels are removed from the file automatically, ensuring up-to-date document organization.
✅ This helps streamline file management and keep Drive content clean and relevant.
Updated 4 days ago