Data Scraping From Outlook

Hi.I want to get and copy the name,last name,company name,e-mail,phone in my mail.But this mail is template mail so I want to do this in all future emails.
Can someone help me please?

This image is my Outlook mail screenshot

1 Like

Welcome to uipath community
Hope these steps would help you resolve this

—use a get outlook mail activity and get the output with a variable of type list of mailmessage
—now use a FOR EACH activity and pass the above variable as input and change the type argument as System.Net.Mail.MailMessage
—inside the loop use a Matches activity where in the input string mention as item.Subject.ToString
And in the expression mention as “(?<=(\d).).*”
—get the output with a variable named str_matches
—now use a FOR EACH LOOP while still being inside the above main For each loop and pass the variable str_matches as input and change the variable name from item to matches, Change the type argument to System.Text.RegularExpressions.Match
—inside this loop use a assign activity like this
str_name = Split(matches.ToString,”,”)(0).ToString.Trim

str_lastname = Split(matches.ToString,”,”)(1).ToString.Trim

str_company = Split(matches.ToString,”,”)(2).ToString.Trim

str_email = Split(matches.ToString,”,”)(3).ToString.Trim

If we want to store this to a datatable next to this assign activity use ADD DATAROW activity and mention the ArrayRow property as {str_name,str_lastname,str_company,str_email}
And datatable as Finaldt
Where it’s a datatable that we can create with a BUILD DATATABLE ACTIVITY activity in the very beggars of sequence with same number of columns as same number of elements in ArrayRow

Hope this would help you
Cheers @sufyant

1 Like

To get clear idea . you want to get all contacts from Outloook ?


1 Like

No.I have emails that come to me at regular intervals.these emails contain user information.adding these users to the system and I want to do it automatically when e-mail comes to me

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