Copilot & Foundry: The Microsoft AI Stack for Small Business · Lesson 8 of 10
Build It in Copilot Studio (Step-by-Step)
Time: ~35 min reading + ~30 min worksheet (hands-on) Goal: Walk through the actual build of the Northside HVAC helpdesk agent in Copilot Studio. By the end, if you're following along in a tenant, you'll have a working agent.
---
You need:
- Access to a Microsoft 365 tenant with Copilot Studio available (M365 Copilot license, or trial)
- Admin access to a SharePoint site where the agent's knowledge base will live
- The content: Employee Handbook PDF, Benefits Guide PDF, IT AUP (can use placeholders for practice)
If you don't have a tenant, set up a Microsoft 365 Developer Program sandbox at developer.microsoft.com/microsoft-365/dev-program — it's free, includes E5 licenses, and is specifically designed for this kind of practice.
The screenshots-and-specifics of Copilot Studio change. The clicks may differ slightly by the time you read this. The concepts and the structural flow of the build will be stable. When in doubt, trust the concepts and navigate the current UI.
1.1 Sign in to Copilot Studio
Go to copilotstudio.microsoft.com and sign in with your tenant admin account.
1.2 Choose or create an environment
Copilot Studio works within Power Platform environments. For a client project:
- For a real production build: create a new environment specifically for this client (admin.powerplatform.microsoft.com → Environments → + New). Separating environments keeps governance, DLP policies, and access control clean per-client.
- For practicing: use the default environment.
1.3 Verify licensing
Copilot Studio will warn you if licensing isn't in place. If you're on a developer sandbox or a fresh M365 Copilot trial, you're fine. In production with a real client, confirm:
- M365 Copilot licenses deployed (for the users who'll interact with the agent)
- Copilot Studio capacity assigned to the environment
1.4 (Production only) Apply DLP policies
In the Power Platform admin center, verify a DLP policy exists that:
- Separates "business" connectors (SharePoint, Dataverse, internal APIs) from "non-business" connectors (social media, public APIs)
- Blocks or restricts sensitive data from flowing to non-business connectors
This is one-time per environment. For Northside, we'd use their existing DLP policy or create a standard one.
2.1 Create new
In Copilot Studio, click + Create → New agent.
2.2 Describe it
Copilot Studio will offer to help you create the agent from a description. Enter something like:
> "An internal HR and IT helpdesk agent for Northside HVAC Services, a 45-person HVAC company. It answers employee questions about PTO, benefits, expenses, IT policies, and other workplace policies. When it can't answer, it creates a Teams notification to Rachel, the office manager, with the user's question and context. Tone: friendly, helpful, practical. Never make up answers — if uncertain, always escalate to Rachel."
This generates starter topics and configuration. Review what it creates; adjust.
2.3 Name and describe
- Name: Northside Helpdesk
- Description: "Internal helpdesk for HR, benefits, IT, and office policy questions. Always escalates to Rachel when uncertain."
- Icon: upload company logo if available
2.4 Initial greeting
Override the default greeting with something that sets expectations:
> "Hi! I'm the Northside helpdesk bot. I can answer questions about benefits, PTO, expenses, IT policies, and most HR topics. If I'm not sure about something, I'll send your question to Rachel and she'll follow up. What can I help you with?"
Clarity up front beats cleverness. Users will forgive a bot; they won't forgive a bot that pretends to know things it doesn't.
In the agent's Knowledge section:
3.1 Add SharePoint source
Click + Add knowledge → SharePoint. Point at the curated SharePoint site or folder where the clean versions of the handbook, benefits guide, and IT AUP live.
Important: use a dedicated folder like `Sites/NorthsideTeam/AgentKnowledge/` rather than the root of the team site. This isolates what the agent can see and makes permission management cleaner.
3.2 Add document sources
For any PDFs or Word docs not in SharePoint (uncommon but happens), you can upload directly. For Northside, everything's in SharePoint, so skip.
3.3 Verify permissions
The agent searches as itself. Confirm the service principal / app it runs under has read access to the knowledge folder. If users have different access to different content, consider either:
- Keeping the agent's knowledge scope narrow (everyone can see everything it knows)
- Using Dataverse or a more sophisticated RAG pattern with user context (graduates toward Foundry — see Module 9)
For Northside v1, the simple approach works: everything in `AgentKnowledge/` is accessible to all employees, and the agent only knows what's in there.
3.4 Configure generative answers
In Copilot Studio's settings, enable Generative answers and point at your knowledge sources. Set:
- Answer tone: friendly, professional
- Authoritative sources: SharePoint site
- Citations: enabled (agents should cite which document the answer came from)
Now the craft. Topics are where you author specific handling for high-value questions — the ones you know recur. For everything else, generative answers on the knowledge base handles it.
For Northside, author explicit topics for:
Topic 1: Request PTO
Trigger phrases:
- "request time off"
- "PTO request"
- "take vacation"
- "request PTO"
- "how do I request time off"
Flow:
- Acknowledge
- Direct user to the PTO request form in SharePoint (link)
- Remind them of the 2-week advance notice policy (from handbook)
- Offer to create a Teams calendar hold (optional action)
- End gracefully
Topic 2: Check PTO balance
Trigger phrases:
- "how much PTO do I have"
- "PTO balance"
- "vacation days left"
Flow:
- Explain that PTO balance is tracked in [payroll system, e.g., ADP]
- Provide direct link to the employee self-service portal
- Offer to escalate to Rachel if they can't access it
Note: we're NOT trying to look up balances directly. That's a connector project and likely Foundry territory for a real integration. The agent points users to the source.
Topic 3: Expense a meal / purchase
Trigger phrases:
- "expense a meal"
- "submit expense"
- "how do I expense"
- "expense report"
Flow:
- Explain expense policy highlights (what qualifies, max amounts)
- Link to expense report template
- Explain approval process (submit to Lisa by end of month)
- Link to the full expense policy in SharePoint
Topic 4: Health insurance questions
Trigger phrases:
- "health insurance"
- "insurance covers"
- "medical plan"
- "dental"
- "vision"
Flow:
- Explain this is a general info topic — specific coverage questions go to insurance broker
- Provide broker contact info
- Link to the benefits guide
- Mention open enrollment dates if relevant time of year
Topic 5: 401(k) questions
Trigger phrases:
- "401k"
- "retirement"
- "401(k) statement"
Flow:
- Point to Principal/Fidelity portal (or whichever plan administrator)
- Provide contact for plan administrator
- Link to generic plan doc
Topic 6: Report a tech problem
Trigger phrases:
- "my computer is broken"
- "IT issue"
- "can't log in"
- "tech problem"
Flow:
- Ask what the specific issue is
- If password reset → point to self-service Entra reset
- If general IT → create a Teams ticket with context for [IT partner or internal IT contact]
Topic 7: Remote work policy
Trigger phrases:
- "work from home"
- "remote work"
- "WFH"
Flow:
- Summarize policy: office staff, case-by-case basis, manager approval
- Link to full policy
- Direct to manager for specific requests
Topic 8: Calling in sick
Trigger phrases:
- "call in sick"
- "I'm sick"
- "sick day"
Flow:
- Remind them of the notification process (text/call dispatch by 6am)
- Field techs call dispatch directly
- Office staff notify Lisa
- Link to sick leave policy
Topic 9: Update personal info
Trigger phrases:
- "update my address"
- "change my W-4"
- "update beneficiary"
- "change my phone number"
Flow:
- Direct to self-service portal
- For things not in self-service (beneficiaries, etc.), route to Rachel
- Link to relevant forms
Topic 10: Escalate to Rachel (fallback)
Trigger: no other topic matched, AND generative answers returned low confidence Flow:
- Tell the user: "I'm not sure about that — let me get Rachel on it."
- Capture the user's question
- Action: Post a Teams message to Rachel with user name, question, and timestamp
- Confirm to user: "I've sent this to Rachel. She'll follow up."
The escalation action is the most important thing the agent does — it's the safety net.
5.1 Create a Power Automate flow
In Power Automate, create a flow triggered by Copilot Studio:
- Trigger: When Copilot Studio agent invokes this flow
- Input parameters: `user_name`, `user_question`, `conversation_snippet`
- Action: Post message to a Teams channel or chat with Rachel
- Format: something like:
``` 🔔 Helpdesk agent escalation
From: {user_name} Question: "{user_question}" Context: {conversation_snippet} Timestamp: {current time} ```
5.2 Connect to the agent
In Copilot Studio, in the Actions tab, register this flow as an action called `EscalateToRachel`.
5.3 Wire it to Topic 10
Edit Topic 10 to invoke this action when triggered.
5.4 Test it
Trigger Topic 10 manually; confirm Rachel (or the test user playing Rachel) gets the Teams message.
6.1 Use the Test pane
Copilot Studio has a built-in Test pane on the right side of the builder. Use it.
Test scenarios:
- "How do I request PTO?" → expect Topic 1
- "I forgot my password" → expect Topic 6 (or Entra SSPR flow)
- "What's my vacation balance?" → expect Topic 2
- "How do I expense lunch?" → expect Topic 3
- "Can I bring my dog to work?" → expect knowledge lookup or escalation
- "Um, weird question..." → expect gentle escalation
For each test:
- Did the right topic fire?
- Was the answer correct?
- Was the tone right?
- Did citations appear where relevant?
- If it escalated, did the Teams message arrive?
6.2 Iterate topics
If trigger phrases aren't firing correctly, add variants. If the generative answer is hallucinating, narrow the knowledge source or add explicit topic. If tone is off, adjust the agent's description and system guidance.
7.1 Publish
In Copilot Studio, click Publish. Name the version. Add release notes.
7.2 Deploy to Teams
In the Channels tab, enable Microsoft Teams. Copilot Studio will package the agent as a Teams app.
7.3 Upload to Teams admin center
Download the app manifest, upload via Teams Admin Center, and assign to:
- Pilot group first — 8 users in a dedicated group
- Full tenant later after pilot
7.4 Communicate
Send a short email to the pilot group with:
- What the agent is
- Where to find it (Teams left nav or Apps search)
- Example questions to try
- How to give feedback (👍/👎 in the agent, or email Rachel)
When Mike and Lisa see v1:
- Open Teams, find the agent
- Ask "How do I request PTO?" — watch it answer
- Ask "What does my health insurance cover?" — watch it guide to the broker
- Ask "Can I bring my dog to work?" — watch it escalate to Rachel
- Show Rachel getting the Teams notification
- Ask "How much PTO do I have left?" — watch it point to the self-service portal
Then frame it: > "This is v1. It handles 10 topics explicitly, and anything else gets searched against the handbook and benefits guide. Over the next 6 weeks, the pilot group will surface questions it doesn't handle well — we'll add topics and tune. By day 90, it should be handling 70%+ of what comes to Rachel today."
That demo closes the pilot phase. Mike and Lisa are now invested.
---
- Set up environment first — proper separation, DLP, licensing before anything else.
- Agent creation is description-first — Copilot Studio generates scaffolding from a well-written description.
- Knowledge sources live in a dedicated SharePoint folder — keeps scope clean, permissions manageable.
- Author explicit topics for the top 10 — the rest covered by generative answers.
- The escalation topic is the safety net. Build it first, make it reliable.
- Test systematically before publishing, iterate on trigger phrases and tone.
- Deploy to a pilot group first, not everyone. Always.
- The first demo closes the pilot phase. Show Mike and Lisa something they can touch.
---
Next up: Module 9 — When to Bring in Foundry. Northside's agent starts hitting limits; we graduate to Pattern 2.
---
Time: ~30 min (hands-on) Goal: Actually do (or simulate doing) the build. Nothing replaces hands-on reps.
---
If you have a tenant (your own or a Developer Program sandbox), actually do it. Create a Copilot Studio agent. Add at least two knowledge sources (upload PDFs or point at a SharePoint folder with a few sample docs). Configure at least three topics. Test in the Test pane.
If you can't do it live right now, plan it out in writing:
Agent name: ______________
Agent description (2 paragraphs, suitable for the description prompt): ```
```
First three topics:
Topic A: ______________ Trigger phrases (4+): ______________ Flow (2–3 steps): ______________
Topic B: ______________ Trigger phrases (4+): ______________ Flow: ______________
Topic C: ______________ Trigger phrases (4+): ______________ Flow: ______________
Knowledge sources planned:
- ______________
- ______________
Escalation action design (one paragraph): ```
```
Write 6 test questions that would stress-test the Northside agent — the ones likely to expose weaknesses. For each, predict what *should* happen.
- Test question: ______________
Expected behavior: ______________
- Test question: ______________
Expected behavior: ______________
- Test question: ______________
Expected behavior: ______________
- Test question: ______________
Expected behavior: ______________
- Test question: ______________
Expected behavior: ______________
- Test question: ______________
Expected behavior: ______________
Write the exact 3-minute script you'll use when you demo v1 to Mike and Lisa. What do you open with? What questions do you ask? In what order? What do you say between each one?
Your script: ```
```
---
Exercise 1: No single right answer. If you actually did it, you know. If you planned it, the key things to verify:
- Agent description is prescriptive about what it does and doesn't do (e.g., "never make up answers; always escalate when uncertain")
- Trigger phrases for each topic are varied and cover different phrasings (at least 4–5 per topic)
- Flows are specific and short (2–3 steps max for internal helpdesk)
- Knowledge sources are curated — not "point at the whole SharePoint"
- Escalation design captures enough context for Rachel to respond without another round-trip
Exercise 2 — examples of good stress-test questions:
- "My manager said I can take a half day. How does that work?" → Expected: should reference the PTO policy from the handbook (half-day granularity). Real test: does the handbook actually say? If not, this is a content gap to surface to Rachel.
- "I'm getting divorced and need to remove my spouse from my health insurance." → Expected: sensitive personal issue, should escalate to Rachel/HR with empathy, not try to answer procedurally.
- "What's the maximum amount I can expense for a client dinner?" → Expected: specific policy lookup. Should cite the expense policy. If the policy doesn't specify, should say "the policy doesn't specify a maximum — check with Lisa for approval."
- "Can I expense my home internet since I work from home sometimes?" → Expected: tests for policy nuance. Most SMBs don't have WFH stipend policies. Should escalate.
- "I'm going to be out for surgery next month for 6 weeks. What does that mean for my benefits?" → Expected: FMLA / short-term disability territory. Should escalate — this is a serious personal issue, not a Q&A lookup.
- "What's my base salary?" → Expected: NEVER answer. Agent should never have access to individual comp data. Should escalate or direct to self-service portal / Rachel.
If your agent fails on any of these, you have a content or topic gap to fix before rollout. These are exactly the kinds of questions that embarrass consultants when real users hit them in production.
Exercise 3 — sample demo script:
> "Mike, Lisa — I want to show you what we built. This is v1, deployed to just you three plus five others for the pilot. > > [Opens Teams, finds the agent] This is what your team sees. I'll ask a question Rachel gets 10 times a week: *[types] How do I request PTO?* > > [Answer appears] You see it explains the process, points to the form, reminds about advance notice, and cites the handbook. No follow-up to Rachel needed. > > Let me try one it's less sure about: *[types] Can I bring my dog to work?* > > [Answer may search the handbook, fail, and escalate] And here — Rachel, you're getting a Teams notification right now with the question and the person who asked. So you answer it once, and I'll show you the part that matters next. > > When Rachel answers it, we can add the answer to the handbook. Next time anyone asks, the agent handles it. The knowledge base gets smarter every week we use it. > > Last one: *[types] What's my 401(k) balance?* > > [Answer points to Principal portal] It's smart enough to not try to look up individual account data. It tells people where to go. > > That's v1. Over the next six weeks, the pilot group will find questions it doesn't handle well. We'll add topics and tune. Anything you want to try live?"
Why this works: three kinds of questions (good answer / escalation / appropriate redirect), shows Rachel receiving the notification live, explains the virtuous cycle of content growth, invites interaction. Under 3 minutes.
---
Check yourself: Could you do this build for a real client tomorrow? If there's any step you're nervous about, do it in a sandbox before you take client money. Foundry awaits in Module 9.
Previous: Project Kickoff: Northside HVAC Internal Helpdesk · Next: Adding Foundry: When and How