Email body not populating on the incident description

PrasadK43791691
Tera Contributor

Hello Team,

I have implemented a inbound email action to create an incident. However all the fields are populating as expected according to the mapping in action script. I have mapped email body to description of the target record but it is not populating. I have used the script as below:

 

current.description = email.body;

 

Could you please suggest if we have any other approach to map correctly?


Thank you!

1 ACCEPTED SOLUTION

yashkamde
Giga Sage

Hello @PrasadK43791691 ,

 

This method should help to populate the description..


Although verify which email field actually contains the content:

gs.info('Email Body: ' + email.body);
gs.info('Email Body Text: ' + email.body_text);
gs.info('Email Body HTML: ' + email.body_html);

current.description = email.body;

 

Once you identify the populated field, map that value to current.description.

 

If my response helped mark as helpful and accept the solution.

View solution in original post

9 REPLIES 9

Hi  @Ankur Bawiskar ,

 

As   @yashkamde suggested, I have tried adding the logs to find out what type of body is populating. In my instance body is populating as body_html 

current.description = email.body_html;

I have used above line in my script and it worked.

@PrasadK43791691  Glad to know your issue is resolved !

Aditya_hublikar
Giga Sage

Hello @PrasadK43791691 ,

 

First simply log email body (email.body_text) , check body context .

Ankur Bawiskar
Tera Patron

@PrasadK43791691 

it should work fine

Did you try adding email body in work notes etc?

current.comments = email.body_html;

💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Tanushree Maiti
Tera Patron

Hi @PrasadK43791691 

 

code should be 

current.description = email.body_text;

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti