Microsoft O365 Download attachment

I am facing trouble in downloading attachments from Digitally signed mails from shared mailbox using O365 activities.

@chandresh_agarwal

What error are you getting?

Cheers

No error…download email attachments is running fine but its not downloading actual attachments from mail

1. Get Emails from Shared Mailbox

Use the Get Mail Messages activity to retrieve the emails from the shared mailbox.

  • Activity: Get Mail Messages
  • Properties:
    • Top = Number of emails to retrieve (e.g., 10 or 20).
    • MailFolder = The folder where emails are stored in the shared mailbox (e.g., “Inbox”).
    • OnlyUnreadMessages = False (set to True if you only want unread emails).
    • Filter = You can use a filter, e.g., IsRead eq false to filter unread messages or any other necessary condition.
    • Account = The shared mailbox’s email address (e.g., sharedmailbox@example.com).

2. Check for Attachments in Emails

Loop through the retrieved emails and check if they contain attachments.

  • Activity: For Each (to iterate through emails).
    • TypeArgument = MailMessage.
    • Loop through the MailMessages output from Get Mail Messages.

Inside the loop, you can use the Attachments property of the MailMessage to check and download the attachments.

3. Download Attachments

Use the Save Attachments activity to download the attachments from the email.

  • Activity: Save Attachments
  • Properties:
    • MailMessage = The current email object being iterated in the loop.
    • FolderPath = The path where you want to save the attachments (e.g., "C:\Attachments").

@chandresh_agarwal

May I know how did you decide its not downloading

and can you show the activity please

generally ti downloads to temporary location you can get using attachmentoutput(0).localpath

cheers