How to create an email inbound action to support French Language?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2023 04:11 AM
It should create a ticket whenever the body of the French email contains Forward(FW) as TRansfert(TR) and From as De
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2023 05:01 AM
Hi @Karuppasamy
Please try the below inbound action
(function run() {
var email = current.email;
var emailBody = email.body_text;
// Check if the email body contains "Forward" or "Transfert" and "From" or "De"
if ((emailBody.indexOf("Forward") !== -1 || emailBody.indexOf("Transfert") !== -1) && (emailBody.indexOf("From") !== -1 || emailBody.indexOf("de") !== -1)) {
// Create an incident
var gr = new GlideRecord('incident');
gr.initialize();
gr.short_description = 'French Email Incident';
gr.description = 'Incident created from a French email with "Forward" or "Transfert" and "From De".\n\nEmail Body:\n' + emailBody;
gr.insert();
}
})();
Please mark the asnwer helpful, if this solution works for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2023 12:11 AM
Actually while forwarding the mail, FW: is added to the headline of the email. so while forwarding the mail, we should get TR: as the prefix for the French mail. Is there any solution for this?