For each activity(Argument type)

Hi guys, I am trying to use Get Outlook Mail Message activity to save attachments on a specific folder.
Apparently on the properties panel of the for each activity, I do not seem to find the argument type so that I can set to “MailMessage”.
I am using community version 2023.10.0.
How do I go about it as I am not getting any error when I run the file but attachments are not being saved?
Please help

Hi @J_Crosby

i’m also having same version of studio

in earlier we have option to change argument type but now it will take automatically

for reference you can see screenshot

Let me know anything else :slightly_smiling_face:


@Praveen_Mudhiraj thanks.
Would you have an idea why the Get outlook Mail Message activity is not saving my attachments yet I am not getting any error message?
Sorry I am still very new

Hi @J_Crosby

can you try debug and check like this

If you don’t have any attachment it won’t save anything so.

You can go through this @J_Crosby

Tried and this is the output

@Praveen_Mudhiraj this is interesting,thanks for sharing. Probably I could be facing the same issue.
How else can I save attachments from my outlook emails ?


Probably, ListMail is empty. For now, can you check ListMail.Count.ToString using LogMessage activity etc? If so, it’s necessary to review settings of GetOutlookMailMessage such as OnlyUnreadMessages or MailFolder etc.



From the log messages we can see that the loop did not run at all…that means mailmessages are empty or no mailmessages are retrieved…

There might be some filters you would have selected or used which are filtering all the emails,please check the same


Can you check that manually it’s having the attachments or not and also check that in the properties that you have used only Read or Unread option

Apparently I have tried all the above suggestions and nothing seems to work for me unfortunately. Thanks guys for your time and input

Your Get Outlook Mail Messages isn’t finding any emails. Show us how you have it configured.


Please verify and correct the get outlook mail messages activity…as it is not throwing any error but it is not retrieving any emails as well


Configurations means its properties or what @postwick ?

Yes, especially the query.

@postwick @Anil_G here you go.
Apparently I tried with Use Desktop Outlook App with the same email address and the attachments were retrieved.
The reason why this particular one is not working is still a mystery yet I need it badly.

Is Outlook open when you’re running it? Is the mailbox for that email address shown in your Outlook? If Use Desktop Outlook App works, why not just use that? Could be an issue of compatibility with your version of Outlook.

Also, in my Outlook the other mailboxes I have access to don’t show as the email address. It’s just the part before the @ - in other words if the email address is the account is just testuser not


  1. Can you try removing the account…it takes the default account…
  2. As per screenshot can see there are no emails retrieved at all…
  3. Try keeping outlook open and check if mails are retrieved