The CreatorCon Call for Content is officially open! Get started here.

How to assign a user to assign_to field through email

manisha3014
Kilo Contributor

Hi All, i need to assignee a user to Assigned_to field Through email. Can anyone Please help me in this.

6 REPLIES 6

Hi Abhishek Thank you so much for clear explanation But i have a issue that will work only with body contains(:) right.?? Here we are using email tags not (:) email tag will be like this ~@ABC xyz@gmail.com after that tag what is the email id is appearing that name should be assigned filed. Can you please help me in that.  


Hi Manisha ,



You can use this script in your inbound action.



email.origemail : Contains the email sender's address as listed in the email Headers.



From email addres it will take xyz as a username and that username must be there in servicenow then only it will assigned to that xyz person.



var setAssign = email.origemail;


var getAssign = setAssign.substring(0, setAssign.lastIndexOf("@"));


gs.log("^^^^^^"+ getAssign);


current.assigned_to = getAssign;



Please give it a try and let me know.I have tested in my environment it is working fine.



Thanks,


Abhishek