How to Trigger a flow for outbound emails?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
I want to clear the "Needs attention" flag to false when an agent replies to a case using the Compose email UI action in workspace. How can I trigger a flow that runs on this outbound email? I don't want to set the trigger as sys_email, as it is not best practice. Any suggestions would be helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
Hi @rubesh_u,
I wouldn't recommend triggering a Flow on the sys_email table just to detect outbound emails. Since the email is being sent from the Compose Email UI action on the Case record, it's generally better to tie your logic to the Case itself rather than the email record.
One option is to customize or extend the process that executes when the Compose Email action is used. For example, if there's a business rule, script action, or flow that's already updating the case after an agent reply, you can set the Needs attention field to false there.
If you want to keep it in Flow Designer, consider triggering the flow from an update to the Case (for example, when a work note, journal entry, or reply-related field changes) instead of monitoring **sys_email**.
Using **sys_email** as the trigger will work technically, but it's generally treated as a system table and isn't the preferred place to drive business logic unless there's no better event to hook into.
Let me know if this helps!!!😉
If you find my answer useful, please mark it as helpful and correct. 😊
Regards,
Soham Tipnis
ServiceNow Developer || Technical Consultant
LinkedIn: www.linkedin.com/in/sohamtipnis10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
Hi @SohamTipnis
The Compose email UI action open a draft email record with email template populated and it is not aware of the case. Is there any other way around. And also when the email is sent the case is not being updated in worknotes are anywhere. I think only inbound emails are recorded in activiry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
that's the only place using which system would know email is sent
inform your customer about this
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader