Skip to content

Commit e7466f7

Browse files
Create Readme.md
Monthly scheduled job to send email report based on incident category count
1 parent 7c55c08 commit e7466f7

File tree

1 file changed

+34
-0
lines changed
  • Server-Side Components/Scheduled Jobs/Scheduled Job to Email Incident Count Report by Category

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Scheduled Job: Sends an email with monthly report based on incident category count
2+
3+
Uses a custom event (custom.monthly.incident.report) with two parameters:
4+
parm1 → The formatted incident count report body
5+
parm2 → The month name
6+
7+
Working:
8+
Runs automatically on the 1st of each month.
9+
Fetches all incidents created in the previous month.
10+
Groups them by category and counts totals.
11+
Sends a summarized email report to the admin.
12+
13+
Event Registration
14+
Name: custom.monthly.incident.report
15+
Queue: default
16+
17+
Notification Configuration
18+
Name: Monthly Incident Report by Category
19+
When to send: Event is fired
20+
Event name: custom.monthly.incident.report
21+
Recipients: admin@example.com (or “Admin” group)
22+
23+
Subject
24+
Monthly Incident Count Report - ${event.parm2}
25+
26+
Body
27+
28+
Hello Admin,
29+
30+
Here is the count of incidents created during ${event.parm2}, categorized by type:
31+
${event.parm1}
32+
33+
Regards,
34+
ServiceNow Automated Reports

0 commit comments

Comments
 (0)