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 / Copilot Studio / Reading Files in Teams...
Copilot Studio
Unanswered

Reading Files in Teams Channel

(2) ShareShare
ReportReport
Posted on by 7
I am currently working on a project that will read your resume and compare it to some guidelines using an agent in copilot studios. To start this project I am just working on reading in the file and summarizing it. In the testing mode for copilot studio I can successfully do this by using a file array JSON String defined by "JSON(System.Activity.ChannelData)" in a topic and then in a flow convert the first attachment from ['OriginalAttachments'] to Binary to make it into a readable form to get text to inject into a prompt. This is done by using the script "dataUriToBinary(first(outputs('Parse_JSON')?['body']?['OriginalAttachments'])?['contentUrl'])" and then calling the "Recognize text in image or document" action on the output.
 
This file array looks like this: 
File Array: {"OriginalAttachments":[{"contentType":"text/plain","contentUrl":"data:text/plain;base64,VGhpcyBpcyBhIHRlc3QgcmVzdW1lLiBJIGhhdmUgZXhwZXJpZW5jZSBjb2RpbmcgaW4gUHl0aG9uIGFuZCBKYXZhLg==","name":"TestResume.txt"}],"attachmentSizes":[{"Value":67}],"clientActivityID":"80d0c9n5nul","enableDiagnostics":true,"testMode":"Text"}
 
To keep the base64 string shorter I used a small .txt file but I can also extract text from a pdf if it is in the file array.
 
My problem I am having with the teams channel is that teams does not use the same file array system so I cant access the file the same way. In teams this is the result of file array looks like this:
File Array: {"tenant":{"id":"741bf7de-e2e5-46df-8d67-82607df9deaa"}}

What I need help with is figuring out how to access the files in the teams attachments so I can use the method I used in testing mode to extract the text from the document. Sort of a "File Array" but for teams. I think I need to find a different script similar to 
JSON(System.Activity.ChannelData) but for the way that teams stores their files.

If anyone has any insight on this it would be greatly appreciated. Thank you
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,493 Super User 2025 Season 2 on at
  • MP-09061817-0 Profile Picture
    7 on at
     
    I tried the results on that page and it worked for a while but after some time I went to test it again and now it starts to miss my file upload again. I have a question block that expects a file upload but it gets stuck on that block after I upload file to teams. When I change the question block to a text type it gives me this again for the file array
    {"tenant":{"id":"741bf7de-e2e5-46df-8d67-82607df9deaa"}}
     
    Below is a screenshot of my copilot topic. And a test run in teams of the file upload problem I am now having.
     

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 > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 270 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 181 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard