Custom Actionable Messages with Microsoft Flow – part 3 – Adaptive Cards, update cards and required fields

This is part 3 of the Custom Actionable Messages with Microsoft Flow series

A few months ago, I wrote about Custom Actionable Messages with Microsoft Flow in a two part blog series. There have been some changes regarding Actionable Messages and some new insights I have gained that I want to inform you about.

Action Card deprecated

First of all, the Action Card I referred to in my posts is now deprecated. You can still use them, but they are not supported anymore. I recommend you use Adaptive Cards from now on. More information can be found at this Dev Center article. The main changes are as follows:

  • The JSON for an Adaptive Card is different from an Action Card. The differences are:
    • “$schema”: “” has been added.
    • “version”: “1.0” has been added.
    • “@type”: “MessageCard” has been changed to “type”: “AdaptiveCard”.
    The MessageCard Playground is updated to V2 to use the Adaptive Card format, but you can also use the new Adaptive Cards Designer which provides more intuitive design options. I recommend using the new Adaptive Cards Designer
  • The <script> tag that is used in the HTML body of your email has been changed from <script type=”application/ld+json”> to <script type=”application/adaptivecard+json”>.


The HTML body (including JSON and Dynamic Content) I used will generate the email below:

More information on composing your HTML can be found in Part 1 of this blog series.

Refresh Adaptive Card 

Another thing I’ve learned is that you can update your Adaptive Card after the user has completed the assigned task using the Refresh cards mechanism. The Microsoft documentation isn’t quite accurate on this, but thanks to Stefan Strube I’ve figured it out.

There are a few steps involved to get this working:

  1. Register your Actionable Message in the Actionable Email Developer Dashboard:
    • Click on + New Provider to add a new provider to the dashboard
    • On the next page, enter a Name for your Actionable Message
    • Enter the Sender email address from which the message will originate
    • Enter the Target URL, which is the Flow HTTP Endpoint of your ‘When an HTTP request is received’ trigger
    • Select the Scope of submission (for this blog I used the My Mailbox option)
    • Add a logo (optional)
    • Accept the terms and conditions and click Save
  2. Add the value from the Provider Id (originator) field to the originator attribute in your JSON, as follows:
    "originator": "ProviderId",
  3. Generate a new Adaptive Card using the Adaptive Cards Designer (or just update your existing Adaptive Card) that must be shown after a user has completed the assigned task. Don’t forget to add the originator attribute here as well.
  4. Add the JSON to your second Flow that processes the outcome of the request. Please note that you don’t need to wrap your JSON inside an HTML <script> tag. If you do wrap your JSON inside a <script> tag, your Flow will fail!
  5. Add a Response action (from the Request connector), set the Status Code to 200, add the following Header: CARD-UPDATE-IN-BODY: true and add you JSON to the Body of the action.

That should do it, now when the user completed the assigned task, the Adaptive Card will be updated:

Required output

With Action Cards, you could set the isRequired property on a textbox to true to make it required. Unfortunately, in the current version of Adaptive Cards it’s not possible to make a textbox required. Luckily, with the same mechanism as you refresh your Adaptive Card, you can make your textboxes required.

First of all, you must add a Condition into your Flow that checks if the regarding textbox is empty with the following expression:

empty(triggerBody()?’comments’ is equal to true

I also added the check if the outcome is Rejected, because I only have a textbox when Rejected has been selected.

If the condition is met, your Flow should respond to your Adaptive Card using the Response action again. Only this time, the Status code shouldn’t be 200 since that is the OK code. I use the 406 code which is Not acceptable. You should also add the following Header: CARD-ACTION-STATUS: <your error text>. After the Response action, you must add a Terminate action to make sure your Flow doesn’t run any further.

That should do it. When the user doesn’t fill in the required text box, an error message will appear:

The entire Flow ‘chain’ is as follows:


38 Replies to “Custom Actionable Messages with Microsoft Flow – part 3 – Adaptive Cards, update cards and required fields”

  1. Hi Rik De Koning,
    I tried to use the Action.Htttp type in adaptive cards designer, but getting the error as “[Error] Unknown action type: Action.Http. Fallback will be used if present.”.
    As mentioned over the link below the supported types are Action.OpeUrl, Action.Submit, Action.ShowCard and Action.ToggleVisibility. Please guide me how we can use the Action.Http. I am trying to use in Team Flow, to update the card after HTTP response.

  2. Thanks for your series of blog posts. I was stuck for a long time with the formatting of the body attribute of the Action.Http action and your guide helped me get past it.

    There’s really very little documentation about that online so well done for figuring it out, and thanks for sharing!

  3. I was able to successfully get my card to refresh after the user approves the message (very useful stuff). It would be really useful if that card would also update accordingly in any other inbox it might be residing. For example, if you have two time approvers and you want the card to go to both, but either can approve or deny the request. The card should change in both locations as soon as one decision is made.

    It’s clearly something that is possible as I noticed the built-in Flow approvals work that way. It looks like the AutoInvokeAction would be the way to accomplish this, but I’m struggling to get it to call back to my Flow webhook. Here is the link to the documentation about that property:

    Rik, have you had any experience getting that property to work? I see very little documentation or forum posts about this, so I’m kind of stuck at this point.

    1. Unfortunately, I have not tried the method you described so I cannot help you at this point with this. Maybe I can find some time in the near future to play around with the AutoInvokeAction. I will let you know then!

  4. How the hell do I add the originator in the code, why don’t you explain it more specifically? !!!!!!!!!!!!!!!!

    1. Thank you for your constructive feedback and your friendly voice.
      For the originator parameter, you use the provider id that was generated from the new provider you added in the Actionable Email Developer Dashboard. Hope this is specific enough for you

      1. hahaha, excellent response.

        Rik, I still have an issue with this and what the purpose is.

        I assume this step is specifically meant for the response back that would go in the JSON for the HTTP request received right?

        Outside of this issue, I have a major issue that I am REALLY struggling to figure out. I have the following scenario and I am hoping you can help:
        -My actionable card shows perfect when sent to me(from me). When sent to anyone else, it shows simply the html. Is this due to the registration as well?

        1. You can ignore my previous comment. I figured it out.

          I had to add the node into the ORIGINAL JSON.
          It looks similar to this:

          “type”: “AdaptiveCard”,
          “originator”: “<replace with ProviderID.",
          "version": "1.0",
          "body": [

  5. Hi, I am able to trigger second flow from my actionable message. But not able to get back response on my actionable message. Can you share your compose updated JSON. So i can check.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.