Azure Logic App service bus message content

2019-05-15 22:10发布

I have logic app that is triggered by a service bus. The message content is not usable as it is just random characters. I suspect that perhaps it needs to be parsed but it is not clear how to do this.

I have the following: Not enough reputation to add an image - but screen shot from Azure

 "Insert_Entity": {
            "inputs": {
                "body": {
                    "PartitionKey": "deviceID",
                    "RowKey": "@variables('curDate')",
                    "content": "@triggerBody()?['ContentData']"
                },

When I look at the data that I am getting for the "content" coming from the "@triggerBody()?['ContentData']" it looks like this:

"W3sidHlwZSI6ImxvZyJ9LF...." I deleted most of this as it 100's of characters long.

I suspect that this needs to be parsed or something to look at the actual message body. I have checked this out but don't know where to insert code like this: Getting content from service bus in logic apps

Can you please explain how to see the message body.

1条回答
神经病院院长
2楼-- · 2019-05-15 22:27

Can you please explain how to see the message body.

The string W3sidHlwZSI6ImxvZyJ9LF.... you mentioned is base64string. If we want to see the message body we need to convert the base64string to string

We could do that with base64ToString(triggerBody()?['ContentData']) details please refer to the screenshot.

enter image description here

Body info:

enter image description here

查看更多
登录 后发表回答