Skip to content

Instantly share code, notes, and snippets.

@asimpkin
Created February 16, 2024 00:22
Show Gist options
  • Save asimpkin/51f8b6eaa1c7ceaa653a75233700cb5f to your computer and use it in GitHub Desktop.
Save asimpkin/51f8b6eaa1c7ceaa653a75233700cb5f to your computer and use it in GitHub Desktop.
ServiceNow - Inbound Email Action - Create Story
<?xml version="1.0" encoding="UTF-8"?>
<unload unload_date="2024-02-16 00:10:43">
<sysevent_in_email_action action="INSERT_OR_UPDATE">
<action>record_action</action>
<active>true</active>
<assignment_operator/>
<condition_script/>
<description/>
<event_name>email.read</event_name>
<filter_condition table="sys_email">subjectSTARTSWITHNEWSTRY|^EQ<item goto="false" or="false" field="subject" endquery="false" value="NEWSTRY|" operator="STARTSWITH" newquery="false"/>
<item goto="false" or="false" field="" endquery="true" value="" operator="=" newquery="false"/>
</filter_condition>
<from display_value=""/>
<name>Create Story</name>
<order>100</order>
<reply_email/>
<required_roles/>
<script><![CDATA[// Note: current.opened_by is already set to the first UserID that matches the From: email address
current.html_description = "received from: " + email.origemail + "\n\n" + email.body_text;
current.short_description = email.subject.substr(8);
if (current.canCreate()) current.insert();]]></script>
<stop_processing>true</stop_processing>
<sys_class_name>sysevent_in_email_action</sys_class_name>
<sys_created_by>aj@grayscale.ca</sys_created_by>
<sys_created_on>2024-02-15 00:00:00</sys_created_on>
<sys_domain>global</sys_domain>
<sys_domain_path>/</sys_domain_path>
<sys_id>ede0d80f1b944e10e89734cf034bcbee</sys_id>
<sys_mod_count>4</sys_mod_count>
<sys_name>Create Story</sys_name>
<sys_overrides display_value=""/>
<sys_package display_value="Global" source="global">global</sys_package>
<sys_policy/>
<sys_scope display_value="Global">global</sys_scope>
<sys_update_name>sysevent_in_email_action_ede0d80f1b944e10e89734cf034bcbee</sys_update_name>
<table>rm_story</table>
<template/>
<type/>
</sysevent_in_email_action>
</unload>
@asimpkin
Copy link
Author

asimpkin commented Mar 1, 2024

Import this .XML file to your ServiceNow instance to allow the creation of an Agile STRY record when you send an email with the subject line: NEWSRTY|your short description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment