Skip to main content

Notifications

Calling Actions from Copilot Studio
Unanswered

PVA in teams - Find a file in sharepoint library

Posted on by 273

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.

 

 

Categories:
  • HenryJammes Profile Picture
    HenryJammes on at
    Re: PVA in teams - Find a file in sharepoint library

    @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 

  • LucasConekta Profile Picture
    LucasConekta 11 on at
    Re: PVA in teams - Find a file in sharepoint library

    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

  • Gwill1983 Profile Picture
    Gwill1983 273 on at
    Re: PVA in teams - Find a file in sharepoint library

    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!

  • SShAl249 Profile Picture
    SShAl249 6 on at
    Re: PVA in teams - Find a file in sharepoint library

    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
    Gwill1983 273 on at
    Re: PVA in teams - Find a file in sharepoint library

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

  • Gwill1983 Profile Picture
    Gwill1983 273 on at
    Re: PVA in teams - Find a file in sharepoint library

    @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
    Gwill1983 273 on at
    Re: PVA in teams - Find a file in sharepoint library

    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?

  • renatoromao Profile Picture
    renatoromao 6,762 on at
    Re: PVA in teams - Find a file in sharepoint library

    @Gwill1983 ,

     

    Link: https://mtacbrasil-my.sharepoint.com/:v:/g/personal/renato_romao_mtac_org_br/ET3qxKXAor9MsiwN03bE5I4Bap26yH6JN07T2uf19UpS4g?e=e1tK8X 

    Let me know if you have any trouble.

  • Gwill1983 Profile Picture
    Gwill1983 273 on at
    Re: PVA in teams - Find a file in sharepoint library

    Thank you. 

     

    That would be amazing!

  • renatoromao Profile Picture
    renatoromao 6,762 on at
    Re: PVA in teams - Find a file in sharepoint library

    Hi @Gwill1983 ,

     

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

     

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Getting Started…

Welcome to the Power Platform Community! We appreciate your visit…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 138,006

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,059

Leaderboard

Featured topics