When using Teams ‘Post adaptive card and wait for a response’ in PowerAutomate/LogicApps with a text box in the card, you may find the line break does not translate to an email as expected. For example:
Workaround
- Initialise a variable to the logic as a string type. In the value hit return to create a line break
2. Add a data compose action and select the dynamic context for the text box id
3. Add another data compose action and enter the following in the expression context making sure it matches your variable name from earlier
replace(outputs('compose'), variables('break'),'<br>')
4. Add the data compose into the email body to get the response text with line breaks
Line breaks show as they were typed from the card in the email alert.
That’s it!
PowerAutomate example
Latest Posts
Never miss an update: Azure Verified Modules with GitHub Bot & Teams
Getting started: Continuous deployment with Azure Bicep and Azure DevOps
Eliminate old API versions in your Azure Bicep templates