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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get Attachment Content...
Power Automate
Unanswered

Get Attachment Content from Microsoft Teams Message

(0) ShareShare
ReportReport
Posted on by 2

I try to make a flow from a Message Received from Teams. First of all, from a third party, i send a webhook to microsoft Teams Channel. From this one, each time i receive a channel message, i want to get the original informations from the webhook to make a CSV files. From now, i can't catch the Attachment Content, it seems impossible. Here what i have from now :

 

This is the webhook i receive in my channel :

Here is the webhook i receive in my Teams ChannelHere is the webhook i receive in my Teams Channel

 

Here when i can get the information of my attachment content :

 

The first part where i can see where is my attachment contentThe first part where i can see where is my attachment content

Here when i try to catch the informations to be able to make CSV file (Note, in compose it never propose me any array) :

 

Now trying to get the attachment content and make a csv file or send it by emailNow trying to get the attachment content and make a csv file or send it by email

Exemple of email i received :

 

Example of email i receivedExample of email i received

 Any ideas can be helpful ?

 

Thank you

 

Categories:
I have the same question (0)
  • Verified answer
    v-bacao-msft Profile Picture
    on at

     

    Hi @cjenkins ,

     

    If you want to get content and create a file, you can refer to the following method.

    26.PNG27.PNG

    Expression reference:

    triggerBody()?['attachments'][0]['content']

    Hope this helps.

     

    Best Regards,

  • Christian_Me Profile Picture
    4 on at

    Hello, i'm stuck here with the same or similar problem, perhaps someone can help:

     

    Goal: Send a email to a (dedicated) teams channel and create a task in planner including the attachments.

     
     

    image.png

    File are created with the correct filenames but with 0 bytes.  Same with 'content' instead of 'ContentBytes' property.

    Any ideas.

    Thank you for your help!

    Christian

     

     

  • TravEd Profile Picture
    4 on at

    This thread has given me a dim light at the end of the tunnel but I just can't seem to get any closer to what I'm trying to achieve.  

     

    In the same vein as this solution, I'm looking to email message content from teams, including attachments, but for my requirement  it's based on a selected message.  The trouble is, when you chose this as the trigger, you don't get the option for message attachments.  Unfortunately I don't have enough of an understanding of the data expressions to know whether it's possible to use any of the functions to manually do this.  

     

    UPDATE:

     

    I've gotten so close with this, but have started a separate thread.  Follow it here - https://powerusers.microsoft.com/t5/Building-Flows/Get-Attachment-Content-from-Selected-Microsoft-Teams-Message/m-p/696808#M94415 

  • ptkptk Profile Picture
    2 on at

    Hello, 

    It's a japanese course class and they record the meeting ( but the recording get deteled after a while )

     

    So I made the flow that when the message with attachement ( video recording ) is posted -> save in sharepoint 

    When copying the exact expression 

    triggerBody()?['attachments'][0]['content']
    I had an error that 'content' is not a recognizable parameter. I trying the flow with just 

    triggerBody()?['attachments'][0]

     

    The flow appears to work but I can t play the video in sharepoint - unknown format or something

    The file in sharepoint only has 250 bytes  (from a 10MB short video) - so clearly the content isn't being taken actually.

     

    Any advice, please? Is it even possible?

  • CU-19081228-9 Profile Picture
    on at

    @v-bacao-msft How can I do this to get attachment message content text and then do an action based on whether the content contains certain text or numbers?

     

    Thanks.

  • Jannes Profile Picture
    4 on at

    I'm super happy to now have something that works for me.
    At the same time, I'm suffering an existential crisis about the nature of the solution. Here we go:

    Jannes_0-1712824967099.png



    In the "Send an email notification (V3)" block, I use this Outputs from the above Compose block:

    Jannes_1-1712825130826.png

     

    The magic expression is

    outputs('Get_message_details')?['body/attachments']?[0]?['content']

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard