Email Body Message Extract

I Want to extract text data from mail body and create new text file for extracted data
i am facing so many problems but cant get a solutions
please help me

1 Like

Welcome to uipath forum

Hope the below steps would help you resolve this

  1. Use get outlook or any get mail activity and get the output with a variable of type mailmessage named out_mailmes

  2. Now use a FOR EACH activity and pass the above variable as input and change the type argument as System.Net.Mail.MailMessage

  3. Inside the loop use a Assign activity like this
    str_mailbody = item.Body.ToString

  4. Then use a WRITE TEXT FILE activity and pass the above string variable as input and mention the filepath as

That’s it’s

Cheers @kailas_jadhav

The filename is dynamic multiple mails body data i want extract and the .tex file will create the file with the name of mail subject

Yeah here instead of the expression I shared as filepath mention as item.Subject+”.txt”

Cheers @kailas_jadhav

1 Like

Thanks It’s working

Glad @kailas_jadhav