web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to read text from ...
Power Automate
Unanswered

How to read text from a Teams message posted via an incoming webhook

(0) ShareShare
ReportReport
Posted on by

Hello Everyone.

 

We have set up Site24x7 alerts to a Teams channel.

ianwuk_0-1672910110241.png

Whenever a message is posted that mentions 'down' or 'DOWN' I want to post a reply message automatically.

Right now, here is my flow:

1 - Wait for a new message to be posted and then get the HTML from the message body.

ianwuk_2-1672910180401.png

 

2 - Set up a condition that looks for 'DOWN' or 'IS DOWN' inside the HTML body output from step 1 and then does something.

ianwuk_3-1672910229998.png

Will this work?  Or do I need to do something else?

 

Kind regards.

Categories:
I have the same question (0)
  • VictorIvanidze Profile Picture
    13,081 on at

    As the subject line contains "is down" you can analyze only Subject.

  • CU-19081228-9 Profile Picture
    on at

    Thank you so much for replying @VictorIvanidze 

    What if the Teams message is actually an attachment?  How can I read that for certain data and do something?

    Like this?

    ianwuk_0-1672963787062.png

    I just want to be able to read the contents of the message posted via an incoming webhook, that Teams puts in an attachment (shown above) and then perform an action.

    E.g. the data in the attachment is data in tabular format.  I want to be able to do something if the data in one particular column contains or exceeds a certain value.

    For example, if the data in the attachment looked like this:

    Shop      Number of Customers             Profit
    1             10                                            100
    2             5                                               10

    If 'Profit' <= 10 then do something...

    I just don't know how to extract the actual content of the message posted to Teams because it doesn't seem to have stuff like Subject/Body etc.

    Many thanks for any help you can kindly give.

  • CU-19081228-9 Profile Picture
    on at

    Thank you for replying @VictorIvanidze 

     

    How about if the message put into Teams via a third party looks like this?

    ianwuk_0-1672969830479.png

     



    How can I extract that information and then do something with it?

    My flow looks like this:

    1 - Get message details from Teams for new message posted - triggerOutputs()?['body/body/content']
    2 - Parse JSON using the output from step 1.
    3 - Use a Compose - body('Parse_JSON')?['attachments'][0]['content']

    What is the next step to get data that I can action upon?

    E.g.

    If that data, when posted to Teams, looks like this:

    Shop             Customers              Profit
    1                     10                          100
    2                      2                            5

    How can I 'read' the data so that if 'Profit' <= 10 then do something?

    Many thanks for any help you can give.

  • VictorIvanidze Profile Picture
    13,081 on at

    You have to convert a HTML table to a JSON array.

  • CU-19081228-9 Profile Picture
    on at

    Thanks for replying @VictorIvanidze - how is that done if I only have the attachment ID as content, as shown in the above screenshot?

     

    I assume that once I have that I can then follow your instructions above.

  • VictorIvanidze Profile Picture
    13,081 on at

    It's unclear for me if you can retrieve the content of the attachment or not.

  • CU-19081228-9 Profile Picture
    on at

    @VictorIvanidze 

    Right now, I just get this:

    ianwuk_0-1672991674105.png

    I don't know how to retrieve the content of the attachment, but that is what I would like to do - is it not possible?

    Many thanks.

  • Amit_Sharma Profile Picture
    1,569 Super User 2024 Season 1 on at

    Hi @ianwuk 

    Could you show me whole text which return in content property.

  • CU-19081228-9 Profile Picture
    on at

    @Amit_Sharma  - Sent via a PM.

     

    Alternatively, can my cloud flow somehow read the text of the message posted to the Teams channel using OCR and then do something that way?

    Thanks.

  • Tarik101 Profile Picture
    2 on at

    sorry for responding to an old post but were you able to find a solution to this? @ianwuk 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 921

#2
Valantis Profile Picture

Valantis 801

#3
Haque Profile Picture

Haque 588

Last 30 days Overall leaderboard