Currently, I'm working on an Email channel. When customers are sending emails to us, we receive them with their organization's disclaimer. The disclaimer is in English language and but the customer messages are in Spanish, so the detectLanguage() is unable to return the language of the Email Body. May I know how to extract the email body without disclaimer in Architect ?
Please advise on this.
As said, there is no distinction in an email between the email text, the signature, the disclaimer (outlook). It is just text (outlook appends the signature and the disclaimer to the email as text - no specific/predefined separator).
So if you know/have a list of possible start of disclaimers (what your customers would use), you could search for them in the Email.Message.body (Architect built-in variable) using the FindString function (in an expression). FindString will return -1 if it doesn't find the search string.
Then use Left or Right functions to extract the email content (Left if the disclaimer is at the end of your email, Right if it is at the beginning), using the index returned by your FindString function (when > -1).