uipathmhtml

.Mht issue - Blank Page


*Context: read a table from a body’s email. For that a use this methode (Save email as a .mht, then extract data with web data scraping activity)

I used this method many time, and still working. But, recently I start a new process and when i tried this method some mails appear as a “Blank Page”

Any idea? xD

The only thing I spotted is that the working mails have this code in the footer and others dont have it:

Working Mail

No Working Mail


Solution

  • Unfortunately, you can't rely on emails always following standards (see https://www.rfc-editor.org/rfc/rfc1521 for more details). In an ideal world, you should encounter messages with multipart/alternative, essentially giving you two sections:

    1. text/html with a formatted (html) message along with a table in your case,
    2. text/plain containing plain text, allowing any reader to interpret that email (even without html support -- think of showing emails in your command prompt/terminal).

    Only because there are standards does not mean people will follow them. You will see messages without the second part, incorrect content types, and much more.

    Browsers seems to rely on the first part -- text/html. If that part is absent, nothing may be displayed at all (note that the results may differ from browser to browser, and different content types may yield different results -- I tested this using multipart/mixed on Chromium).

    Moving forward with UiPath, there are the following options:

    In any case you'll need to parse a plain text representation of the table, potentially turning it into a DataTable object, which includes:

    Unless you know precisely which formats to expect, this can be challenging.