Prompt & Platform
Connect
HomeTopicsSnippetsDev toolsArticles
Theme
AIBeginner

Build a Copilot Studio agent that answers from Dataverse

Create an agent in Copilot Studio that answers questions from your Dataverse tables, add a topic that takes action, and publish it to Teams.

Prerequisites

  • A Power Platform environment with Dataverse
  • A Copilot Studio licence or trial
  • A table with some data, for example Cases

What you'll learn

  • Create an agent and write instructions that keep it on task
  • Add Dataverse tables as a knowledge source
  • Add a topic that calls a flow to take action
  • Test, then publish the agent to Microsoft Teams
On this page
  1. How an agent is put together
  2. Create the agent
  3. Add Dataverse as knowledge
  4. Add a topic that takes action
  5. Test and publish
  6. What to do next

Agents are the fastest way to put AI in front of your users without building a new app. In this guide we build a support agent that answers questions about open cases straight from Dataverse, and can escalate a case when asked.

How an agent is put together

Before clicking anything, it helps to know the four building blocks:

BlockWhat it doesIn our example
InstructionsTell the model how to behave"Answer only about support cases"
KnowledgeData the agent can searchThe Case table in Dataverse
TopicsGuided conversations you design"Escalate a case"
ActionsThings the agent can doA flow that updates the case

Create the agent

  1. Open Copilot Studio and pick the environment that holds your data.
  2. Create a new agent and give it a clear name, such as Support Assistant.
  3. Write instructions. Be specific — vague instructions are the most common reason agents wander off topic.
TEXT
You help support staff with customer cases.
- Answer only questions about cases, customers and SLAs.
- Always include the case number (for example CAS-1042) when you mention a case.
- If you are not sure, say so and suggest checking the case record.
- Never invent case numbers or dates.

Add Dataverse as knowledge

In the agent's Knowledge section, add Dataverse as a source and select the tables the agent may use — here, Case and Account.

Security still applies: the agent only returns rows the signed-in user is allowed to see. That is one of the big advantages of grounding on Dataverse instead of exporting data somewhere else.

Add a topic that takes action

Answers are useful; actions are what make an agent valuable. Create a topic called Escalate a case:

  1. Add trigger phrases such as "escalate case" and "raise priority".
  2. Add a question node that asks for the case number and saves it to a variable.
  3. Add an action that calls a Power Automate flow. The flow takes the case number, sets Priority to High, and returns a short message.
  4. Finish with a message node: "Done — {case number} is now high priority."

The flow itself is small:

JSON
{
  "trigger": "When an agent calls a flow",
  "inputs": { "caseNumber": "string" },
  "steps": [
    "List rows: Cases where ticketnumber eq caseNumber",
    "Update a row: prioritycode = High",
    "Respond to the agent: 'Escalated'"
  ]
}

Test and publish

Use the test pane while you build. Try questions you expect, and questions you don't — such as asking about the weather — to confirm your instructions keep the agent focused.

When you are happy, publish the agent and add the Microsoft Teams channel. Users can then chat with it where they already work.

What to do next

  • Add more knowledge, like a SharePoint site with your support procedures.
  • Review the agent's analytics to see which questions it can't answer yet.
  • Turn frequent unanswered questions into new topics.
J / K next or previous article

Jagadeesan P

Found this useful? I share new guides on LinkedIn.

Follow