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.

Remove Greetings and Signature from Inbound Actions

Community Alums
Not applicable

Hi All,

 

I need to remove the Greetings message and the Signature from the inbound email while processing it through the Inbound email action is it possible ? 

 

Thank you

1 REPLY 1

Community Alums
Not applicable

Hi @Community Alums ,

 

Actually this is a bit tricky to implement as we cannot predict what all greeting will be used or signature.

 

Ideally you can create two arrays like belwo-

var greetings = [ 'Hi', 'Hello', 'Dear', 'Greetings', 'Good Morning', 'Good Afternoon', 'Good Evening' ];

var signature = [ 'Best Regards', 'Kind Regards', 'Sincerely', 'Thank you', 'Thanks', 'Regards' ];

Then create a function to remove these.

 

If my response has resolved your query, please consider giving it a thumbs up ‌‌ and marking it as the correct answer‌‌!

 

Thanks & Regards,

Sanjay Kumar