0

I'm storing blobs in an Azure storage account from a Logic App. I also want to set some metadata for each blob as I'm saving it.

I can recall blob metadata from a logic app, but I cannot see a way to set it.

There is no documentation I can find and no examples to try.

Surely there must be a way to assign metadata to a blob from a logic app?

Damo
  • 1,898
  • 7
  • 38
  • 58
  • From what I know you cannot do this using the standard Logic app connector. You can however do this while writing the blob using Rest api. You can also use the rest API to add new meta data on an existing blob, so you can add that as part of your Logic app workflow. – Anupam Chand Jul 06 '23 at 04:34

1 Answers1

0

How to set blob meta data from Azure logic app

You can use http request in Logic APP to use Rest Api as below:

Rest api:

https://myaccount.blob.core.windows.net/mycontainer/myblob?comp=metadata

enter image description here

For authorization with Shared Key.

There is no direct connector for setting metadata, but you have a connectot to get the metadata in Logic apps.

RithwikBojja
  • 5,069
  • 2
  • 3
  • 7
  • Have you tested your answer because it’s not that simple. The shared key needs a signature constructed using a SHA256 algorithm … https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key#constructing-the-signature-string – Skin Jul 06 '23 at 08:50
  • Skin, yes shared key needs **SHA256 algorithm**. @Damo, [this](https://stackoverflow.com/questions/75018932/getting-azure-blob-properties-via-rest/75028984#75028984) is one example which uses **HEAD**, Operation, similar way you can do for put and yes, This is **COMPLEX** and this is one of the alternative to add metadata – RithwikBojja Jul 06 '23 at 10:14
  • @RithwikBojja thanks. I'll test this over the weekend. – Damo Jul 07 '23 at 10:30
  • @Damo Sure...... – RithwikBojja Jul 07 '23 at 10:32