Parker Software Ltd Homepage
Forum Home Forum Home > ThinkAutomation Business Process Automation > ThinkAutomation Version 4
  New Posts New Posts RSS Feed - msg_body to Sharepoint List
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

msg_body to Sharepoint List

 Post Reply Post Reply
Author
Message
DaleS View Drop Down
New User
New User


Joined: 18 Jan 2018
Location: United Kingdom
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote DaleS Quote  Post ReplyReply Direct Link To This Post Topic: msg_body to Sharepoint List
    Posted: 18 Jan 2018 at 3:51am
I wonder if anyone can shed any light on this issue. we parse the msg_body of an email into a text field on a SharePoint list and have been doing this for ages.
We have started receiving emails from another source and wanted to do the same thing but the trigger is failing because it cannot parse the msg_body text.
I was under the impression ThinkAutomation converts emails to plain text prior to this so i'm at a loss why it is failing?
Any ideas?
Back to Top
parkersoft-jim View Drop Down
Admin Group
Admin Group
Avatar

Joined: 11 Nov 2016
Location: Terra
Points: 103
Post Options Post Options   Thanks (0) Thanks(0)   Quote parkersoft-jim Quote  Post ReplyReply Direct Link To This Post Posted: 18 Jan 2018 at 8:23am
Emails have headers and bodies. The the body, there is a plain text part, and a html part.

Typically html emails also have a plain ext part, but some don't and ThinkAutomation will only pull the plain text part of the Email for your 'xtracted Fields' to extract from.

It sounds like the emails from the new source do not contain plain text so your existing Extracted Fields are not able to extract what you want. Most likely due to their being no plain text there.

You could review the emails at source and amend them there so they actually send with plain text again or amend how your ThinkAutomation is configured.

1. Create a second trigger under the same account, perhaps call it Parse HTML.


2. On your original trigger (whatever you called it) add a Pass Value to Trigger trigger action.


3. In the 'Pass Value To Trigger' drop-down choose the new Parse HTML trigger your created.


4. In the 'Set Body Text To' pop in any built-in variables you'll need to extract from. You don't necessarily need all the header information, so I would suggest using the built-in variables for things that you would find useful;

From EMail Address %msg_from%

To Email Address - %msg_to%

CC Email Address - %msg_cc%

BCC Email Address - %msg_bcc%

Subject - %msg_subject%

HTML - %msg_html% 

I would encourage you to use Ctrl & RETURN/ENTER to put the variables on seperate lines. This will help when you come to setup your Extracted Fields again on the new second Parse HTML trigger.


If you want the whole raw email you will need to use just %msg_headers% and %msg_mimetext%. However doing it that way will make it more cumbersome to setup the Extracted Fields again on your second Parse HTML trigger.


5. At this point, you may want to also use the Read/Write Text File trigger action on your original trigger too, and set the body of the text file to contain the exact same variables as your Pass To trigger action. This isn't needed once setup, but doing this now will help you get things setup.

The reason for this is it will allow you to reprocess a test message and then open the text file to see what actual text is being passed across to your new Parse HTML trigger. This will help you a lot when it comes to setting up your Extracted Fields again.


6. Next you need to do is setup the Extracted Fields on your new Parse HTML trigger again to extract what you want. Though this time remember that the raw text you are playing with will have HTML code in it and will not be the same as what your Extracted Fields on your orignal trigger had to deal with. Opening tags, closing tags etc... (Hence why I encourage you to use that Read/Write Text File trigger aciton on your first trigger).


7. Finally, just setup the Trigger actions part of your new ParseHTML triger so they are the same as your original trigger. Obviously you won't need to use the Pass To or Read/Write Text File trigger actions on the second Parse HTML trigger.

8. Don't forget to remove the old trigger actions on your original trigger. Once setup your original trigger should only have the Pass Value To Trigger trigger action (and maybe the read/write text file for troubleshooting) on it as the role of the first trigger will be to literally pull out the html and all the other stuff you want and pass it to the second trigger to actually parse and process.


I hope the above is enough information for you,




Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.05
Copyright ©2001-2016 Web Wiz Ltd.

This page was generated in 0.063 seconds.