<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: extracting text from email in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/extracting-text-from-email/m-p/96875#M45016</link>
    <description>Hello &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/3579"&gt;@Jelle_Matthieuv&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;There are various ways you could do this. You'll want to start with looking at the &lt;A href="https://digitalexchange.blueprism.com/dx/entry/3439/solution/ms-outlook-vbo" target="_blank" rel="noopener"&gt;MS Outlook VBO&lt;/A&gt; (latest version available on the DX).​ This will give you the ability to get the received emails from your local Outlook instance. You'll want to look at the action &lt;EM&gt;&lt;STRONG&gt;Get Received Items - Basic&lt;/STRONG&gt;&lt;/EM&gt; which will return a Collection of the received items that meet the criteria you provide. There are two other actions that give you a little more control, but they require some advanced knowledge of Outlook.&lt;BR /&gt;&lt;BR /&gt;Once you've got the Collection of items, you'll want to loop over it working on each individual email. From there, you can access the body content of the email. Assuming the body content is plain text you could just pull the whole thing in a Text data item and then perform actions to process it line-by-line, finding the location of the ":" and then pulling out a substring from the point to the end of the string. You can perform these actions using Calculation stages and the built-in Text functions available in the Calculation stage.&lt;BR /&gt;&lt;BR /&gt;If the body content of the email is in HTML format, you'll have a little more work to do as you have all the raw HTML tags to deal with. If that is the case, I'd suggest looking into the &lt;A href="https://digitalexchange.blueprism.com/dx/entry/3439/solution/utility---xml" target="_blank" rel="noopener"&gt;Utility - XML&lt;/A&gt; VBO. You could use that, along with some XPath expressions, to pull out the main text content and then use the Calculation stages, as mentioned above, to slide-and-dice the string.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Eric</description>
    <pubDate>Fri, 16 Dec 2022 14:53:24 GMT</pubDate>
    <dc:creator>ewilson</dc:creator>
    <dc:date>2022-12-16T14:53:24Z</dc:date>
    <item>
      <title>extracting text from email</title>
      <link>https://community.blueprism.com/t5/Product-Forum/extracting-text-from-email/m-p/96874#M45015</link>
      <description>Hi everyone,&lt;BR /&gt;&lt;BR /&gt;New to this program and trying to extract text from an email in outlook.&lt;BR /&gt;&lt;BR /&gt;It looks something like this:&lt;BR /&gt;Number: Example1&lt;BR /&gt;Distribution: Example1&lt;BR /&gt;Customer: Example1&lt;BR /&gt;Location: Example1&lt;BR /&gt;and 10 more.&lt;BR /&gt;&lt;BR /&gt;I want to extract all the example1 texts and past them in an excel file. What is the best course of action?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance</description>
      <pubDate>Fri, 16 Dec 2022 14:36:50 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/extracting-text-from-email/m-p/96874#M45015</guid>
      <dc:creator>Jelle_Matthieuv</dc:creator>
      <dc:date>2022-12-16T14:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: extracting text from email</title>
      <link>https://community.blueprism.com/t5/Product-Forum/extracting-text-from-email/m-p/96875#M45016</link>
      <description>Hello &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/3579"&gt;@Jelle_Matthieuv&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;There are various ways you could do this. You'll want to start with looking at the &lt;A href="https://digitalexchange.blueprism.com/dx/entry/3439/solution/ms-outlook-vbo" target="_blank" rel="noopener"&gt;MS Outlook VBO&lt;/A&gt; (latest version available on the DX).​ This will give you the ability to get the received emails from your local Outlook instance. You'll want to look at the action &lt;EM&gt;&lt;STRONG&gt;Get Received Items - Basic&lt;/STRONG&gt;&lt;/EM&gt; which will return a Collection of the received items that meet the criteria you provide. There are two other actions that give you a little more control, but they require some advanced knowledge of Outlook.&lt;BR /&gt;&lt;BR /&gt;Once you've got the Collection of items, you'll want to loop over it working on each individual email. From there, you can access the body content of the email. Assuming the body content is plain text you could just pull the whole thing in a Text data item and then perform actions to process it line-by-line, finding the location of the ":" and then pulling out a substring from the point to the end of the string. You can perform these actions using Calculation stages and the built-in Text functions available in the Calculation stage.&lt;BR /&gt;&lt;BR /&gt;If the body content of the email is in HTML format, you'll have a little more work to do as you have all the raw HTML tags to deal with. If that is the case, I'd suggest looking into the &lt;A href="https://digitalexchange.blueprism.com/dx/entry/3439/solution/utility---xml" target="_blank" rel="noopener"&gt;Utility - XML&lt;/A&gt; VBO. You could use that, along with some XPath expressions, to pull out the main text content and then use the Calculation stages, as mentioned above, to slide-and-dice the string.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Eric</description>
      <pubDate>Fri, 16 Dec 2022 14:53:24 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/extracting-text-from-email/m-p/96875#M45016</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2022-12-16T14:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: extracting text from email</title>
      <link>https://community.blueprism.com/t5/Product-Forum/extracting-text-from-email/m-p/96876#M45017</link>
      <description>Hi &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/3579"&gt;@Jelle_Matthieuv&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;You can use ​&lt;EM&gt;&lt;STRONG&gt;Get Received Items - Basic&lt;/STRONG&gt;&lt;/EM&gt; action to get email details. You will get email body in &lt;STRONG&gt;item.Body&lt;/STRONG&gt; field then you can use &lt;STRONG&gt;Utility String extended&amp;nbsp;&lt;/STRONG&gt;in that use &lt;STRONG&gt;Extract Text Field&amp;nbsp;&lt;/STRONG&gt;to get exact text by giving pretext and post text inputs.&lt;BR /&gt;&lt;BR /&gt;If You are getting &lt;B&gt;item.Body&amp;nbsp;&lt;/B&gt;in html format the modify code in &lt;STRONG&gt;internal get items action &lt;/STRONG&gt;in that replace this one line of code&amp;nbsp;row("Body") = If(item.BodyFormat = 2, item.HTMLBody, item.Body)&amp;nbsp;with this&amp;nbsp;row("Body") = item.Body&lt;BR /&gt;It will fetch you email body in text. later you can use &lt;STRONG&gt;Extract Text Field&amp;nbsp;&lt;/STRONG&gt;action to get exact field&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Soumya</description>
      <pubDate>Fri, 23 Dec 2022 16:55:25 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/extracting-text-from-email/m-p/96876#M45017</guid>
      <dc:creator>Soumya21</dc:creator>
      <dc:date>2022-12-23T16:55:25Z</dc:date>
    </item>
  </channel>
</rss>

