Hi All, I'm trying to create a approval flow with the some dynamic changes using the adaptive cards Json schema, however im having a trouble to get the required output, where as while i send the same out put in normal out email which is send an email v2 action i get the output i want but not with the approvals why is it so ? is there some thing im missing or not able to convert the value properly?
Please find the screenshot of the email which i get when i run the flow .
Error: An email with Json content is being displayed
The flow run test:
Any help is appreciated by all you experts:
Thanks for the help and answers in advance.
Approval template only support Markdown.
More information is here-
https://docs.microsoft.com/en-us/power-automate/approvals-markdown-support
Thanks
Hardesh
As mentioned by @Hardesh15 you need to use Markdown.
If you want to use HTML the you need to Convert it into Text using "HTML to TEXT" action and then try to use.
I do not have your JSON so I tried with basic HTML.
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hey @Hardesh15
CSS will be a challenge.. I do not think CSS will be converted to text it will be stripped.
That being said, direct HTML will never work - I have voted for the Idea in the past https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Approval-Email-HTML-Instead-of-Markdown/idi...
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @CFernandes
Thank you for the solution is there any way we can display out of Json code?
Please see the code here below
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"speak": "<s>Flight KL0605 to San Fransisco has been delayed.</s><s>It will not leave until 10:10 AM.</s>",
"body": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "Image",
"size": "Small",
"url": "https://adaptivecards.io/content/airplane.png"
}
]
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "Flight Status",
"horizontalAlignment": "Right",
"isSubtle": true
},
{
"type": "TextBlock",
"text": "DELAYED",
"horizontalAlignment": "Right",
"spacing": "None",
"size": "Large",
"color": "Attention"
}
]
}
]
},
{
"type": "ColumnSet",
"separator": true,
"spacing": "Medium",
"columns": [
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "Passengers",
"isSubtle": true,
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "Sarah Hum",
"spacing": "Small"
},
{
"type": "TextBlock",
"text": "Jeremy Goldberg",
"spacing": "Small"
},
{
"type": "TextBlock",
"text": "Evan Litvak",
"spacing": "Small"
}
]
},
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": "Seat",
"horizontalAlignment": "Right",
"isSubtle": true,
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "14A",
"horizontalAlignment": "Right",
"spacing": "Small"
},
{
"type": "TextBlock",
"text": "14B",
"horizontalAlignment": "Right",
"spacing": "Small"
},
{
"type": "TextBlock",
"text": "14C",
"horizontalAlignment": "Right",
"spacing": "Small"
}
]
}
]
},
{
"type": "ColumnSet",
"spacing": "Medium",
"separator": true,
"columns": [
{
"type": "Column",
"width": 1,
"items": [
{
"type": "TextBlock",
"text": "Flight",
"isSubtle": true,
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "KL605",
"spacing": "Small"
}
]
},
{
"type": "Column",
"width": 1,
"items": [
{
"type": "TextBlock",
"text": "Departs",
"isSubtle": true,
"horizontalAlignment": "Center",
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "2:20 AM",
"color": "Attention",
"weight": "Bolder",
"horizontalAlignment": "Center",
"spacing": "Small"
}
]
},
{
"type": "Column",
"width": 1,
"items": [
{
"type": "TextBlock",
"text": "Arrives",
"isSubtle": true,
"horizontalAlignment": "Right",
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "8:20 PM",
"color": "Attention",
"horizontalAlignment": "Right",
"weight": "Bolder",
"spacing": "Small"
}
]
}
]
},
{
"type": "ColumnSet",
"spacing": "Medium",
"separator": true,
"columns": [
{
"type": "Column",
"width": 1,
"items": [
{
"type": "TextBlock",
"text": "Amsterdam Airport",
"isSubtle": true,
"wrap": true
},
{
"type": "TextBlock",
"text": "AMS",
"size": "ExtraLarge",
"color": "Accent",
"spacing": "None"
}
]
},
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": " "
},
{
"type": "Image",
"url": "https://adaptivecards.io/content/airplane.png",
"size": "Small"
}
]
},
{
"type": "Column",
"width": 1,
"items": [
{
"type": "TextBlock",
"text": "San Francisco Airport",
"isSubtle": true,
"horizontalAlignment": "Right",
"wrap": true
},
{
"type": "TextBlock",
"text": "SFO",
"horizontalAlignment": "Right",
"size": "ExtraLarge",
"color": "Accent",
"spacing": "None"
}
]
}
]
}
]
}
@Tapesh This looks like Adaptive card, so I assume the Parse JSON and then create an HTML body will not work.
You might be able to Convert JSON in HTML using the "HTML to Text" action but I am sure the result will not be pretty.
User | Count |
---|---|
27 | |
14 | |
12 | |
9 | |
9 |
User | Count |
---|---|
50 | |
30 | |
27 | |
24 | |
20 |