How to use Actionable Messages in Outlook with Power Automate

Use case

Power Automate makes it easy to send actionable messages to Microsoft Teams, but did you know it is possible to send an actionable message — and get a response — from a Power Automate flow in an email from a user account?

However, there is some additional setup required — if you don’t follow these steps then the moment you change the sender on the email to Send As an O365 Group for the email to come from then the email will be blank. This process will involve two flows: the first to send the actionable message and the second to receive the result. Read more here about how to set up this powerful scenario.

How does it work?

Step #1

Go to: https://outlook.office.com/connectors/oam/publish/.

There you will need to add the following information

  • The name of the provider
  • Sender email address: Add the emails that you are going to use to send the actionable messages (Include the email group if you want to use a group)

  • Target URLs: On this part, you need to create a flow like this and copy the URL that is generated after save the flow and paste it into the Target URLs

  • Scope of submission: Select Organization
  • Finally, the email of the person that is going to approve it. Normally, the Exchange Administrator

Now you can save the form and wait for the approval from your administrator.

Step #2

Now, in your flow that sends the actionable message you’re going to create the JSON Payload. It will need to have the following structure:

{
  "type": "AdaptiveCard",
  "body": [
    {
      "type": "Container",
      "style": "emphasis",
      "items": [
        {
          "type": "TextBlock",
          "text": "Quick Poll",
          "wrap": true
        }
      ],
      "padding": "Default"
    },
    {
      "type": "Container",
      "id": "d96d06ec-2a33-c8cc-4698-430ae87f772f",
      "padding": "Default",
      "items": [
        {
          "type": "TextBlock",
          "size": "Medium",
          "weight": "Bolder",
          "text": "Take 2 minutes to help us plan the upcoming conference",
          "wrap": true
        }
      ],
      "spacing": "None",
      "separator": true
    },
    {
      "type": "Container",
      "id": "885220a9-5ab1-95dd-5b66-20f42c452fa9",
      "padding": "Default",
      "items": [
        {
          "type": "TextBlock",
          "weight": "Bolder",
          "text": "Where should we host the conference?",
          "wrap": true
        }
      ],
      "separator": true,
      "spacing": "None"
    },
    {
      "type": "Container",
      "id": "10017c5a-5ee9-46c5-537a-bdd9ab61225c",
      "padding": {
        "top": "None",
        "bottom": "Default",
        "left": "Default",
        "right": "Default"
      },
      "items": [
        {
          "type": "Input.ChoiceSet",
          "id": "Options",
          "spacing": "None",
          "placeholder": "Where should we host the conference?",
          "label": "Where should we host the conference?",
          "choices": [
            {
              "title": "Radisson",
              "value": "Radisson"
            },
            {
              "title": "Hilton",
              "value": "Hilton"
            },
            {
              "title": "Sheraton Downtown",
              "value": "Sheraton Downtown"
            },
            {
              "title": "W Downtown",
              "value": "W Downtown"
            },
            {
              "title": "Clarks",
              "value": "Clarks"
            }
          ],
          "style": "expanded"
        }
      ],
      "spacing": "None"
    },
    {
      "type": "Container",
      "spacing": "None",
      "items": [
        {
          "type": "TextBlock",
          "text": "Other:",
          "wrap": true,
          "horizontalAlignment": "Left"
        }
      ],
      "padding": {
        "top": "None",
        "bottom": "None",
        "left": "Default",
        "right": "Default"
      }
    },
    {
      "type": "Container",
      "id": "3734939f-dd4d-79be-cf3c-2ad791f382ba",
      "padding": {
        "top": "Default",
        "bottom": "None",
        "left": "Default",
        "right": "Default"
      },
      "items": [
        {
          "type": "Input.Text",
          "id": "Suggestions",
          "placeholder": "Have another suggestion?",
          "label": "Other:"
        }
      ],
      "spacing": "None"
    },
    {
      "type": "Container",
      "id": "a27409f1-a48e-982f-8e26-594bdd1468e8",
      "padding": "Default",
      "items": [
        {
          "type": "ActionSet",
          "horizontalAlignment": "Left",
          "actions": [
            {
              "type": "Action.Http",
              "title": "Submit",
              "method": "POST",
              "url": "https://prod-00.westus.logic.azure.com:443/workflows/.... this is the URL that you took from the flow",
              "body": "{\"Option\": {{\"Options.value\"}}, \"SuggestionText\": {{\"Suggestions.value}}\"}",
              "headers": [
                {
                  "name": "Authorization",
                  "value": ""
                },
                {
                  "name": "Content-Type",
                  "value": "application/json"
                }
              ],
              "isPrimary": true,
              "style": "positive"
            }
          ]
        }
      ],
      "spacing": "None"
    }
  ],
  "$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
  "version": "1.0",
  "padding": "None",
  "originator": "75df... this ID can be taken from the form that you submitted"
}

Be sure to replace the URL and the originator from the form you submitted:

In the compose action you’ll paste the JSON Payload from the “actionable message designer”:

Next, you’ll add a second Compose action with this structure:

<script type=”application/adaptivecard+json”>”Compose output” </script>

Finally, In the send an email action, make sure you switch the option for HTML:

That’s it! You now have an actional message that can be sent and responded to.

Disclaimer

Since this is a sample, please make sure to customize it to your needs. Thank you!