We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to create inbound email action for updating record

Suyash Joshi
Tera Contributor

Hello Everyone,

I need a small requirement in Inbound Email Action script in which I want to update any field record in 'Incident' table.

Thanks and Regards,

Suyash

2 ACCEPTED SOLUTIONS

pooja_m
Mega Guru

Hi Suyash,

 

Navigate to Email --> Inbound Actions --> It will open the "Inbound Email Actions " table and create new action or update the existing action if already exists.

 

Below is the code:

 

if (current.getTableName() == "incident") {
    current.comments = "reply from: " + email.origemail + "\n\n" + email.body_text;
current.state = 1;
        current.update();
}
 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

View solution in original post

Dr Atul G- LNG
Tera Patron

Hi @Suyash Joshi 

 

Check this OOTB:

AtulyaLNG_0-1700130160240.png

 

https://INSTANCENAME.service-now.com/now/nav/ui/classic/params/target/sysevent_in_email_action_list....

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

6 REPLIES 6

Luxo Nadappan
Tera Guru

Hi , 

 

You can try the same using flow designer "Inbound Email " ,which will does not need any scripting.

You can map the fields using data pills easily.

 

Regards,

Luxo

Hi,

Actually I have to use only Inbound Action for the work!

Thank You for your help

Regards,

Suyash