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.
To peek messages with advanced options, select Peek Mode in the Service Bus Explorer dropdown. Check the metrics to see if there are Active Messages or Dead-lettered Messages to peek and select either Queue / Subscription or DeadLetter sub-queue. Select the Peek with options button.
You could use the Azure Service Bus auto-forwarding feature to send all those messages from various their respective catch-all subscriptions to a single queue and listen to that queue. Using Functions or Logic Apps you would be able to respond to those messages and store their information in any datastore you'd like.
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.
Body info:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With