Facing issue while using For Each Loop to retrieve email attachments

I am facing issue with For each loop. I am trying to save the attachments from the email.
As Studio got updated I am unable to see System.Net.Mail.MailMessagestype in properties panel attached screenshot for reference.
While referring to UiPath Academy in that they were able to use System.Net.Mail.MailMessages type.
it is not iterating in the loop.

If any one can help me out on this issue it would be really helpful for me.

Thanks In Advance.

@saleem_sheik1

In the new one the type is automatically picked…if it was wrong then in your save attachments when you give current item it would throw an error…but I dont see any

But if you still need the type argument then degrade the UiPath.system.activities from manage packages to 22.10.* then you would see that option in properties

Hope this helps

Cheers

Hi @saleem_sheik1

In Save Attachment activity try giving the extension in which you want to save. Probably it will work likke .png for images, .pdf for PDF files etc.

Hope it helps!!

Regards

My folder is empty while I am suppose to receive four Images.
I tried and nothing works for me as For Each is not iterating.
As you can see 4 mails have been retrieved consisting of 4 attachments, but none of the attachment got saved in the Folder. here for ex: IN-Folder which I created consists no attachments .

Here is the image of email consisting of 4 excel files.

Hi @saleem_sheik1

Can you share the workflow so that i can get an solution for that. I think that in save attachments "\Inv" try giving this "" after that. It might work.

Regards,

instead of iterating courseEmail, is it possible that you should be iterating retrievedEmail variable?

Hi @saleem_sheik1

I have attached screenshot for your reference. Please check and try.



Properties of Get Outlook Mail Messages

Properties of Save attachements

Regards,

Hi @saleem_sheik1

Try this way:

I hope it helps!

Regards,

Nothing is working when I tried debugging I can see workflow is not iterating in For Each Loop.
Still I appreciate for the efforts been put from your end : upside_down_face:.
The process is ending in 00:00:00 time, despite in debug mode and I observed that the work flow is not going in to For Each Loop.

Thanks,

Please try to give in “If” condition instead of Filter as i am given above.

Still not working.

Thanks.

Remove Filter Condition in “Get Outlook Mail Message” activity

Yes.

Check your mails are in Unread or Read, Because in properties you are selecting “Only Unread Messages”

I got 4 as message count.

@saleem_sheik1 Place a log message inside for each loop to see if it’s looping in all 4 mailmessages. If that doesn’t work share your workflow as file to look into the workflow.