How to use Logic App to get/send outlook item (i.e. *.msg)
Published May 19 2021 11:13 PM 4,597 Views

If you tried to use logic app to pick up all attachments with “When an email is received” Office 365 trigger, we might notice that some of the attachments are not able to be retrieved from this trigger. By checking the raw output from the trigger, you might find even “hasAttachments” is “true”, the “attachments” is an empty array.




This is caused by Office 365 connector does not support “item attachment”. From our official document, we should use HTTP with Azure AD connector to work around such limitation.
Office 365 connector limitation:


To workaround it, you could follow the steps below:

  1. First of all, using a “When a new email arrives V3” trigger to monitor if an email arrived, and get the message id of emails received. And then use HTTP to call Graph API and list attachments from the message id retrieved from the trigger.
    Graph API list attachments:


  2. Then for each attachments listed from the email, we get the attachment raw contents from the attachment id. Note that we added “$value” in the request to get attachment raw contents.


  3. The last step is to send this attachment in an email. We need to add an extension ".eml" to the attachment name, so our outlook could recognize it as an valid attachment.



The original email received:



The new email sent by logic app:




Version history
Last update:
‎May 19 2021 11:08 PM
Updated by: