Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Logic Apps - Get Blob Content - Setting Content type

The Azure Logic Apps action "Get Blob Content" doesn't allow us to set the return content-type.

By default, it returns the blob as binary (octet-stream), which is useless in most cases. In general it would be useful to have text (e.g. json, xml, csv, etc.).

I know the action is in beta. Is that on the short term roadmap?

like image 688
Vincent-Philippe Lauzon Avatar asked Dec 10 '22 11:12

Vincent-Philippe Lauzon


1 Answers

Workaround I found is to use the Logic App expression base64ToString.

For instance, create an action of type "Compose" (Data Operations group) with the following code:

        "ComposeToString": {
            "inputs": "@base64ToString(body('Get_blob_content').$content)",
            "runAfter": {
                "Get_blob_content": [
                    "Succeeded"
                ]
            },
            "type": "Compose"
        }

The output will be the text representation of the blob.

like image 50
Vincent-Philippe Lauzon Avatar answered Jan 12 '23 13:01

Vincent-Philippe Lauzon