Extract specific data from Email with Regex

Hello Everyone,

I would like to extract specific data from an email recieve in my gmail.

I have an issue when i am using Find Matching Patterns.

I’ll explain the variable I’m having trouble with :
In my for each row in data table, i have a database with my collum Regex, so i do :

and i have this error : Write Line: Object reference not set to an instance of an object.
I would like to extract from the body some specific word, i upload my Regex table for a better understanding

Thanks




can you give us data samples for prototypings?

This is my email :
Test du body dans UiPath

Valeur : TOTO

TEST : TATA

S/N : TITI

PC : TUTU

Also, if i hard code the Pattern, it’s works like this :
“(?<=Valeur : )\w+”
“(?<=TEST : )\w+”
“(?<=S/N : )\w+”
“(?<=PC : )\w+”

But with this : row.Item(“Regex”).ToString, got the error

i guess we can handle different. However we recommend:

Let me test this

Thanks

You are amazing it’s works.

Now, let’s put this data in a excel spreadsheet

Thanks

Now my data is extracted to my excel, thank you a lot,

But when i would like to move the email to a specific folder, i have this error:

and mails was part of my for each

we dont know all details from modelling but would assume

  • an gmail related activity looks for all mails and has partiulcar output regulating the datatype of an email
  • the for each set typeargument is different and needs to be adapted

I would like to Thank you prr,

Everything works fine now

Have a nice day

Perfect so we can close topic by
Forum FAQ - How to mark a post as a solution - News / Tutorials - UiPath Community Forum