Hi,
I'm trying to send a simple test message to Azure Servive Bus queue from PowerApps, but I'm having problems with Properties -table syntax.
AzureServiceBus.SendMessage("tilastointiqueue"; {
ContentData:"Some text";
ContentType:"String";
ContentTransferEncoding:"base64";
Label:"Heading";
Properties:Table( {Name:"name1", Value: 1},{Name:"name2", Value:2} )
} )
Error says that Column with type Text is missing, but I can't find a way to fix it.
I am able to send the message to queue without Properties-parameter, but the ContentData doesn't seem to be transferred with the message since the Message Text is empty.
Has somenone send messages to Service Bus queue succesfully?
You can send custom properties in a Power Apps Service Bus connector SendMessage call using the Properties parameter. The Properties parameter takes a Table with specific rows of key and value pairs.
I didn't find the ContentData parameter well documented. In my testing it takes a data URI string value with mandatory base64 encoding. Unfortunately there is no built in way to base64 encode in a canvas Power App. If the parameter value isn't properly formatted the resulting Servivce Bus queue message will have an empty ContentData value. Below is an example that sends a new message to the queue, setting the broker property: Label, and three custom properties, along with the text "Hello world!" in the ContentData parameter.
Example:
ServiceBus.SendMessage("p1imagecaptureevents",
{ContentType:"text/plain"
,Properties:Table (
{key: "Label", value: "labelvalue2"},
{key: "myFirstFieldName", value: "'My first field's value8'"},
{key: "mySecondFieldName", value: "My second field's value5"},
{key: "myOtherFieldName", value: "More values5"})
,ContentData:"data:text/plain;base64,SGVsbG8gd29ybGQh" // "Hello world!" base64 encoded text
})
@wjhepworth Very scientific! Have you had any success parsing out the Properties parameter within Logic Apps? Specifically the table values that can get passed in using the "key & value" format you provided. I have not had any success with it myself, so far.
Thanks --SP
Honestly, it was a case of researching and experimentation and asking myself reallly exactly what the error messages meant. There was all kinds of documentation talking about the fact that the Properties attribute existed but none specifying was would go in there. Turns out I kept getting and error message saying it was missing 'key' and 'value' fields. At first I converted my initial appraoch to just repeat rows with Key / Value paires thinking that would work. When it still guessed they were case sensitive on those fields and sure enough that worked. Glad it helped.
@wjhepworth I am super grateful for your response. It worked for me. Curious, where/how did you find-out that it is required to pass the table in this format?
So I encountered this recently and have a few notes in case anybody needs them. They don't appear anywhere else it seems.
First, if you are trying to pass JSON it may be easier to go with the Properties parameter which is reflected on the Service Bus trigger's UserProperties when the Service Bus listener picks it up on the other end. The trick is, the Table that it expects must be in the form of:
Table (
{key: "myFirstFieldName", value: "My first field's value"},
{key: "mySecondFieldName", value: "My second field's value"},
{key: "myOtherFieldName", value: "More values"}
}
The trick is.. there must be two fields and both in lower case: 'key' and 'value'. If not you will get a cryptic message (though truthful) that you are missing a column 'key' of type Text. I didn't see this in any documentation so thought I would share.
Hi @Anonymous,
Thanks for the update and sharing.
Regards
This issue was caused by my language setting (Finnish). Sending message with Properties-table to Azure Service Bus queue works fine, after changing my language to English.
Hi Pia,
I wll try to find someone who is familiar with this to take a further look.
There might be sometime delay before sharing the results.
Appreciate your patience and understanding.
Regards
WarrenBelz
89
Most Valuable Professional
MS.Ragavendar
58
Michael E. Gernaey
42
Super User 2025 Season 1