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 / PVA in teams - Find a ...
Copilot Studio
Unanswered

PVA in teams - Find a file in sharepoint library

(0) ShareShare
ReportReport
Posted on by 271

Hi all,

 

I am trying to implement a file search within my bot to allow users to ask the bot for a process document and the bot to then return the file (ideally) or a sharepoint link to the file.

 

Is this possible? 

 

The user will not know the exact file name, but I see the PVA conversation as below:

 

User - Find Document

Bot - Document Name?

User - Warranty Process

Bot - Returns document named 'how to process a warranty return'

 

I have been struggling to get anywhere with this at all at the moment. I have trawled the web for solutions, but havent found anything massively relevant.

 

Any ideas or solutions would be most welcome.

 

 

I have the same question (0)
  • CU22081450-0 Profile Picture
    Most Valuable Professional on at

    Hi @Gwill1983 ,

     

    I'll create a Flow template that contains this logic and I'll let you know in some minutes.

     

  • Gwill1983 Profile Picture
    271 on at

    Thank you. 

     

    That would be amazing!

  • CU22081450-0 Profile Picture
    Most Valuable Professional on at
  • Gwill1983 Profile Picture
    271 on at

    Thanks so much for your help with this. Unfortunately it isnt working currently. It is coming up with the failure below at the filter array step:

    The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@contains(item()?['Title'], triggerBody()['text'])' failed: 'The template language function 'contains' expects its first argument 'collection' to be a dictionary (object), an array or a string. The provided value is of type 'Null'.'.

     

    Any ideas?

  • Gwill1983 Profile Picture
    271 on at

    @renatoromao not sure if you saw this. It feels like it is close! 

     

    The folder that I am referencing has sub folders which I thought might be causing the trouble, but I re-directed it to a folder with 1 file in to see if it found it and it came up with the same error.

     

    Really struggling to correct this!

     

     

  • Gwill1983 Profile Picture
    271 on at

    @renatoromao Hi. Are you able to help me understand this error?

  • SShAl249 Profile Picture
    6 on at

    Hi @Gwill1983  Were you able to run this successfully. I am trying to search sub folders so that Power Virtual Agent bot comes up with relevant searches. 

     

    The method here by Glennbullion works to search, however, i'm unbale to limit to sub folders. Search share point for document - Page 2 - Power Platform Community (microsoft.com) 

  • Gwill1983 Profile Picture
    271 on at

    Hi.

    I didn’t ever manage to get this working, so abandoned the project after many, many hours of attempting to find a solution!

     

    if you have better luck than me and find a solution then please let me know!

  • LucasConekta Profile Picture
    11 on at

    I want to do something similar and can be the last file ordered by date that the very user/username who's chatting with the bot have uploaded to that specific SharePoint Document Library

  • HenryJammes Profile Picture
    Microsoft Employee on at

    @Gwill1983 @LucasConekta 

    I've achieved something somewhat similar using the Graph API in PVA.

    I had documented it here: https://powerusers.microsoft.com/t5/Calling-Actions-from-PVA/Calling-the-Graph-API-to-do-a-document-search-in-PVA/m-p/2101601#M1072 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
sannavajjala87 Profile Picture

sannavajjala87 206 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 147

#3
Haque Profile Picture

Haque 119

Last 30 days Overall leaderboard