Create a connector tool
In this exercise, you will configure a connector tool for a declarative agent in Copilot Studio. You’ll use the “SharePoint - List folder” connector to retrieve a list of files from a Products folder that contains product support files.
This exercise should take approximately 15 minutes to complete.
Before you start
This exercise focuses on adding connector tools to an existing agent. This exercise assumes the following:
- You’ve already created a Product Support declarative agent in Copilot Studio. If you need instructions for creating a declarative agent, see: Create a declarative agent.
- You have a SharePoint site titled Product Support that contains a document library named Products containing files with sample product-related data. For instructions, see the section titled Before you start within the exercise: Add custom knowledge.
Create a SharePoint connector tool from a prebuilt connector
Create a connector tool using the SharePoint List Folder prebuilt connector and add it to the agent.
- In your web browser, navigate to Copilot Studio at
https://www.copilotstudio.microsoft.com
. - In the sidebar, select Agents.
- Select Microsoft 365 Copilot.
- Under Agents, select your Product Support agent.
- Under Tools select Add tool.
- In the Add tool window, enter
SharePoint
in the Search bar. Wait for relevant connectors to be displayed in the window. - Browse and select the List Folder SharePoint connector.
- The modal window displays a connection for the SharePoint connector. A green checkmark will be displayed next to the connector when your connection is active. You may select the … to view details about the connection. If the status is
Not connected
, select the dropdown next to Not connected and select Create new connection. - On the Connect to SharePoint page, select Connect directly (cloud services) then select Create.
- You will be prompted to sign in. Sign in using the M365 account you’re using for the exercise.
- On the Add tool page, after a connection is established, select Add to agent to add the tool to your agent.
Configure the connector tool for your agent
Configure the properties of the connector tool for the agent.
- From the Product Support agent page, under Tools select the List folder - connector tool you added in the previous section.
- In the Name text box, enter
List product support files
. - In the Description text box, enter
List product support files available in the Products folder
. - Select the toggle next to Additional details to reveal additional properties.
- In the Description text box in the Additional details section, enter `Please log in to access the Product Support SharePoint.”
- In the Inputs section, locate the Site Address input. In the Value text box, enter the URL to your Product Support SharePoint site in the format
https://DOMAIN.sharepoint.com/sites/ProductSupport
then select Done. - Next, locate the File Identifier input. Set the Fill using field to Custom value from the drop-down.
- In the Value text box for File Identifier, enter
Products
then select Done. - Select Save at the top of the page to save your changes.
Modify the agent’s instructions
Let’s also update your agent’s instructions, providing guidance to the agent for how to use the connector tool.
- From the Details section of your Product Support agent, select Edit.
- In the Instructions text box, add the following to the existing instructions text:
When asked about available support resources, use the SharePoint connector to list the files in the Products folder.
- Select Save.
Test your agent with the tool
- Expand the Test your agent pane on the right side of your agent’s detail page.
- Select the refresh button in the test pane to load your agent’s latest changes.
- In the message box, enter
What product support files are available?
then send the message. - Notice that your agent responds with the message “You used the SharePoint connector” and then lists the files available in the Products folder.
You’ve validated that your connector tool works as expected within your agent.