How to Add email body to the comments or work notes in ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2025 01:38 AM
Hi,
I have a requirement to copy the body of the email to work notes or comments in ServiceNow. How to achieve this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2025 02:02 AM
Hello @Arun91,
If you're receiving emails through an inbound email action, you can use the following script in the Action tab of the inbound action form:
var gr = new GlideRecord('table_name');
gr.work_notes = email.body;
gr.update();
This will update the work notes with the email body content.
Let me know if you need further clarification.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2025 02:02 AM
which email? the email received on the record via inbound?
what's your business requirement?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2025 02:23 AM
Update Approval Request is the name of the inbound action. I am calling event in this inbound email action that trigger email notification. Now i want to capture body of the email content to the comments of sysapproval table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2025 02:42 AM
so email is received and inside your inbound action you want to write code to show that email received in comments of approval table
This happens OOB
You are sending another email via that inbound what do you want in that? the email received body to be added in the new email triggered?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader