- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2020 11:14 PM
Hello Guys,
We have created the inbound actions to create the ticket when OTRS tool send an email to Servicenow but along with the mail the extra content is also updating in the ticket( see the print screen) i want to eliminate the extra content and to keep only the main content, i have written a code but no luck.
Can anyone guide me with this Please?
Thanks and Regards,
Prerana
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 05:39 AM
Hello Prenana, I tried with another approach and it worked:
var body = email.body_text;
var expectedTxt= body.split("Bitte denken Sie an")[0] ; // add your line here or keep 4 words
gs.log("expectedTxt: "+expectedTxt);
Thank You!
Abhishek Gardade
ServiceNow MVP 2020
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2020 11:19 PM
Hi Prerana,
it looks you are trying to replace the variable fakeText rather than the string itself
It looks you are testing it in the script itself?
how would you know till what length the text is fake and from which point the real text starts
Do you have some identification parameter?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2020 11:45 PM
Hello Ankur,
Thank you so much for the reply.
We dont want that fake text to be updated in the description field and apart from the text indicated in the arrow everything should be updated in the description but not the fake text( The extra content)
Can you please suggest me where i am wrong, they have sent few sample email to test instance for our reference
Thanks,
Prerana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 12:16 AM
Hi Prerana,
If the fake text will always form a pattern and start with some particular message then proceed with what Abhishek has mentioned
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2020 11:57 PM
Hello Prenana,
Go to System Properties> Email Properties and add what you need to the Inbound Email configuration property labeled.
Discard everything below this text if found in a reply body (comma separated, case sensitive).
Add your text start line(Bitte denken.........) here:
Refer below Docs,
Please mark as Correct Answer and Helpful, if applicable.
Thank You!
Abhishek Gardade
ServiceNow MVP 2020
Abhishek Gardade