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

Formatting hidden paragraphs when sending message to teams in HTML

Hi, I would like to hide parts of the messages when I send it to Teams from a flow. The reason being that I would like to mention several users but not have it clog up the message. At the moment I am using this method of creating a paragraph with font size 0 for the parts that I would want to hide.

<p><strong>Title</strong><br>
Line 1<br>
Line 2<br>
End of message</p>
<p style="font-size:0px">
<at>adrian@email.com</at>
</p>

 This works well on the desktop version of teams as the users mentioned still see the nice @ icon on the top right of the message without clogging up the message body with all the mentions.

Adrian2_0-1600694310883.png

However, on the android version of the Teams app, the mentions are not hidden at all and show up as normal sized in the message body. I apologize that I don't have a screenshot of this as the android Teams app prevents screenshots.

 

I have also tried using 

<div style="display:none;">

which also works on the desktop but does not work on the Teams app. Is there any way to hide the mentions from the message body completely across all platforms?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Formatting hidden paragraphs when sending message to teams in HTML

Hi @Adrian2,

 

I am sad that the tag couldn't hidden in the IOS side.  I have confirmed with my colleagues that this should be a mobile adaptation problem. There is no release information about this issue at present. I hope you can keep paying attention. If there are any updates about this issue, I will update it to this case in time.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Formatting hidden paragraphs when sending message to teams in HTML

Hi @Adrian2,

 

There is no way could use CSS to hidden the tag on the android side as far as I know.

 

As a workaround, you could use the adaptive card to do it, you could add the Post your own adaptive card as the Flow bot to a channel action, then paste these code into it:

{
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.2",
    "body": [
        {
            "type": "TextBlock",
            "text": "Title",
            "color": "Dark",
            "weight": "Bolder"
        },
        {
            "type": "TextBlock",
            "text": "Line 1",
        },
        {
            "type": "TextBlock",
            "text": "Line 2",
        },
        {
            "type": "TextBlock",
            "text": "End of message",
        },
        {
            "type": "TextBlock",
            "text": "<p><at>adrain@email.com</at></p>",
            "isVisible": false
        }
    ]
}

Screenshot 2020-09-22 104016.jpg

 

Run result:

Screenshot 2020-09-22 103450.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Helper I
Helper I

Re: Formatting hidden paragraphs when sending message to teams in HTML

Hi @v-litu-msft ,

 

Thank you for the solution! It works on both desktop and android. However, my colleague using the iOS Teams app noticed that the adaptive card does not display properly and all of the formatting is messed up. For example the markdown formatting ** not longer bolds the text among others.

Adrian2_0-1600762535276.png

 

Searching deeper, it seems that this is not an isolated issue and is caused by the presence of mentions in an adaptive card. (https://github.com/microsoft/AdaptiveCards/issues/3915) However, that issue seems to have been recently closed without a fix. Is there any other way to perhaps get a similar functionality? Or perhaps would it also be possible to check with your colleagues if this issue has been fixed but not released? Thank you again for your help!

Highlighted
Community Support
Community Support

Re: Formatting hidden paragraphs when sending message to teams in HTML

Hi @Adrian2,

 

I am sad that the tag couldn't hidden in the IOS side.  I have confirmed with my colleagues that this should be a mobile adaptation problem. There is no release information about this issue at present. I hope you can keep paying attention. If there are any updates about this issue, I will update it to this case in time.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper I
Helper I

Re: Formatting hidden paragraphs when sending message to teams in HTML

Hi @v-litu-msft ,

 

Thank you for your help in this matter. It is much appreciated!

Helpful resources

Announcements
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.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Top Kudoed Authors
Users online (4,762)