cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Create an Approval action - Formatting disabled for the Adaptive Card details when used with Teams

When using the "Create an approval" action, you can add text in the Details field. When you send its adaptive card to Teams with the "Post your own adaptive card as the Flow bot to a user" action, that text removes any line breaks.

 

E.g. Details field in the "Create an approval" action has:

"Line 1

Line 2"

 

Then the adaptive card in Teams will have it as:

"Line 1 Line 2"

 

I'm still getting familiar with JSON. Can any formatting be added to the Details field text? Or can the Adaptive Card be edited through a different action?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Re: Create an Approval action - Formatting disabled for the Adaptive Card details when used with Teams

Hello @MateiC 

I just now tested this and it works for me.

I created an approval action

Flow.Approval.InTeams.0.pngIn the details I used the markup formatting to add 3 lines.

This is line 1 + two newlines + This is line 2 + two newlines + This is line 3

 

After that I created the action to post an adaptive card as the Flow bot to a channel.

 

The results are:

 

Flow.Approval.InTeams.1.png

 

The approval is posted in the channel.

 

The approve button is highlighted as my mouse cursor is hovering over it (can't see the cursor).

 

The 3 lines are nicely there.

 

Hope this helps you 🙂

Kind regards, John

View solution in original post

4 REPLIES 4
Highlighted
Super User II
Super User II

Re: Create an Approval action - Formatting disabled for the Adaptive Card details when used with Teams

Hello @MateiC 

In the approval action, you have to use markdown formatting. HTML does not work there.

Please read about the markdown formatting options:

https://docs.microsoft.com/en-us/power-automate/approvals-markdown-support

Kind regards, John

Highlighted
Advocate I
Advocate I

Re: Create an Approval action - Formatting disabled for the Adaptive Card details when used with Teams

Thanks for the input John. Unfortuantely I had already tested markdown, and it's not parsed.

 

You can see from my example that a simple line break isn't recognized, but you can also try adding hashtags for headers to an approval action's deetails field, then use the adaptive card output from the approval action as message content for Teams. The message in Teams will contain the card with hashtags as string.

Highlighted
Super User II
Super User II

Re: Create an Approval action - Formatting disabled for the Adaptive Card details when used with Teams

Hello @MateiC 

I just now tested this and it works for me.

I created an approval action

Flow.Approval.InTeams.0.pngIn the details I used the markup formatting to add 3 lines.

This is line 1 + two newlines + This is line 2 + two newlines + This is line 3

 

After that I created the action to post an adaptive card as the Flow bot to a channel.

 

The results are:

 

Flow.Approval.InTeams.1.png

 

The approval is posted in the channel.

 

The approve button is highlighted as my mouse cursor is hovering over it (can't see the cursor).

 

The 3 lines are nicely there.

 

Hope this helps you 🙂

Kind regards, John

View solution in original post

Highlighted
Advocate I
Advocate I

Re: Create an Approval action - Formatting disabled for the Adaptive Card details when used with Teams

You're right, line feeds do work. Rereading the markdown page, I missed this part "enter two line breaks consecutively to begin a new paragraph" and the examples threw me off.

 

But I've just tested headers again, with #'s, and these still do not work. This time I also sent the same adaptive card by mail and Outlook identifies the headers correctly, as does the approvals list accessed through emea.flow.microsoft.com/. I'll have to test this some more when I have more time.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Users online (5,848)