I created a notification when any user got role flow_designer then a notification is sent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Whenever the Flow Designer role is assigned to a user, a notification should be sent.
To achieve this, I created:
An event on the sys_user_has_role table
An after Business Rule on the sys_user_has_role table to queue the event
A notification configured on the sys_user_has_role table
However, after the role is removed from the user, the notification email that was previously generated is no longer visible in the Email Logs (sys_email).
Could you help identify the reason for this behavior?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @AnjiBabu_Ve
Share your Flow.
It is draft architecture. Just check if you have done this way:
- Define the Trigger
- Open Flow Designer and create a new Flow.
- Click Add a trigger and select Record - Created or Updated.
- Set the Table to sys_user_has_role (User Role).
- Add a filter condition: [Role] [is] [flow_designer].
- Create the Notification
- Navigate to System Notification > Email > Notifications.
- Click New.
- Set the Table to sys_user_has_role.
- Set Send when to Triggered
- Define the recipients, subject, and body
- Add the Notification Action
- In your flow, click Add an Action.
- Select ServiceNow Core -> Send Notification.
- Configure the fields using the data picker:
- Notification: Select the notification record you created.
- Target Record: Drag the User Role Record pill from the data panel into this field.
- Recipient: Select the user related to the assigned role.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Tanushree Maiti
I was planning to proceed with the proposed solution from my end, but I wanted to understand the reason behind this behavior. If you have any insights or ideas, could you please let me know?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Do you have any BR to remove Role?
Any parent child relationship between sys_user_has_role and sys_email?
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @AnjiBabu_Ve ,
Check the status of user record in the cmn_notif_device table. If it is inactive then sent email will remove automatically.
Please check the below knowledge article link provided by ServiceNow.
Please mark my answer as helpful or correct if helps to resolve your issue.
Thanks and Regards,
Namrata