<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Email notification with incident numbers in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/email-notification-with-incident-numbers/m-p/3439685#M1238784</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I would suggest you create a business rule upon submit of incident, that counts if the user has submitted 25 records within a day, and if so, fires an event that triggers the email notification.&lt;/P&gt;
&lt;P&gt;In the email notification you can add all the relevant data.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Nov 2025 09:16:34 GMT</pubDate>
    <dc:creator>OlaN</dc:creator>
    <dc:date>2025-11-28T09:16:34Z</dc:date>
    <item>
      <title>Email notification with incident numbers</title>
      <link>https://www.servicenow.com/community/developer-forum/email-notification-with-incident-numbers/m-p/3439673#M1238778</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here for the caller x , if created 25 incidents per day then we need those incident numbers in body of the email notification ? how it is possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tulasi&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 08:48:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/email-notification-with-incident-numbers/m-p/3439673#M1238778</guid>
      <dc:creator>tulasi8</dc:creator>
      <dc:date>2025-11-28T08:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Email notification with incident numbers</title>
      <link>https://www.servicenow.com/community/developer-forum/email-notification-with-incident-numbers/m-p/3439682#M1238782</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/471712"&gt;@tulasi8&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Create an Email Notification, configure all the required details (table should be Incident obviously).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Put appropriate criteria like when to trigger , whom to send etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;After that the most important part is to create Email Notification Script. Create the email notification script as shown below:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
          /* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
          /* Optional GlideRecord */ event) {

          var incGr = new GlideRecord('incident');
		  			incGr.addEncodeduery('priority=1^state=2');
					incGr.query();
					var incList = [];
					while(incGr.next()){
						var obj = {};
						obj.number = incGr.getValue('number');
						obj.person = incGr.caller_id.getDisplayValue();
						obj.shortDesc = incGr.getValue('short_description');
						obj.state = incGr.state.getDisplayValue();
						incList.push(obj);
					}

					var htmlData = "&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;NUMBER&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;CALLER PERSON&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;STATE&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;SHORT DESC&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;";
					template.print(htmlData);
					incList.forEach(function(eachData){
						var currentRow = "&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;"+eachData.number+"&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;"+eachData.person+"&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;"+eachData.state+"&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;"+eachData.shortDesc+"&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;";
						template.print(currentRow);
					});

					template.print("&amp;lt;/table&amp;gt;");


})(current, template, email, email_action, event);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After that call the email script in your email notification as shown below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="maheshkhatal_0-1764321126362.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/487811i4A2E1277A480EE5E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="maheshkhatal_0-1764321126362.png" alt="maheshkhatal_0-1764321126362.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now click on preview button to see the result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="maheshkhatal_1-1764321162192.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/487812i856D0E81C94EC5DF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="maheshkhatal_1-1764321162192.png" alt="maheshkhatal_1-1764321162192.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see the table list of all the incidents. You can do styling and filter condition to get those 25 incidents in your email script criteria.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All of this really takes time to put to help you understand kindly mark this solution as helpful.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Mahesh.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 09:14:39 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/email-notification-with-incident-numbers/m-p/3439682#M1238782</guid>
      <dc:creator>maheshkhatal</dc:creator>
      <dc:date>2025-11-28T09:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Email notification with incident numbers</title>
      <link>https://www.servicenow.com/community/developer-forum/email-notification-with-incident-numbers/m-p/3439685#M1238784</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I would suggest you create a business rule upon submit of incident, that counts if the user has submitted 25 records within a day, and if so, fires an event that triggers the email notification.&lt;/P&gt;
&lt;P&gt;In the email notification you can add all the relevant data.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 09:16:34 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/email-notification-with-incident-numbers/m-p/3439685#M1238784</guid>
      <dc:creator>OlaN</dc:creator>
      <dc:date>2025-11-28T09:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Email notification with incident numbers</title>
      <link>https://www.servicenow.com/community/developer-forum/email-notification-with-incident-numbers/m-p/3439686#M1238785</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/471712"&gt;@tulasi8&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="1" data-path-to-node="9"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="9,0,0"&gt;Why does the recipient need all 25 numbers? What action are they expected to take?&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="9,1,0"&gt;What is the trigger for this email? Is it a daily summary, or the creation of the 25th incident?&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Instead of creating a complex email script, the standard best practice is to set up a Scheduled Report or a Saved Filter that automatically gathers all 25 incidents and simply sends the recipient a link to that list in ServiceNow. This is scalable and directs the user to live, actionable data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If my response has helped you, hit the helpful button, and if your concern is solved, do mark my response as correct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards&lt;BR /&gt;Viraj Hudlikar.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 09:19:19 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/email-notification-with-incident-numbers/m-p/3439686#M1238785</guid>
      <dc:creator>Viraj Hudlikar</dc:creator>
      <dc:date>2025-11-28T09:19:19Z</dc:date>
    </item>
  </channel>
</rss>

