- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 08:12 AM
Hi All,
I have a requirement to trigger notification to task assignee whenever a particular tag is added to any record in the task table. Is it possible?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 08:56 AM
Hi,
Yes, it is possible. Task - tag assignments are saved in label_entry table and you could write an "after insert BR" on that table to send a notification.
But please evaluate the performance implications before implementing this. Think of scenarios like "What if someone adds a tag to multiple tasks from list view in one go ?"
Thanks,
Arav

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 08:56 AM
Hi,
Yes, it is possible. Task - tag assignments are saved in label_entry table and you could write an "after insert BR" on that table to send a notification.
But please evaluate the performance implications before implementing this. Think of scenarios like "What if someone adds a tag to multiple tasks from list view in one go ?"
Thanks,
Arav

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 10:17 AM
Yes, it's possible to trigger a notification to the task assignee whenever a particular tag is added to any record in the task table. Here's one way you can accomplish this:
Create a Business Rule on the task table that runs when a tag is added.
In the Business Rule's Condition, specify the tag that should trigger the notification.
In the Business Rule's Action, you can use the gs.eventQueue() function to send a notification to the task assignee. The gs.eventQueue() function allows you to send an event message to a specific user, group, or role.
Here's an example of how you can use the gs.eventQueue() function in a Business Rule script:
// Get the task assignee
var taskAssignee = current.assigned_to;
// Send a notification to the task assignee
gs.eventQueue('notification.tag.added', current, taskAssignee, taskAssignee);
Create a notification script that will listen for the notification.tag.added event and send the notification to the task assignee.
In the notification script, you can use the gs.sendEmail() function to send an email to the task assignee, or use the gs.event() function to send a notification to the task assignee's device.
Kindly mark the response as Correct or Helpful.
Cheers,
Anish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2023 06:49 PM
Hi Anish,
Thank you for your response.
The BR doesn't seem to run when adding a condition to run when a specific tag is added. Should I be doing it differently?