Search code examples
azureazure-storageazure-logic-apps

How to check if a container exists, and if not then create one


I am trying to design an Azure logic app that will connect to my FTP server and upload my files to a blob (or container, not really sure how the hierarchy works) whenever a file is added to my server. I have folders in my server by date (01-22-2018) etc. and I would like to bring this structure over to my Azure storage.

Is there a way to check if a blob/container exists, and if it doesn't then create one?

For example: I might not have a 01/24/2018 blob/container in Azure, but I want to check if it exists. And if it doesn't, then create it and store those files.

Thanks in advance, and I'm sorry if this is not the correct place to ask this.


Solution

  • The easiest way is have an Azure Function that returns if the container exists.