I have a requirement to read email conversations and extract the top email conversation

please find the sample email conversation. I need to extract the top email conversation. Can you provide any sample xml project. I have attached a sample email conversation for you, converted to a text file

@"Test rpa

Dialog - Internal

From: Test test@gamil.lk
Sent: Thursday,
August 17,
2023 2:17 PM
To: Herath Herath@xxxx.lk
Subject: RE: Reactivate tv connection

Ok

RPA- Internal

From: Herath Herath@xxxx.lk
Sent: Wednesday,
August 16,
2023 11:09 AM
To: Test test@gamil.lk
Subject: RE: Reactivate tv connection

Thanks

RPA- Internal

From: Test test@gamil.lk>
Sent: Wednesday,
August 16,
2023 11:07 AM
To: Herath Herath@xxxx.lk >
Subject: RE: Reactivate tv connection

Dear Customer,
Thank you for reaching out! Your Ticket ID - 111632

We received your e-mail and will get back to you with a response as soon as possible. That is usually within the next 24 hours. If you have general queries about our products and services or you require urgent assistance,
you may contact us via our self-services or other assisted digital channels.

WhatsApp us on 0777678678 or click on Share on WhatsApp https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwa.me%2F%2B94777678678&data=05|01|RPAuipathtest%40dialog.lk|53ffeee75efd4106df0a08db9efea05c|a628da58b099463eb9bd4987cd45ed75|0|0|638278588667264691|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=c3OV2ehwpq55o%2FKIIi%2Fb36kXOzUzYwBsA0qEi%2BwJPRQ%3D&reserved=0 It’s easy. It’s fast.

Community Connect Online Forum - https://www.dialog.lk/crowd https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dialog.lk%2Fcrowd&data=05|01|RPAuipathtest%40dialog.lk|53ffeee75efd4106df0a08db9efea05c|a628da58b099463eb9bd4987cd45ed75|0|0|638278588667264691|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=p%2Fr8maRkdcdGcAi0hbW831x%2BuY2b0GnvzNi6RULwthA%3D&reserved=0

Get access to over 450 services by downloading the My Dialog App and controlling your accounts. To download: https://www.dialog.lk/mydialog-app/ https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dialog.lk%2Fmydialog-app%2F&data=05|01|RPAuipathtest%40dialog.lk|53ffeee75efd4106df0a08db9efea05c|a628da58b099463eb9bd4987cd45ed75|0|0|638278588667264691|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=Znu7FNa5AI8KGDqy6GghSOyp%2FlQ39IyiFeY5VH%2FfZpY%3D&reserved=0

Virtual assistance via Dialog FB page messenger - Dialog Axiata https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.facebook.com%2Fdialog.lk%2F%3Fref%3Dbr_rs&data=05|01|RPAuipathtest%40dialog.lk|53ffeee75efd4106df0a08db9efea05c|a628da58b099463eb9bd4987cd45ed75|0|0|638278588667264691|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=AVbuW%2F%2BICbBaYxPFelrbAWfjwX5BbeXf2vcobkBl388%3D&reserved=0

USSD - #678#

You can also order new Dialog connections online from our website

www.dialog.lk https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.dialog.lk%2F&data=05|01|RPAuipathtest%40dialog.lk|53ffeee75efd4106df0a08db9efea05c|a628da58b099463eb9bd4987cd45ed75|0|0|638278588667264691|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=wmwzRkcc2jsjxWKPfwj8cG4r37wWXhCaJPbD9K%2F8IZY%3D&reserved=0

Thanking you,
Service Team

XXX - Internal

Hi @anusha_samarakkodi ,
I not clear your requirements.
I think you wwant to get all off information in mails. they maybe top 30 or 50 newest mail…
that’s right?
first, get top email, you can get outlook mail message or gmail, IMAP mail…
ex: outlook mail


for each mail to get each mail
each loop is a mail
you can get body, time, sender,…
then write time to excel

my example get mail body and time
you can try it, or detail, can you clear your requirements
regards,
LNV

Thanks for your reply. I have an email with multiple replies. I need to extract the top email conversation from this email.

They are in outlook mail ?
you can use my way, but it think don’t need catch
for each mail , use save attach file, if not file, we can remove form list

@anusha_samarakkodi

Best would be split the data on from and get the first item after split which gives only the conversation you need.let str is the variable which contains your email body

Str.Split({"From"},Stringsplitoptions.None)(0)

Hope this helps

Cheers

1 Like

Great bro it’s working fine now.

1 Like