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 / Copilot Studio / Extract content from S...
Copilot Studio
Answered

Extract content from Sharepoint List attachment

(1) ShareShare
ReportReport
Posted on by 525
Hey all, 
i am trying to build an Agent that has Access to a Sharepoint list where List items also have attachments. (PDF, Word..)

With the new Update SPO Lists are here again better than ever. I have created 3 Tools with 3 separate Sharepoint connector actions.
 
Tool 1: Get Items 
Tool 2: Get Attachments
Tool 3: Get Attachment Content
 
The baseline works well if i ground it with knowledge how to construct OData Queries in Sharepoint get Items.
 
It goes as far giving me the Attachment in the Test chat which actually is the correct attachment and i can even open it :O
 
As for the next step i want to agent to be able to read this attachment by itself. Did you ever approach this or solve something like this?
 
Thanks and BR
Niklas
I have the same question (0)
  • Suggested answer
    Vish WR Profile Picture
    3,236 on at
     

    Copilot Studio can fetch the attachment, but it can’t directly read or understand the file content.

    To make it work, you can try the approach below and see if it works 

    Add this between “Get Attachment Content” and your agent:

    • Get Attachment Content
    • Use AI Builder – Extract text from document (Document Processing)
    • Return the extracted text back to Copilot Studio

    This converts the PDF/Word file into readable text, so the agent can actually use and reason over it.

    Vishnu WR
     
    Please  Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like 


     
  • Suggested answer
    11manish Profile Picture
    2,293 on at
    What you are seeing is expected behavior.
     
    Your agent can currently retrieve and expose SharePoint attachments, but it cannot truly “read” PDFs or Word documents yet because the attachment content
     
    returned from SharePoint is binary/base64 data, not semantic text.
     
    To make the agent understand the document, you need an additional document extraction layer such as AI Builder or Azure AI Document Intelligence.

    The best production architecture is to extract document text first (preferably asynchronously through Power Automate or Azure Functions), store or index the
     
    extracted content, and let the agent reason over that extracted text instead of trying to interpret raw attachments dynamically at runtime.
     
     
  • niklasjegg Profile Picture
    525 on at
    Hi @11manish oh i get it. I was about the same thing with the attachment as i know they are not indexed directly in SPO.
     
    Would you do this in a separate SPO Column where the extracted text resides?
     
    @Vish WR i have tried this yep. But in separate Tools / Actions. I suppose i would need to create a specific agent flow with all actions inside so it can pass the attachment right?
     
    BR Niklas
  • Vish WR Profile Picture
    3,236 on at
    u can try in the same flow where u get an attachment, then use AI Builder – Extract text from document (Document Processing) and use in copilot 
     
     
     
  • 11manish Profile Picture
    2,293 on at
    Yes  — that is actually the recommended enterprise approach for Microsoft SharePoint + Microsoft Copilot Studio solutions.

    Instead of making the agent parse attachments dynamically every time, store the extracted text in a separate SharePoint column (or related table/index).
  • Suggested answer
    Sayali Profile Picture
    Microsoft Employee on at
    Hello ,
    You can fetch SharePoint list item attachments successfully, but Copilot Studio won’t automatically “read” or interpret PDF/Word binary content—you need an explicit text-extraction step (for example via AI Builder Text Recognition or Azure AI Document Intelligence Read), then return the extracted text to the agent for summarization/Q&A; the most scalable approach is to pre-extract and store the text back into the list (or an index list/column) on item create/update for fast retrieval, while an on-demand flow can also work but is slower and benefits from caching.
  • Verified answer
    Valantis Profile Picture
    5,267 on at
     
    Yes, a separate SharePoint column for extracted text is the right approach. Here's the full pattern that works well:
     
    Pre-extraction flow (runs once per attachment):

    - Trigger: When an item is created or modified in the SharePoint list
    - Get the attachment content
    - Pass it through AI Builder Extract text from document or Azure AI Document Intelligence
    - Write the extracted text back to a dedicated column on the same list item (e.g. ExtractedContent, plain text multiline)
     
    Agent at query time:
    - Tool 1: Get items with OData filter to find the right record
    - Return the ExtractedContent column value directly
    - No runtime extraction needed, no binary handling, no latency
     
    This is faster, cheaper (AI Builder credits only spent once per document not per query), and more reliable than on-demand extraction. The agent just reads a text column like any other field.
     
    For the agent flow question: yes, if you want on-demand extraction you need a single agent flow that chains Get Attachment Content into AI Builder and returns the text. Separate tools can't pass binary content between them in Copilot Studio since each tool call is independent.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

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

#1
Valantis Profile Picture

Valantis 639

#2
Vish WR Profile Picture

Vish WR 293

#3
Haque Profile Picture

Haque 216

Last 30 days Overall leaderboard