Save all PDF attachments from unread mails, and print

Hi guys,

I’m working on a bot that:
reads all the unread email from Inbox,
loop through each email and save all the .pdf files,
log email date/sender, and file name to excel sheet,
then print all the pdf.
log if each pdf file is printed or not in that excel.

I don’t know how should I design my work flow because some email contains multiple pdfs, if I log theemail sender and date in state machine 1, how should I match the “ifPrinted” result in corresponding data row (filename)?

Please help

Hi @Zoe_1020 ,

The “Save Attachments” activity saves all attachments of the MailMessage object. Multiple PDFs shouldn’t be an issue, does this answer your question?

What did you build so far? We can help you better if we know where you got stuck exactly.

I have built the whole bot but it does not log information correctly. It outputs duplicates on excel sheet. How can I loop through a column items, and remove the whole row, if I find duplicates in that column? @bcorrea @azherullah_hussaini

Use an assign activity and a datatable variable with the below,

dt.DefaultView.ToTable(true, [ColumnName])

Although, it’d be better to analyze your code and see why you’re getting duplicates in the first place.