Extract Oulook email with Subject,SenderName and Recieved date in Excel using UIPath
Steps Needed
Use Get Outlook Mail Messages activity to get mails from your inbox, this will return a collection of ‘Mail Messages’. From each mail message your can access its data such as body, subject, to,etc… by placing a dot at the last of the data.
MailMessage.Subject
will give you the subject, once you access the data from mail you can write it to excel in any desired fashion you want.
Can you share the Step and which controls to be used - i am new user trying for the first time.
Can i get the Entire flow and controls used.
Hi
Welcome to uipath community
Once after getting the list of mailmessage from get outlook mail activity or any other mail activity with a variable named list_mails
Pass that to a FOR EACH activity and change the type argument as System.Net.Mail.Mailmessage
Inside the loop use a ASSIGN activity like this for each value
str_subject = item.Subject.ToString
str_SenderName = item.Sender.Address.ToString
str_receivedDate = item.Headers(“Date”).ToString
Then this can be added to your excel with ADD DATAROW activity
Cheers @neel1986
how to add the same in excel - steps please
what is the next step after assign the variable
please reply how to add the same in excel sheet
Use Write Range Activity Pass the same excel path and enter the sheet name it will create same excel file new sheet.
after assigning the variable what is the next step
Where pass the value like this to add Datarow activity to the property ArrayRow like this
{str_subject,str_sendername,str_receivedDate}
And mention as dt in the datatable
dt is the variable obtained from READ RANGE activity which has those three columns
Cheers @neel1986
after adding the same what is the next step to add the data in excel
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.