
Announcements
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).
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:Calibri, Arial, Helvetica, sans-serif;font-size:11pt;color:rgb(0, 0, 0);\"><span style=\"color: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:Calibri, Arial, Helvetica, sans-serif;font-size:11pt;color:rgb(0, 0, 0);\"><span style=\"color: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:
Any idea?
--
Regards.