How to Remove time stamp and user info from additional comments in Flow Designer

wefw
Tera Contributor

Hi,
In flow designer we are using Send Email action. in body we need to attach Additional Comments from RITM/SCTask. so I am using Data Pill Picker and selecting Additional Comments from RITM but i am also getting time stamp and username in body.
How to remove these details?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@wefw 

that's expected outcome.

you can use a flow variable and get the latest comments and then set the value using Set Flow Variables and use this script

Then use this flow variable in your "Send Email" action

var latestComments = fd_data.trigger.current.comments.getJournalEntry(1).match(/\n.+/gm).join("\n");
latestComments = latestComments.replace('\n','');
return latestComments;

Something like this

latest comments in send email flow.gif

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

6 REPLIES 6

@wefw 

Hope you are doing good.

Did my reply answer your question?

Would you mind closing your question by marking appropriate response as correct?

Members have invested their time and efforts in helping you.

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

Hi Ankur,

Sorry I haven't checked your message; I am on leave. I will try it and will get back to you