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

Community site session details

Session Id :
Copilot Studio - Topic Creation & Management
Suggested answer

Query a SharePoint document library is not working, no items are been recognized

(1) ShareShare
ReportReport
Posted on by 1,728 Super User 2024 Season 1
I have a SharePoint document with these custom fields, as follow:-



 
Now i created a new Copilot agent using Copilot studio and i defined the document library as the knowledge, But when i asked this simple question about the number of items which are under Laptop ItemType, i got this wrong result -where i got an sql statement to query  DB -:-

 
Any advice?

Thanks
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    51,285 Super User 2025 Season 2 on at
    Query a SharePoint document library is not working, no items are been recognized
     
    A couple of things
     
    1) you are saying items but those are documents so I would clarify in your question
    2) is that a choice? and if so, is it single or multi select? 
    3) How did you add the document library as a knowledge source?
     
     
  • Michael E. Gernaey Profile Picture
    51,285 Super User 2025 Season 2 on at
    Query a SharePoint document library is not working, no items are been recognized
     
    I would also be cautious about your instructions. I would make sure that while you can turn off AI answers (which might help), but I would make sure that you have instructions that state clearly that you have a knowledge source called X, that has Y information in it and users will ask questions like How many of type YYY and I want you to answer using only this knowledge source etc
     
    I would be very specific. I try to explain to folks that you want to treat the AI like someone you hired to help you with a job they are not qualified for and you are explaining it in plain, natural language. It will save you a lot of headaches
  • johnjohnPter Profile Picture
    1,728 Super User 2024 Season 1 on at
    Query a SharePoint document library is not working, no items are been recognized
     
    I added it as the knowledge source, by adding the document llibrary url, as follow (where AskCopilot is the library name):-
     
     
    and those are documents inside document library and the ItemType is a Choice that only allow single selection.. will this help?
    Thanks
     
     
  • johnjohnPter Profile Picture
    1,728 Super User 2024 Season 1 on at
    Query a SharePoint document library is not working, no items are been recognized
     
    I have those options already turned off:-
     
     
     
    Also it could not answer this simple question:-
     
  • Suggested answer
    Jihane_Lazrag Profile Picture
    45 on at
    Query a SharePoint document library is not working, no items are been recognized
    You need to create a tool or this in your agent to send a query to the SharePoint list. The copilot agent can not calculate only by prompts, it can summarize , give some information but not calculation, you need to customize it more by triggers and tools
  • johnjohnPter Profile Picture
    1,728 Super User 2024 Season 1 on at
    Query a SharePoint document library is not working, no items are been recognized
    @Jihane_Lazrag where i can read what propmt can do and not do , as you said:-
     
    The copilot agent can not calculate only by prompts, it can summarize
     
    Thanks
  • Suggested answer
    Jihane_Lazrag Profile Picture
    45 on at
    Query a SharePoint document library is not working, no items are been recognized
    @johnjohnPter, you can use this link to create a Topic that calls Get items from SharePoint where you can add filters: Add New Topic with Trigger - Copilot Studio Agent Academy
    And in this agent, I added a loop to calculate the number of the total items that I have as a result from the Get items action: Jilapoint/Copilot-Studio-Agent-Filter-SharePoint-list: A copilot studio agent that filters a SharePoint list, display items list and the count of filtered items

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Copilot Studio

Last 30 days Overall leaderboard

Featured topics