question

itmandan-4642 avatar image
0 Votes"
itmandan-4642 asked itmandan-4642 commented

Adaptive Card Response & Email Line Breaks

Hi,

I have a 'Post adaptive card and wait for a response' 128725-2021-09-02-12-18-13-designer-adaptive-cards-mozill.png


After the text field has had some text input & submitted I am trying to get the flow to then email a teams channel the response. My issue is that the email will display all the text on the same line, not with it's line break from the input text field.

E.g. rather than displaying like:

New release:
Bug fix v1
Improvments to XYZ
Performance enhancements

It'll show that all on one line when the email is sent.

I've tried various ways using compose to try and add <br> or use a teams message instead but it's the same result. I could seperate the card text field out and that would probably work, but for my use case I just want one text field when it's sent for them to fill out

128674-2021-09-02-12-25-01-window.png

Any ideas?


azure-logic-apps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered itmandan-4642 commented

@itmandan-4642 Apology for the delay in reaching out. I believe you might have already found the answer but posting the answer for other facing the similar issue.
It depends upon how your inputText looks like. For newline you should use <br /> in your input text so it is formated correctly in the next line. For the testing I have define the variable for my input in the below workflow. You can verify the output of your Post adaptive card and wait for a response action and if the entered text have \n for next line then you can use replace to replace the \n with <br />

Your input text should be :
New release: <br />Bug fix v1 <br />Improvments to XYZ <br />Performance enhancements <br />

131498-image.png

Alternative you can enter your text in body as below and navigate to Code View to get the exact formated string.

131468-image.png

131469-image.png

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.


image.png (26.9 KiB)
image.png (10.4 KiB)
image.png (10.7 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MayankBargali-MSFT

Thanks for your response. I actually ended up using the replace function with a guide like so: https://tomriha.com/how-to-replace-new-line-n-in-a-power-automate-expression/

Thanks for your reply

1 Vote 1 ·