No internet connection
  1. Home
  2. Questions

Why not picking up text in the body of email

By @rruss
    2021-11-30 16:09:25.650Z

    The automation is to look for certain text in the body of an email and then perform an action. For some reason it will process an email that has a signature in it but if an email comes in without a sign off or signature at the bottom, the parser does not work. Anyone have any ideas why this could be happening?

    stops at line 4 for any email that has text to be extracted in it, but no Best regards and signature etc.
    Works perfectly if same text is included in an email with a sign off at the bottom.

    • 4 replies
    1. L
      Liam @liam
        2021-11-30 16:24:43.833Z

        Hi rruss

        The behaviour here suggests to me that msg_body is blank in the scenarios where there is no signature.
        If you use the Message Store view to find one of the failing messages then look in the Message Text tab, is there content?

        If there is content in this tab then please use the "save as" button at the top and send a copy of the message, and link to this post to
        If there is no content in this tab, it would explain the issue, in this scenario I would probably use an If block to check if msg_body is empty, and if so extract from msg_html instead.
        Note that extracting from the msg_HTML will likely need to you to rethink the rest of your processes due to now dealing with HTML code and all associated tags.

        1. R@rruss
            2021-11-30 17:16:17.000Z

            Thanks I have sent an email with the 2 emails one that is a and one that is not parsed

          • S
            In reply torruss:
            Stephen Parker @stephenparker
              2021-11-30 17:00:22.965Z

              Hi There,

              Is the 'Clean & Trim Blanks' enabled on the Extract Field action? If it is this will return a single line - since all whitespace will be been trimmed.

              The current extract field you have will search for the first none-whitespace character and then extract following this. You would need to enable the Extract Until - End of Data so it extracts everything rather than the first line.

              Do you want to extract all email addresses in the %Msg_Body%? If so, an easier way would be to use the Set Variable with the 'Extract All Email Addresses' option:

              %EmailsCSV% = Extract All Email Addresses ( %Msg_Body% )

              Then use the For Each Comma Separated Value In %EmailsCSV% Assign To: LineEmail


              1. R@rruss
                  2021-11-30 17:17:48.567Z

                  Yes the Clean & Trim Blanks' is enabled , Ill try the other method and see if it works thanks for the suggestion