Skip to main content

Notifications

Building Copilot Studio Chatbots in Microsoft T...
Unanswered

Fetching Teams Messages with Microsoft Graph

Posted on by 2

I have successfully retrieved Teams messages from a specific channel using Microsoft Graph. However, I need assistance in filtering out only the message content from the body.

Since the message/$search endpoint is not available in Co-Pilot Studio, I have attempted several methods to filter the message content but have not been successful.

Could you please advise on the best way to filter message content when $search is not available ?

Thanks,

  • Expiscornovus Profile Picture
    Expiscornovus 29,248 on at
    Fetching Teams Messages with Microsoft Graph
    You could use a Filter Array action directly after the list messages from channel request.

    Below is an example
    In this example I am searching for a message with a specific subject. And return the id of the message.
     
    From
    outputs('Send_a_Microsoft_Graph_HTTP_request')?['body']['value']
     
    Where
     
    @equals(item()['subject'], triggerBody()['text'])
     
    Result expression for the id of the message
     
    first(body('Filter_Array'))['id']
     
     

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 137,998

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,059

Leaderboard

Featured topics