Introduction
In this tutorial, Nate Halliwell from Pragmatic Works demonstrates how to use a SharePoint list as a knowledge source for a Copilot agent, which is an essential tool for automating business workflows. This method is useful for handling sensitive data that you want to share with agents but keep restricted from direct access.
Why Choose This Approach?
- It addresses the issue of keeping sensitive data secure while still making it accessible to Copilot agents.
- Unlike the native "Get Items" action in Copilot Studio, this method leverages Power Automate to extract data and save it as a PDF, which can be securely stored in a SharePoint document library.
- This workaround prevents direct access to the SharePoint list, while still enabling knowledge sharing through the agent.
Setting Up the Knowledge Source
To start, Nate explains the use case of a stock advisor bot, designed to help employees identify restricted stocks based on a list stored in SharePoint. The objective is to prevent trading stocks that might cause conflicts of interest or breach internal regulations.
Step-by-Step Process
1. Create the Bot and Define Trigger Phrases
- The bot is set up with trigger phrases such as “restricted stocks” to initiate the conversation.
- The bot’s response is customized to ask users for company names and determine whether the stock is restricted.
2. Set the Knowledge Source for the Copilot Agent
To make the bot knowledgeable, you need to add a knowledge source. Nate shows how to do this by using the generative answer feature in Copilot Studio. The knowledge source is linked to a document library in SharePoint, where PDF files containing restricted stock information are stored.
3. Handling Restricted Data with Power Automate
- Since the SharePoint list contains sensitive data, Nate uses Power Automate to create a flow that extracts the data from the private SharePoint list and saves it as a PDF.
- Power Automate ensures that the data is transferred to a more public-facing SharePoint site, making it available to the bot without compromising security.
- Once the data is extracted and formatted into a Word document, it is converted into a PDF before being saved to SharePoint, where it can be accessed as a knowledge source by the Copilot agent.
4. Automating the Process
- The flow is scheduled to run regularly (e.g., daily) to ensure the knowledge source is up-to-date.
- The flow deletes any old files from the SharePoint folder to avoid clutter and ensures that only the latest data is used by the Copilot agent.
Testing the Bot
After setting up the knowledge source, Nate demonstrates how the bot responds to user queries. For instance, when the bot is asked about “Microsoft stock,” it pulls the data from the knowledge source and informs the user that the stock is restricted due to a customer conflict of interest.
Advantages of This Method
- Security: Sensitive information is kept secure, with access limited to authorized users and agents.
- Automation: Power Automate handles the entire process of data extraction and conversion, reducing manual work.
- Efficiency: The use of PDFs ensures the data is formatted and easily accessed by the Copilot agent.
Conclusion
This approach provides a powerful solution for handling restricted data while making it accessible to Copilot agents. Whether you’re managing sensitive stock data or other confidential information, this method can help streamline operations without compromising security. Nate encourages viewers to explore other methods and share any new techniques for using SharePoint lists as knowledge sources for Copilot agents.
For more details, check out the full tutorial and consider leveraging Pragmatic Works' virtual mentoring service for one-on-one support.
Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on SharePoint and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.