Azure Logic App Get Blob Metadata issues

Amerman, Richard 6 Reputation points

In an Azure Logic App I'm finding files older than a given date in a file storage account and copying them over to a different block blob storage account.

The copy is working fine.

This is my action chain for that:
File: Get file content > Blob: Create block blob (V2)

At this point I'm trying to take the output of the create action and use Blob: Get Blob Metadata (V2) to verify that the file is indeed actually there.

When I am putting something in the Blob field of the Get Blob Metadata action the only options that come up in the list are from the files steps, no usable output from the Create block blob step.

It is my rough understanding that the next action will not even execute if the previous action fails, but this is too important not to do a hard verification. My next step will be deleting the original file so I need to get this right!

Considering that my whole intent is to hard verify that the Blob: Create block blob (V2) step created the file, what are my options?


Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,935 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 69,846 Reputation points

    @Amerman, Richard Please confirm if my understanding is correct.
    Trigger --> Get all file in container (List blob (V2)) --> Check for all files if it is older than your created date --> if True then Create the file to another storage contanior --> Once the above action is sucessful delete the file from old storage account containor.

    The List blob (V2) and Get Blob Metadata (V2) returns the same returns the same BlobMetadata (list blob action having the list of blobmetadata whereas Get Blob Metadata returns only one blob blobmetadata). BlobMetadata doesnot return the CreatedDate of the blob but has the LastModified property. In case if you want CreatedData then unfortunately it is not supported and you cannot use it in your worflow.

    But in case if you want to proceeds with the LastModified property then you use condition to to check with your input value. If it is true then only proceeds with the Create Blob and the next action will be Delete Blob (v2) to the delete the file. Condition are used in logic app so in case if your action could fail in certain conition/senario. There is no way to execute the next action if any of your existing action/trigger fails.

    If you want to leverage CreatedDate then you need to use Azure Storage REST API with the HTTP action to get this data as unfortuenatley the storage connector doesnot return this field.

    1 person found this answer helpful.