Custom Copilot: Fetch and Process SharePoint List Data Using Prompt AI Builder

I am fetching the details from the SharePoint List and processing the information using the Prompt AI Builder Action in Copilot Studio.

The rapid evolution of AI in the workplace is transforming how we approach daily tasks, automating routine activities and empowering us to focus on higher-value work. Microsoft 365 Copilot is at the forefront of this transformation, providing organizations with tools to build AI-driven solutions that integrate seamlessly with familiar platforms like SharePoint. Copilot Studio offers the flexibility to create custom workflows by combining the power of AI with your organization’s existing data.

This blog will dive into how to leverage a Custom Copilot to fetch data from a SharePoint List and process it using the Prompt AI Builder Action in Copilot Studio. SharePoint Lists are a widely used feature for organizing, managing, and collaborating on structured information within an organization. By connecting these lists with Microsoft 365 Copilot, users can automate the retrieval and processing of critical information, enabling faster decision-making and smarter task management.

I will guide you through setting up a custom Copilot, configuring it to pull relevant data from SharePoint, and utilizing the Prompt AI Builder to process the information based on your specific needs. This approach not only enhances productivity but also demonstrates the flexibility and scalability of Microsoft 365 Copilot, allowing users to create tailored AI solutions that align with their unique business requirements. Whether you're streamlining project management, automating reports, or simply improving data analysis workflows, this tutorial will show you how to unlock the full potential of Microsoft’s AI-powered tools.

Issue tracker Copilot, where the source database is SharePoint.

Sharepoint

After turning on the Generate AI from the settings.

Generate AI

Create a new topic with the option to “Create from the description with Copilot”

Copilot

Create the topic with the name “Issue Tracker” and the description as follows “When a user wants to check or track the status of the issue raised using the queries and get the necessary updates from the SharePoint list, which has up-to-date information”

Issue tracker

After creating the topic, click on the + icon to Call an action go to the Connector section, and search for “Get items”

Connector

After the addition of the Connector, configure the following details.

  1. URL of the SharePoint site to point to the database.
  2. Name of the SharePoint list to fetch the details.
  3. Filter query according to the logic required.

Here, I have received the input from the user and matched it with the respective column.

Connection action

Until this step, you will receive the response from the connector below.

Extension

However, it is not legitimate to read and respond to this as it is to the end user. The conventional method of displaying the information would be to form an adaptive card (you can still if you want to).

To save time, you can pass this information to AI Prompt Builder as the source and process the information as per your requirement using the prompts.

Here, you can use GPT 3.5 or GPT 4o to process the format of the response from API. You can get the response in a simple way, such as TEXT or JSON format.

To add the Prompt Builder Action.

Prompt Builder

Build the prompt as follows.

Summary of the issue, the priority, and the status of the issue which is currently in the tracker as per the source available in <input variable>.

Prompt

Imput

You will get the response after this step.

Response