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 Automate / Adaptive cards in Outl...
Power Automate
Unanswered

Adaptive cards in Outlook: problem with html passed to refresh the card

(0) ShareShare
ReportReport
Posted on by 304

Hello,

I'm playing with adaptive cards and actionable messages in Outlook; I created 2 flows: one that fill the adaptive cards with data stored on a SharePoint list, the other flow refresh the card when a user click a button inside an email.

 

What I want to do is send an email with some formatted text and get a response from colleagues who have read the email by clicking on the button in the adaptive card; also, the "refreshed" card, has the same template of the original one, what changes is that there is no more the OK button but a simple thank you message.

 

I created a SP list with a Title (text), Message (Rich text, because I want a formatted text), Colleagues (text, filled with email address of my colleagues).

 

Adaptive Cards Flow.png

 

I created a simple flow that fill the adaptive card with previous data; I have to use some trick because in adaptive cards textblock accepts plain text, so I have to convert the html to text; I also created an inuput text control, set visible to false, and copied the original message (in html): I have to do this because to have the original formatted text in the response adaptive cards, you must pass the html formatted text via action.http body; so, I have an input text block like this:

 

"type": "Input.Text",
"id": "mailTextCopy",
"placeholder": "Enter text here",
"isVisible": false,
"isMultiline": true,
"value": "@{triggerOutputs()?['body/Testo']}"

 

"Testo" is the Message in html, and then the action when a people click the button

 

 "type": "ActionSet",
 "id": "c8a5ba7e-7ec6-53ae-79da-0cfb952a527e",
 "actions": [
 {
 "type": "Action.Http",
 "id": "550de7e9-d8a1-2281-feaa-29984c49c833",
 "title": "OK",
 "method": "POST",
 "url": my_flow_url,
 "headers": [
 {
 "name": "Authorization",
 "value": ""
 },
 {
 "name": "Content-Type",
 "value": "application/json"
 }
 ],
 "style": "positive",
 "isPrimary": true,
 "body": "{\n\"mail\":\"{{mailTextCopy.value}}\"\n}"
 }
 ]

 

When I execute the flow, I see this as value of @{triggerOutputs()?['body/Testo']} in the compose connector that creates the adaptive cards payload:

 

<div class=\"ExternalClass2913A154938749379EDA663D038287B4\"><div style=\"font-family&#58;Calibri, Arial, Helvetica, sans-serif;font-size&#58;11pt;color&#58;rgb(0, 0, 0);\"><span style=\"color&#58;black;\">​Hello,<p>this is a simple test to show what is added to html when passed in the response flow to update the card.</p><p><br></p><p>--</p><p>Thanks,</p><p>Marco</p></span><br></div></div>

 

but when I click on the submit button with the action.http I see on the second flow, that simply starts with an http connector, that the html changes in something like this:

 

<div class=\"ExternalClass2913A154938749379EDA663D038287B4\"><div style=\"font-family&#58;Calibri, Arial, Helvetica, sans-serif;font-size&#58;11pt;color&#58;rgb(0, 0, 0);\"><span style=\"color&#58;black;\">?Hello,<p>this is a simple test to show what is added to html when passed in the response flow to update the card.</p><p><br></p><p>--</p><p>Thanks,</p><p>Marco</p></span><br></div></div>

 

As you can see, I don't know why but attacched to the word "Hello" there is a question mark. The second flow has a structure like this:

 

Adaptive Cards Flow Handler.png

 

Any idea?

 

--

Regards.

Categories:
I have the same question (0)

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard