Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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
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....

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

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/atul_grover_lng [ 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