Power Automate - "Loading" message for Adaptive Card?

Options

I have an adaptive card that creates a custom Tile summarizing a constituent's annual fund giving over the past few years. It takes some time to run, so the Tile doesn't appear for a while. Is there a way to initialize the adaptive card and get the Tile to show up with a “Loading…” message, then update that message with the final response?

Comments

  • Hi @Ryan Carr,
    This is a really good question! I don't think there is a way to do this at the moment unfortunately. The Adaptive Card Host SPA will make a call to the service URL you configured to fetch the card definition, and the card won't show until the response is returned.

    One (admittedly imperfect) workaround you could try would be to use a “multi-card” approach, where your flow returns a very simple initial card that just contains an action button. That action would call a 2nd flow that builds the actual card with the summary details, and the resulting card would replace the initial simple card. This technique is described in more detail here:

    Introducing Multi-card Interfaces with Adaptive Cards - Blackbaud Community

    I have a few ideas for how Blackbaud could enhance the Adaptive Card Host SPA to show an initial card with “Loading…” - I'll put some thought into that.

  • @Ben Lambert That is what I expected when I kept trying to have two Response actions in my flow, it went nowhere! I would hate for the user to have to click a button to run the second flow, do you think there is a way to automatically trigger the second flow after the first flow ran? Thank you for your insight!

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Ryan Carr
    if you want to use Adaptive card, then yes, you can use the multi-card interface. I have a template on this that uses one flow instead of multiple flow: https://community.blackbaud.com/forums/viewtopic/586/69847 (this template can be found in template showcase, search AIAC will find it: All-Inclusive Adaptive Card)

    So you can have a simple display like:

    c70101464b2451d257b03f7a69efddfe-huge-im

    When the button “Load Giving Trend” is clicked on, then it will call the flow again and do all the “work” that takes time and when done, will display the real stuff.

    This is good especially when you know the “loading” takes time. Your staff is using RE NXT daily and opening many constituent records, 90% of the time, they are likely not going to the constituent page to see the giving trend, and if it always load, you are wasting API quota and also performance hit on your flow.

    If you really don't want a “click to load”, then Adaptive card isn't right for you. You can consider using AIO (All-In-One) custom tile by Glen

  • @Alex Wong This is good to know, you make a good point about not wasting the load effort if they don't want to see that data.

    Where is this AIO custom tile by Glen, I would be curious to see it!

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Glen Hutson can provide some info

  • @Alex Wong just a point of clarification, if you are using the official certified Power Automate connectors, then there is no quota applied. Connectors are power-user/citizen-developer facing and don't require a developer account or API key. Rate-limit throttling is also slightly different (another advantage to using the certified connectors).

    That said, your points about performance and the user experience are spot on.

  • @Ryan Carr My idea (mentioned below) for enhancing the Adaptive Card Host SPA would be something like this (and would require Blackbaud to implement it):

    • Blackbaud add support for a new optional query parameter, &showLoading=True to the configuration URL.
    • When present, the Host SPA will immediately show a (default) card with a “Loading…” message (and thus, the add-in will be immediately visible)
    • The Host SPA will then call the cardServiceUrl (your flow) to fetch the card definition (which may take some time)
    • When the card definition is returned, it replaces the initial default card shown.

    This would allow you to achieve the user experience you want and you wouldn't have to build 2 flows (one for the default card, and one for the “real” card).

    (you'd still want to evaluate whether that is actually a good user experience in your scenario though)

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Ben Lambert
    I had a suspecion that is the case, but didn't want to say anything lol.

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Ben Lambert
    Great ideas @Heather McLean maybe can help drive it?

  • Glen Hutson
    Glen Hutson Blackbaud Employee
    Ancient Membership 100 Likes 100 Comments Name Dropper

    @Ryan Carr:

    @Alex Wong This is good to know, you make a good point about not wasting the load effort if they don't want to see that data.

    Where is this AIO custom tile by Glen, I would be curious to see it!

    Check out https://community.blackbaud.com/forums/viewtopic/586/60171 that has a few examples about creating custom tiles based on information already in RENXT. These use the “All In One” Approach that doesn't involve Adaptive Cards. These were either created before heavy use of Adaptive Cards or included a few more complex elements that ACs weren't able to handle at the time. Some of these are technically no longer needed anymore once the native versions were added, but still kept as examples for other scenarios. The post links to my GitHub that has a number of additional examples I've posted.

  • @Ben Lambert
    I don't think this will work for Ryan, but I chose to use an button for our service request add-in because of the tile loading every time someone opens a constituent record. It would be nice if the add-in would not call the flow unless the tile is expanded/opened.

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Hallie Guiseppe
    depends on use case and what you intent for the “tile”.

    Power Automate is perfectly able to handle volume. I have the Constituent tile for Giving Society

    598ee8f69dd69dced24669287e58ef3e-huge-im

    Over last 30 days, there are 23,430 runs of the flow. Average out just under 800 per day, no issue at all.

    A few things to limit tile load:

    • user restriction
      • not all user can/should have access depending on function of the tile, if no access, don't Response with an Adaptive Card and just terminate (success)
    • constituent vs non-constituent.
      • not all tile functions will apply to both, usually constituent only.
      • at early steps, condition on if the record_id is a constituent or non-constituent record, if not the type to display the tile, you dont' need to return a Adaptive Card JSON and terminate the flow (success termination). This will avoid the tile to even come up on non-constituent spouse, relationship, event participant page
    5817f831a326288e9dc3f60a6f95e9ab-huge-im
    • if you are to display, dont' do too much, consider how many action and SKY API calls you are going to make to display the adaptive card. There is one generally rule for myself, no Apply to Each. Generally you should be able to most without using Apply to Each (i.e. using Filter Array, join() expression, etc)

  • @Alex Wong
    Very clever, Alex! This will be incredibly helpful when I finally get the time to create a “relationship” tile for our non-constituents. I’ve always found it frustrating that non-constituent records don’t indicate which constituent record they’re tied to, so creating a tile to display that information has been on my to-do list for a while.

    I’m also very interested in learning more about how to limit which users can load a tile. So far, all the add-ins I’ve created use validation set to "anyone," and I simply control access by restricting who can access the URL that loads the page. It would be great if you could consider demonstrating how to limit this more effectively at the next Power Automate user group meeting—I'd really appreciate it! ?

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Hallie Guiseppe
    the next user group is quick some time away, so i won't remember, you can bring it up at the user group and I can talk about it.

    or @Erik Leaver maybe you can directly add it as an agenda item, and i'll talk through it.

Categories