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

Community site session details

Session Id : GNVtTTwGd/iMzl2+871zFz
Power Apps - Building Power Apps
Answered

PowerApps connection with EventHubs

Like (1) ShareShare
ReportReport
Posted on 17 Dec 2020 09:55:17 by

I have added Azure EventHub Connector to the PowerApp. 

How can I send and receive events? 

I found this, https://www.carlosag.net/PowerApps/Connectors/Event-Hubs

How can these methods be used?

  • Community Power Platform Member Profile Picture
    on 07 Nov 2022 at 14:32:54
    Re: PowerApps connection with EventHubs

    It would be amazing if you can explain this! @poweractivate â€Śâ€Śđź™Ź

  • DrEsteban Profile Picture
    Microsoft Employee on 05 Mar 2021 at 07:49:56
    Re: PowerApps connection with EventHubs

    @poweractivate  Can you please provide a full example of how you loaded data into the PDF Viewer, then pulled it out again for use with the Event Hub connector? (As Blob format.) For example, if I have a JSON string I want to send to Event Hub, what is the full E2E for doing that?

  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on 20 Dec 2020 at 15:56:54
    Re: PowerApps connection with EventHubs

    @Anonymous 

     

    We had some time to make the test with a full Event Hub Namespace with an Event Hub in it, and using this from a sample Power Apps Canvas App.

     

    After a full test, we find that we can send event successfully from Power Apps Canvas App to the Event Hub like this:

     

     

    EventHubs.SendEvent("instanceeventhubpowerusersdemo1",{partitionKey:0,ContentData:SamplePdf})

     

     

    In fact, only ContentData is required for SendEvent (partitionKey is only required with SendEvents)

    We can simplify the above to:

     

     

    EventHubs.SendEvent("instanceeventhubpowerusersdemo1",{ContentData:SamplePdf})

     

     

    The ContentData must be provided and it must be of data type Blob when sent from Power Apps. So how do you send a Blob out of Power Apps Canvas App? Well, Power Apps has an easy way to simulate a Blob, and that is from a SamplePdf Blob data type that comes included with the PDF Control. Other than this, a Blob may need to be constructed using a value from Power Automate. Other than the potential of using a value from the PDF Control to have a Blob type, we are not sure of another way to construct a Blob data type besides perhaps specifically returning a value using Power Automate that would be interpreted by Power Apps as a Blob data type, and having that called from the Power App (Note that as of this writing, there is no such thing as a native "Blob" function in Power Apps that could convert some other kind of value to a"Blob" data type)

     

    Check example below and network response, and evidence it worked in the Event Hub.

     

    successblob101.gif

     

     

    Check if the above helps @Anonymous 

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on 17 Dec 2020 at 10:22:15
    Re: PowerApps connection with EventHubs

    @Anonymous 

    We may have been able to achieve this before actually, but we might have to do a deep check on the answer.

    We might have to make a full test about this, and then let you know after a while.

     

    We can find many on this topic:

    [EventHubs]: Need assistance while sending data from PowerApps to Event Hubs

    How to send data from apps to Azure eventHub  
      Sample code for EventHub.SendEvent 

     

    However, it seems all of them do not have any answer there.

    Also, in the conceptual level, a generic answer like to say use a Record, etc. seems like it would not suffice here.

    It is a very specific syntax, we would have to do a deep check how we might have gotten it to work before this SendEvent, and also, test this now to make sure this way still works.

     

    In our case, this may take some time, as we may not be able to perform this kind of test right away right now.

     

    So we would also kindly ask the community, if someone else knows how to do this specifically, please go ahead and reply with the answer. 

     

    If there is no reply here after a while, we might come back and check here, time permitting of course.

  • Community Power Platform Member Profile Picture
    on 17 Dec 2020 at 10:11:09
    Re: PowerApps connection with EventHubs

    @poweractivate 

     

    How do I use the SendEvent method, from the official documentation I get this

     

    KeyType
    eventHubNamestring
    ContentDatabyte
    partitionKeystring

     

    Can you help with some sample parameters?

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on 17 Dec 2020 at 09:58:58
    Re: PowerApps connection with EventHubs

    @Anonymous 

     

    Use this official documentation instead:

     

    https://docs.microsoft.com/en-us/connectors/eventhubs/

     

    and also, you use it by using them in Formulas. 

     

    For example, OnNewEvents becomes available for use as a Function in a formula, and so forth, of course, presuming the Azure Event Hubs Connector was indeed added to the App.

     

    Check if this above helps.

     

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete