Get data from Email Body

Hello all,
I have a scenario where I need to get data from email body table.
Below is the table what it look like:
Product Price Quantity Subtotal

Workhorse Synthetic Leather Glove with Anti
Vibration Palm (SP-55LQ) 16.95 1 16.95
SKU: 63477830
Size/Taille: XL/TG

Men’s Flat Front Pants (1447) 35.50 1 35.50
SKU: 1399906
Colour/Couleur: Khaki/Kaki
Size/Taille: 44
INDICATE INSEAM or N/A INDIQUER LENTREJAMBE OU N/A: 32

Alterations / Altérations 5.00 1 5.00
SKU: 63505518

Men’s Striped Oxford Short Sleeve Shirt (C1
13SS) 40.95 1 40.95
SKU: 1815658-SS
Colour/Couleur: Green / White
Size/Taille: 2XL Tall/2TG Haut
EMBROIDERY NAME OR N/A NOM POUR LA BRODERIE OU N/A: BRAD

                                               Total Savings:   103.68
                                                    Sub Total:   98.40
                                           Shipping & Handling:   0.00
                                                          Tax:   14.76

In the above table I need Quantity value for each products.
As if you see above table products name can be two line single line or it can vary so I need quantity value only.
Please help me if you have ever come across with this scenario.
Thanks

Hi @Chirag1991,
I understand that your Quantity is the value that appears between the prices? Can you then pull out the data for each input string part that matches the following regex: “\b[0-9]+[.][0-9]{2}\s([0-9]+)\s\b[0-9]+[.][0-9]{2}\b” with the activity “Matches”, and then convert it to an array of strings using a space character as your separator? If you pull out the second element of the array, that would be your quantity, right? Does this solve your issue? :slight_smile:

dataExtraction.xaml (11.1 KB)
Does this solution work for you? :slight_smile:

1 Like

Hi PAD,
the mail body will look a like below screen shot:

The table can be any where it will be like forwared mail and I have to pick this table and get the quant from this table
mail format.txt (3.2 KB)

I have also attached the mail format what it look a like .
could you please look into this and provide the solution accordingly.

thanks

Hi Did you check my reply and mail format?

@Chirag1991,

Check this xaml, it may help you.

ExtractMailBody.xaml (7.8 KB)

Hi @Chirag1991,

I can see that the number of space characters between quantities and prices may vary, so please check the below workflow - please note that for testing purposes it just checks the first email from the top of my Outlook mailbox - normally, I guess you would need to specify some criteria of the emails that you need to verify dataExtraction.xaml (10.8 KB) :

1 Like

Thanks and It worked amazing!

No problem at all :slight_smile: Glad that your problem is now solved.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.