Skip to main content

Notifications

Calling Actions from Copilot Studio
Answered

Create a flow from PVA to collect, then display data from a Microsoft List in SharePoint

Posted on by 58

Evening, 

I am still fairly new at using Power Virtual Agents and have just about mastered the basics , but stuck on how to create a particular flow. I am wanting my PVA Chatbot to display to the user information from a row on a Microsoft list (or excel spreadsheet) located in SharePoint using a given variable the user will provide the Chatbot but I cannot seem to find the right action to allow the Chatbot to locate the list. I have tried using get items from SharePoint and then message in chatbot but it doesn't do anything and doesn't seem to be able to access SharePoint. Is there another step I should add? Thanks   

Categories:
  • Pstork1 Profile Picture
    Pstork1 63,172 on at
    Re: Create a flow from PVA to collect, then display data from a Microsoft List in SharePoint

    Glad you worked it out.  I'll look forward to your next question.

  • Verified answer
    Alexa2022 Profile Picture
    Alexa2022 58 on at
    Re: Create a flow from PVA to collect, then display data from a Microsoft List in SharePoint

    Hi Pstork - I have done it 😀! I amended my flow slightly based on the mark down table option and didn't include the Json, but now my chatbot is only displaying the info for the PA for each director per item (e.g. phone) as listed - and I even figured out how to add a hyperlink to the items. I'll use this forum again if I get stuck again on my next chatbot. 

     

  • Pstork1 Profile Picture
    Pstork1 63,172 on at
    Re: Create a flow from PVA to collect, then display data from a Microsoft List in SharePoint

    Use Ctrl-C for Copy and Ctrl-V for Paste.

  • Alexa2022 Profile Picture
    Alexa2022 58 on at
    Re: Create a flow from PVA to collect, then display data from a Microsoft List in SharePoint

    Thanks. One limit of Power Virtual Agents that I have is the inability to copy and paste. That could just be that I need to speak again to our IT admin about that or do you have any other suggestions since there is no option in the menu when I right clicked to try doing that. One good news though is that I am beginning to understand this flow even more. Thanks. 

     

     

  • Pstork1 Profile Picture
    Pstork1 63,172 on at
    Re: Create a flow from PVA to collect, then display data from a Microsoft List in SharePoint

    Ok,  The first thing I notice is that the Parse JSON schema is still set for '{}'.  That should just be for the first run.  in a run copy the Output from the Filter Array and use the button in the Parse JSON to open a dialog.  Past the output there and taht will generate the schema for the Parse JSON.  After that instead of just Body under the Parse JSON you should see dynamic content for all the properties.  Its those that you want to use to create your variable.  When you use one it will automatically create the Apply to each (but only one).  You have two now because you are using the Body from the Parse JSON, but then trying to use a value from the original get items (I suspect because you aren't seeing the value under the Parse JSON).  That's why you get the second Loop and also why you get all the records, because you are bypassing the filtering you did.

  • Alexa2022 Profile Picture
    Alexa2022 58 on at
    Re: Create a flow from PVA to collect, then display data from a Microsoft List in SharePoint

    Thanks. I tried all the above. Yes, each director is only in the list once but when I done the apply to each that comes back twice saying "apply to each 2". 

     

    Also, I did notice that you had a PA variable in your append to string variable -but I also wasn't sure what to add there. I thought that maybe I should be adding the SharePoint title of PA there. 

     

    Thanks and I hope these screen shots help. 

     

    Alexa2022_1-1645126768105.pngAlexa2022_2-1645126797478.png

     

     

  • Pstork1 Profile Picture
    Pstork1 63,172 on at
    Re: Create a flow from PVA to collect, then display data from a Microsoft List in SharePoint

    First, check to make sure that your Parse JSON is using the output of the filter array and not Get Items.  Then make sure that you are using the output of the Parse JSON instead of the Get Items in the Apply to Each loop. If you provide a screenshot I can try to make some specific suggestions.  I'm assuming each Director is only in the list once.  So that is the field you would filter on.  Filtering on the ID is unnecessary.

     

    When you look at a run does the filter array only return one record?

  • Alexa2022 Profile Picture
    Alexa2022 58 on at
    Re: Create a flow from PVA to collect, then display data from a Microsoft List in SharePoint

    Hi PStork -how are you? I have just been having a look at this flow again and am still a bit stuck. My flow is not quite filtering then displaying each row correctly. Rather than only giving the PA details for the director whose name the user types in, it gives the details for all the rows that I currently have. I am wondering if it has something to do with the filter query in the get items part of the flow. Each row in my SharePoint list does have a unique ID number and I am wondering if I need to add somewhere a separate condition for that or filter. I'd appreciate your help since I'm really pleased I'm almost there and understanding more this flow. 

     

  • Alexa2022 Profile Picture
    Alexa2022 58 on at
    Re: Create a flow from PVA to collect, then display data from a Microsoft List in SharePoint

    Thanks, I will. I have just tried again using different variables from my list and this time it worked better. I'm definitely getting there. Thanks again for your help this evening. 

  • Pstork1 Profile Picture
    Pstork1 63,172 on at
    Re: Create a flow from PVA to collect, then display data from a Microsoft List in SharePoint

    Let me know if I can help.  How did you enter the value you appended to the string variable?  Did you enter JSON into the field directly?  To use JSON notation you need to enter it using the Expressions tab.

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,287

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,172

Leaderboard

Featured topics