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 get "Email body" to the "comments"

F_bio Santos
Kilo Sage

Hi everyone Im trying to use an "Inbound Email Action" to get what the user writes on the "Email body" to the "comments" I have been trying to use the "email.body_text" but for some reason it just does not work, it is actually breaking the code ... can anyone help with this?

Code:

		if (email.subject.indexOf("reject") >= 0) {

			current.comments = 'Rejection Cause: ' + email.body_text;
			current.active = false;
			msgArray.push(displayValue);
			current.u_rejected = true;
			current.update();
		}
		if (email.subject.indexOf("approve") >= 0) {
			current.u_approved = true;
			msgArray.push(displayValue);
			current.update();
		}
5 REPLIES 5

Hi @F_bio Santos ,

Yes for new also you need to insert it in sys_journal_field table only.

Please mark helpful/correct if my response helped you.