Capturing relevant information from the body of emails sent to a process model

I'm trying to create a feature to allow users to communicate by email and have their communication tracked by Appian and stored in a database. However, I'm having a hard time capturing the meaningful information from the body of the email message. Email signatures and the content of emails earlier in the chain are also captured. Has anyone implemented a solution that does what I'm trying to accomplish?

For example, I tried sending an email with just the word "Testing" in the body, but striphtml(msg!body) returns all of this garbage, including my email signature:

Testing________________________________[cid:image001.jpg@01CC47C6.5B839AF0]John StrettonEDP Renewables North AmericaCorporate InitiativesAddress here, Houston, TX 77002Direct action. Use energy efficient products.This e-mail is for the use of the intended recipient(s) only. If y...


  Discussion posts and replies are publicly visible

  • ...ou are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any distribution, dissemination, or copying of this e-mail is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and delete this e-mail message from your computer. Thank you.________________________________Esta mensagem e os ficheiros anexos podem conter informa??o confidencial ou reservada. Se, por engano, receber esta mensagem, solicita-se que informe de imediato o remetente e que elimine a mensagem e ficheiros anexos sem os reproduzir.This message and any files herewith attached may contain confidential or privileged information. If you receive this message in error, please notify us immediately and delete this message and any files attached without copying them in any way.Este mensaje, asi como los archivos anexos, pueden contener informacion reservada ...
  • ...o confidencial. Si Usted recibe este mensaje por error, le rogamos que informe de inmediato al remitente y elimine el mensaje y los ficheros anexos, sin reproducirlos en modo alguno.
  • Could you explain a bit more about what you have tried? Have you created a Process Model and then set it to receive emails? That is one way you could start a process to then send another email. I'm not sure if what you mean by tracking email-email is something that can be done..
  • I'm not having any trouble getting Appian to start a process by email. See attached. The trouble is that the message body contains a lot of junk that I don't want to capture. The record shown is entity-backed, so I have successfully written the contents of the email to a database and then displayed it in this record. I'd really like to be able to just capture the meaningful part of the email message and exclude the signature.

  • And another challenge is that everyone's signature is a little different, so I can't count on being able to search for a particular pattern of characters to indicate where the message body ends. This system is also intended to capture email communication with external parties who may have different signatures altogether.
  • Furthermore, if I reply to that email, the system will capture the full contents of the new email and also the previous ones in the email chain. I'd like to be able to capture just the most recent email in the chain.

  • For clarity, I've annotated the screenshot in my previous comment

  • Thanks for the additional screenshots and notes. Thinking about this scenario in another way, when you reply to an email via an email client, eg Outlook or Gmail, the reply includes the entire body of the previous messages.

    The issue you are trying to circumvent becomes even more challenging on emails that contained replies to replies and so forth. If you were just capturing email from your own Organization, you may be able to add a marker at the Mail server level, possibly a hidden element that you could parse for. Of course, emails are files too, so you could look at parsing the file.. you will see the message broken into parts, though beware of the encoding and it would still be trial and error to get the right result.

    Email source:
    Content-Type: text/html; charset=UTF-8
    Content-Transfer-Encoding: 7bit

    This topic on Stackoverflow may help you:
  • @johns222: For our process, we have extracted various details of the email using the functions like property(msg!properties,"Subject","Not Available")--pv!subject_txt, msg!body--pv!emailBody_txt in the 'receive message event'. Then we have saved these details into CDT and save into DB. From these, we extracted various details using combination of striphtml() and extract() functions. Hope this helps.