How to include a custom email script in a scheduled report email?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2025 07:09 PM
Hello Team,
I have a use case where I need to send a scheduled email report in ServiceNow that includes a custom breakdown of ticket counts by state and assignment group.
Specifically:
The report should include only tickets where state is New, In Progress, or Awaiting Info
It should exclude any tickets where assignment_group is empty
I want to show a count of tickets grouped by state, per assignment_group,
I want to include details something like this in body of email:
For example:
1. Assignment Group: Software Support
- New: 3
- In Progress: 5
- Awaiting Info: 2
2. Assignment Group: Cloud Team
- New: 5
- In Progress: 1
- Awaiting Info: 3 and so on for other Groups.....
I have created a report but I am working on email script that does this (using GlideRecord and loops), but I’m not sure how to write email script.
Any guidance or best practices would be greatly appreciated!
Thanks in advance!