Search code examples
azureazure-logic-apps

Logic App to copy outlook attachment to Azure Blob Storage


I am creating one logic app and integrating with outlook mail account and Azure blob storage.

When I am selecting blob name as dynamically Attachment Name then a nested looped is created automatically, for each 1 and for each (Before few months, there was only one for-each getting created).

enter image description here

After that when I am sending mail, during triggering I am getting below error:

InvalidTemplate

Unable to process template language expressions for action 'For_each_1' at line '0' and column '0': 'The template language expression 'triggerBody()['value']' cannot be evaluated because property 'value' doesn't exist, available properties are 'Id, DateTimeReceived, HasAttachment, InternetMessageId, Subject, BodyPreview, Importance, ConversationId, IsRead, IsHtml, Body, From, To, Cc, Bcc, ReplyTo, Attachments'. Please see https://aka.ms/logicexpressions for usage details.'.


Solution

  • Logic App to copy outlook attachment to Azure Blob Storage

    I do agree with @Skin there is no need of two loops and To send Outlook Email Attachment to Blob, you can use below design:

    enter image description here

    Then( Get Attachment (v2) and Create blob actions):

    enter image description here

    Output:

    enter image description here

    Attachment sent to Storage Account:

    enter image description here