web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Problem sending messag...
Power Apps
Unanswered

Problem sending message to Azure Service Bus queue

(0) ShareShare
ReportReport
Posted on by

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?

 

 

Categories:
I have the same question (0)
  • v-micsh-msft Profile Picture
    on at

    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

  • Community Power Platform Member Profile Picture
    on at

    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.

  • v-micsh-msft Profile Picture
    on at

    Hi @Anonymous,

     

    Thanks for the update and sharing.

    Regards

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    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.
     


  • Community Power Platform Member Profile Picture
    on at

    @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?

  • Community Power Platform Member Profile Picture
    on at

    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.

  • Community Power Platform Member Profile Picture
    on at

    @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

  • Community Power Platform Member Profile Picture
    on at

    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
    })

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard