Manage Labels Listener
Use the Manage Labels listener to automate label management.
You can manage labels on new pages and spaces, as well as update labels on existing pages and spaces.
Set up
Follow these steps to set up a Manage Labels listener:
Examples
Using this listener, you can:
- Add labels based on a parent page
- Add a
benefitslabel to all pages created or updated under the main Benefits page in an HR space
- Add a
- Add labels based on user permissions
- Add the
contractor_accesslabel to all pages created or updated that are viewable by users in the Contractors/Vendors user group
- Add the
- Add labels based on group membership
- Add a
client_betalabel to all pages that are created by users in the Client Beta Access user group
- Add a
- Apply labels based on multiple criteria:
- Add the
audit_reviewlabel to all pages in a Security space created by users in the Contractors/Venders group before six months ago - Add the
inactive_content_reviewlabel to pages in the spaces that have a KnowledgeBase category and have been viewed but not updated in more than eight months - Remove any labels in the HR space on pages created by users that are not in the Approved HR Content Reviewers user group
- Add the
- Rename labels based on user-defined substitutions
- Rename labels to a preferred spelling when words can be spelled multiple ways in global organizations (for example, "
programme" and "program" or "canceled" and "cancelled") - Rename labels based on common misspellings (for example, "
prodcut" to "product")
- Rename labels to a preferred spelling when words can be spelled multiple ways in global organizations (for example, "
Rename label to avoid common misspellings
This example shows you how to rename a label, using the common misspelling of "prodcut" for "product."
Now, all of your misspelled labels with prodcut are updated to product when LabelAddEvent fires.
Add label after a page is moved to a different space
To add a label when a page moves spaces, follow these steps:
Now, when a page is moved from one space to any other space, it will have the moved-page label.
Remove label from new or updated pages
To set up a listener to remove a label from new or updated pages not in a specific space (the HR space in this example), follow these steps:
Now, when a page is updated or created in the HR space, the confidential label will be added.
Remove labels if the user is not an admin
If a user who is not an administrator adds labels to pages, you can remove those labels by following these steps:
Now, if the labels confidential, hr, and top-secret are added by a user who is not the administrator, the labels will be removed.