0

Using Logic Apps I am trying to copy blobs from one container into several separate dynamically created containers however there doesn't appear to be a "create container" action in Logic Apps.

I have tried using the "Create Blob" action with the desired container name specified as part of the "Blob Name" parameter however this fails with a 404 message.

{
  "status": 404,
  "message": "Specified container telemetery-30dfb0bd-73b0-42a3-8677-63bde2fd4b43 does not exist.\r\nclientRequestId: blahblahh-e60e-44e1-aec4-c32a21659257",
  "error": {
    "message": "Specified container telemetery-30dfb0bd-73b0-42a3-8677-63bde2fd4b43 does not exist."
  },
  "source": "blahblha-ne.azconn-ne-01.p.azurewebsites.net"
}

The original request is -

{
    "method": "post",
    "queries": {
        "folderPath": "/",
        "name": "/telemetery-30dfb0bd-73b0-42a3-8677-63bde2fd4b43/timeline,xml",
        "queryParametersSingleEncoded": "True"
    },
    "path": "/datasets/default/files",
    "host": {
        "connection": {
            "name": "/subscriptions/blahblah-6866-4c8c-b3f1-41039ad2b3eb/resourceGroups/RG-blahblahg/providers/Microsoft.Web/connections/azureblob"
        }
    },
    "body": "file content"
}

IS there a way to create a blob container us Logic Apps?

2 Answers 2

2

According to the documentation, there's no "create container" operation:

https://learn.microsoft.com/en-us/connectors/azureblobconnector/

What you can do is write an Azure Function and chain it as part of your workflow in order to create the container:

https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-dotnet#create-a-container

Sign up to request clarification or add additional context in comments.

5 Comments

Put in a feature request!
not sure why they didn't implement it yet... I am sure there must be a good reason for it
I've up voted an existing feature request at feedback.azure.com/forums/287593-logic-apps/suggestions/… M Chandler suggests that this can already be done, and his response is why I raised the question here, however I do wonder if he is confusing folders with containers.
he is...there's no support for creating containers at this moment
I used the Azure functions as recommended here, however it is a shame as I was hoping on moving the management of the process outside of development. However I found a few of these unsupported scenarios so I've rewritten the entire Logic App as functions.
2

For now there is no action to create blob container, you could implement it with azure function like Thiago proposed. Suppose you could use the rest api to do it. The below test use the sas token to do it you could try other authorize way.

enter image description here

1 Comment

that's interesting, did you use the "Get SAS Uri by path" connector to get the SAS uri for a container that doesn't yet exist?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.