Power Platform Copilot Studio Building AI Chatbots

Every day, the same questions flood your team's inbox — How do I submit an expense? What is the leave policy? Where do I find the IT request form? Someone types out the same answers, over and over. Copilot Studio lets you build an AI chatbot that answers these questions instantly, correctly, any time of day, with no human involvement. This topic walks you through building a working chatbot from scratch — no AI expertise or coding required.

What Copilot Studio Is

Copilot Studio (previously called Power Virtual Agents) is Microsoft's no-code chatbot builder. You create AI-powered bots that understand natural language — users type questions in their own words, and the bot understands what they mean and responds helpfully. Bots can answer questions from documents and websites, guide users through multi-step processes, look up data from Dataverse or SharePoint, call Power Automate flows, and hand off to a human agent when the question is too complex.

COPILOT STUDIO BOT CAPABILITIES

User types: "How many leave days do I have left?"
Bot does:
  1. Understands the intent (leave balance inquiry)
  2. Authenticates the user (optional)
  3. Calls Power Automate to query HR system
  4. Retrieves user's leave balance
  5. Responds: "You have 8 annual leave days and 2 sick days remaining."

User types: "I want to submit an IT request"
Bot does:
  1. Recognizes intent (IT request submission)
  2. Guides user through questions (what type, urgency, description)
  3. Calls Power Automate flow
  4. Creates record in Dataverse / ServiceNow
  5. Confirms: "Your request IT-2025-0445 has been created. Expected response: 4 hours."

Opening Copilot Studio

Go to copilotstudio.microsoft.com and sign in with your Microsoft account. Select your Power Platform environment from the top-right dropdown. The home screen shows your existing bots (empty on first login) and a Create button for making new ones. The interface is entirely browser-based — nothing to install.

Creating Your First Bot

Click Create from the left sidebar or the home screen. You see two options: Create a copilot (build from scratch with topic-based conversations) and Create from template (start with a pre-built HR bot, IT support bot, customer service bot, etc.).

Creating from Scratch

Click Create a copilot. Give the bot a name (for example, "HR Assistant"). Optionally add a website URL — Copilot Studio can crawl that URL and use the content to answer questions automatically. Choose the language for the bot. Click Create. Copilot Studio provisions the bot in about 30 seconds and opens the authoring canvas.

The Copilot Studio Interface

COPILOT STUDIO LAYOUT

┌──────────────────────────────────────────────────────────────────┐
│ ≡  Copilot Studio    HR Assistant    [Test]  [Publish]           │
├──────────────┬───────────────────────────────────────────────────┤
│  NAVIGATION  │          AUTHORING CANVAS / TOPIC EDITOR          │
│              │                                                   │
│ Overview     │  [Topic Diagram — shows conversation flow]        │
│ Topics       │                                                   │
│ Entities     │  TRIGGER         →  MESSAGE     →  END            │
│ Actions      │  (user says...)     (bot replies)                 │
│ Variables    │                                                   │
│ Analytics    │                                                   │
│ Channels     │                                                   │
│ Settings     │                                                   │
├──────────────┴───────────────────────────────────────────────────┤
│  TEST PANE (right side — type and test the bot in real time)     │
└──────────────────────────────────────────────────────────────────┘

Topics: The Heart of the Bot

A topic is a self-contained conversation unit. Every topic starts with a trigger (the words or phrases that activate it) and contains a series of nodes defining what the bot says and does in response. A bot for an HR department might have topics for Leave Balance, Expense Submission, Payroll Dates, Policy Documents, and New Employee Onboarding.

System Topics vs. Custom Topics

System Topics are built in by Microsoft and handle universal conversation needs: Greeting (when the conversation starts), Goodbye (when the user says bye), Escalate (when the user asks for a human), Did You Mean (when the bot is not sure which topic matches), Fallback (when no topic matches at all). You can edit system topics to customize the default behavior. Custom Topics are the ones you create for your specific business use cases.

Building a Custom Topic

Click Topics in the left sidebar. Click Add topic → From blank. The topic editor opens with a blank Trigger node and an empty canvas below it.

Step 1: Define Trigger Phrases

Click the Trigger node. In the right panel, add phrases that a user might type to activate this topic. Add at least five to ten variations — Copilot Studio's AI matches user input to the closest trigger phrase, even if the user's wording does not exactly match.

TOPIC: Leave Balance Inquiry
Trigger phrases:
  "How many leave days do I have?"
  "Check my leave balance"
  "How much annual leave is left?"
  "Leave days remaining"
  "PTO balance"
  "How many days off do I have left?"
  "Remaining holidays"
Step 2: Add a Message Node

Click the plus button below the Trigger node and choose Send a message. Type what the bot says. Use the rich text editor to format the message, add images, or add quick reply buttons. Avoid responses longer than 3–4 sentences — short, clear answers work best in chat interfaces.

Step 3: Ask a Question

Click the plus button and choose Ask a question. Type the question. Choose the response type: Multiple choice (user picks from buttons), Text (user types), Number, Date, Email, or yes/no. The user's answer is stored in a variable automatically.

ASK A QUESTION NODE EXAMPLE

Bot asks:    "Which type of leave would you like to check?"
Options:     [Annual Leave]  [Sick Leave]  [Unpaid Leave]
Stored in:   LeaveType (variable, Text type)

After user selects "Annual Leave":
  LeaveType = "Annual Leave"

The next node can use LeaveType to call the right data query.
Step 4: Add a Condition

Click the plus button and choose Add a condition. Branch the conversation based on the variable value. Each branch leads to a different set of messages or actions.

CONDITION NODE EXAMPLE

IF LeaveType is equal to "Annual Leave"
  → [Branch 1]: Show annual leave balance
ELSE IF LeaveType is equal to "Sick Leave"
  → [Branch 2]: Show sick leave balance
ELSE
  → [Branch 3]: "Please contact HR directly for unpaid leave queries."

Generative AI Answers: Connecting to Knowledge Sources

Modern Copilot Studio bots use generative AI to answer questions from your organization's content — SharePoint sites, uploaded documents, public websites, or Dataverse — without you writing a topic for every possible question. The AI reads your content and generates natural, accurate answers on the fly.

Adding Knowledge Sources

In Copilot Studio, click on your bot name at the top, then click Knowledge in the overview page. Click Add knowledge. Choose your source type:

KNOWLEDGE SOURCE TYPES

Public website:    Enter a URL — bot learns from that webpage and its links
SharePoint sites:  Point to a SharePoint site — bot reads all pages and documents
File upload:       Upload PDFs, Word docs, text files directly
Dataverse:         Connect to specific Dataverse tables for structured data answers
Azure OpenAI:      Connect to your own Azure OpenAI knowledge base or index

After adding a SharePoint site, the bot reads every page and document and builds an AI understanding of the content. When a user asks any question — even one you never wrote a topic for — the bot searches its knowledge, generates an answer, and cites the source document. This is called Generative Answers (or Copilot Generative AI mode).

Controlling When Generative Answers Activate

You control whether the bot tries generative answers before falling back to the Fallback topic, or only within specific topics. In Settings → Generative AI, enable the feature and set the content moderation level (Precise delivers accurate, conservative answers; Balanced allows more creative responses). For enterprise use, Precise is almost always the right choice.

Calling Power Automate Flows from a Bot

When a question requires looking up live data — leave balances from an HR system, order status from Dataverse, weather forecasts — the bot calls a Power Automate flow and uses the flow's output in its response.

BOT-TO-FLOW INTEGRATION PATTERN

Bot asks:  "What is your employee ID?"
User says: "E-10045"

Bot node:  Call an action → Choose a flow
           → Select "Get Leave Balance" (Power Automate flow)
           Input:  EmployeeID = (user's answer variable)
           Output: AnnualLeaveBalance, SickLeaveBalance

Bot message: "Employee E-10045 has {AnnualLeaveBalance} annual leave days 
              and {SickLeaveBalance} sick leave days remaining."

The flow variable values replace the {placeholders} dynamically.

Building the Flow for a Bot

In Power Automate, create a new Instant cloud flow. Add the trigger "When Copilot Studio calls a flow." This trigger generates input and output variable slots — define what data the bot sends in (employee ID) and what the flow returns (leave balances). Add your data query steps (Get row from Dataverse or call an API) and set the output variable to the result. Return to Copilot Studio and the flow now appears in the Call an action list.

Variables in Copilot Studio

Variables store information during a conversation. Three scopes exist. Topic variables exist only within one topic — when the topic ends, they are gone. Global variables persist across the entire conversation — any topic can read or write them. System variables are automatically set by Copilot Studio — things like the user's name, email, and conversation ID.

COMMON SYSTEM VARIABLES

System.User.DisplayName  → "Priya Sharma"   (logged-in user's name)
System.User.Id           → user's Entra ID (GUID)
System.User.PrincipalName → "priya@company.com"
System.Activity.Text     → The exact text the user typed
System.Conversation.Id   → Unique ID for this conversation

Use in messages:
"Hello, {System.User.DisplayName}! How can I help you today?"
→ "Hello, Priya Sharma! How can I help you today?"

Testing Your Bot

Click Test at the top of Copilot Studio. A chat panel opens on the right side of the screen. Type messages as if you are the user. The bot responds in real time, and you see which topic triggered in the authoring canvas (highlighted in green). Test all trigger phrase variations. Test edge cases — what happens if the user types something unexpected, or if a Power Automate flow returns an empty result. Fix issues by editing topics and testing again without republishing.

Publishing the Bot

Click Publish in the top-right corner. Publishing makes the latest version of your bot live across all channels you have configured. Copilot Studio shows a confirmation — the bot is now available to users. Publishing takes less than a minute. You can publish updates at any time without downtime — the next user message after publishing gets the new version.

Key Points

  • Copilot Studio is Microsoft's no-code chatbot builder — entirely browser-based, no installation needed.
  • Topics are conversation units — each topic handles one user intent, from trigger phrases to the bot's response and follow-up actions.
  • System topics handle universal scenarios (greeting, goodbye, escalation, fallback). Custom topics handle your specific business use cases.
  • Generative AI Answers connect your bot to SharePoint sites, uploaded documents, and websites so it answers questions from your own content without writing a topic for every question.
  • Call Power Automate flows from within topics to look up live data, create records, or trigger processes based on the conversation.
  • Variables (topic, global, and system) store and carry data through the conversation. System.User.DisplayName and System.User.PrincipalName let you personalize responses with the user's identity.
  • Test your bot in the real-time test pane before publishing. Publish when ready — no downtime, instant availability.

Leave a Comment