Take attachments from Office 365 Outlook email and store in Azure Blob Storage

Richard Jackson 86 Reputation points
2024-05-08T15:08:02.8666667+00:00

Hi there,

I'm trying to make a Logic Apps flow which:

  • When a new email with attachments arrives
  • For each attachment
  • Create blob of that attachment's contents

The problem I have is the Blob Content - when using "Current Item" from the For control object I only receive the meta data about the object, not the file's contents. Could someone please let me know how I can store the actual contents?

User's image

Sample output (i.e. the contents of the newly created blob):

{"@odata.type":"#Microsoft.OutlookServices.FileAttachment","Id":"AAMkADJmMzRlYmUyLWM4OGUtNDkyNC1iNzM3LTg3NTI5YThlMTJjYgBGAAAAAAC_i6Z5MgMfTqLAVHab56vdBwC9etYtUoUmQbXuGyX2YJ4VAAAAAAEMAAC9etYtUoUmQbXuGyX2YJ4VAAG6P0RHAAABEgAQAHEzH0vh9ktHu699h-lsLcc=","LastModifiedDateTime":"2024-05-08T14:31:59+00:00","Name":"Invoice-Sound-Engineering-JJ120.pdf","ContentType":"application/pdf","Size":55347,"IsInline":false,"ContentBytes":null}

TIA!

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,995 questions
Azure Startups
Azure Startups
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Startups: Companies that are in their initial stages of business and typically developing a business model and seeking financing.
240 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,011 Reputation points
    2024-05-09T05:23:45.8933333+00:00

    @Richard Jackson Thanks for reaching out.

    When you are using When a new email arrives (v3) action you can use the below configuration and in case if you are using different trigger then please let me know.

    I see that you have used the current item of the for loop, but you should use the Attachment Content.

    For each loop you should use the Attachments and make sure you have selected Yes to Include the attachments.

    User's image

    In case you are in general designer view:

    User's image

    User's image

    User's image

    In case if you need any assistance then please let me know.

    Please click on ''Yes" if it helped so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful