AgentCamp Lagos 2026

AI-Powered Approval System โ€” Build Guide

0 / 6 steps
Overview

What You're Building

A fully working approval system โ€” no code, no developer dependency. Users chat with a bot, a flow routes their request to the right approver, and everyone gets an email.

๐Ÿ‘ค User
Chats with bot
โ†’
๐Ÿค– Copilot Studio
Collects details
โ†’
โšก Power Automate
Routes + approves
โ†’
โœ… Approvals
Email: Approve/Reject
โ†’
๐Ÿ“‹ SharePoint
Audit log
๐Ÿ“‹
What the bot collects
These are the 5 variables Copilot Studio asks for
โ–พ
VariableTypeBot question
RequestTypeChoiceWhat type of request is this?
RequestTitleStringGive your request a short title
DescriptionStringDescribe your request in detail
RequesterNameStringWhat's your full name?
RequesterEmailStringWhat's your email address?
โšก
What the flow does
Step-by-step inside Power Automate
โ–พ
  • 1
    Triggered by HTTP POST from Copilot Studio
  • 2
    Parses the JSON body to extract variables
  • 3
    Switch on RequestType โ†’ sets the right approver email
  • 4
    Logs the request to a SharePoint list
  • 5
    Start and wait for an approval โ†’ sends adaptive card email to approver
  • 6
    Condition: if Approved โ†’ send approval email to requester, else send rejection email
  • 7
    Updates SharePoint item with outcome and approver comments
โฑ
45-Minute Plan
How to pace this build live
โ–พ
  • 5
    Problem + Architecture โ€” slides only
  • 5
    Show completed system โ€” quick demo of the end state so they know where they're headed
  • 20
    Build Power Automate flow โ€” live, with audience following along
  • 10
    Build Copilot Studio bot โ€” connect to the flow
  • 5
    Test + Q&A โ€” run it end to end
๐Ÿ’ก Pro tip Have a pre-built fallback environment ready. If live build hits an issue, switch to the complete version and explain what you'd have built.
Step 1

Create the SharePoint List

This is your audit log โ€” every request and outcome gets stored here automatically. Takes about 5 minutes to set up.

๐Ÿ“
Create the list
In any SharePoint site you have access to
โ–พ
  • 1
    Go to your SharePoint site โ†’ click + New โ†’ List
  • 2
    Choose Blank list
  • 3
    Name it exactly: Approval Requests
  • 4
    Click Create
๐Ÿ“Š
Add these columns
In the list, go to + Add column for each one below
โ–พ
Note: The Title column already exists by default โ€” rename it to RequestTitle. All others you add manually.
Column NameTypeNotes
RequestTitleSingle line of textRename the default Title column
RequestTypeSingle line of textIT, HR, Finance, Procurement, Other
RequesterNameSingle line of text
RequesterEmailSingle line of text
DescriptionMultiple lines of textPlain text, not rich text
ApproverEmailSingle line of textSet by the flow's Switch logic
StatusSingle line of textPending / Approved / Rejected
ApproverCommentsMultiple lines of textFrom the approver's response
RequestDateDate and Time
๐Ÿ’ก Demo tip Pre-populate 1โ€“2 rows so the list doesn't look empty when you switch to the SharePoint tab during demo.
โœ…
Setup checklist
Tick these off before moving on
โ–พ
SharePoint list "Approval Requests" created
All 9 columns added with correct types
Copied the full SharePoint site URL (you'll need it in the flow)
Step 2 โ€” Power Automate

Create the Flow

Build this inside a Solution so it can be deployed across environments. Takes about 5 minutes to scaffold.

๐Ÿ—‚
Create a Solution first
Always build inside a Solution โ€” it's how you deploy properly
โ–พ
  • 1
    Go to make.powerautomate.com
  • 2
    Click Solutions in the left nav
  • 3
    Click + New solution
  • 4
    Name: ApprovalSystem โ€” Publisher: your name โ€” click Create
  • 5
    Open the solution โ†’ click + New โ†’ Automation โ†’ Cloud flow โ†’ Instant
โš ๏ธ Important: Name the flow ApprovalRequestFlow. Do NOT choose "Automated" โ€” choose "Instant" so you can use HTTP trigger.
๐ŸŒ
Set the trigger: When an HTTP request is received
Paste this JSON schema to auto-detect all your variables
โ–พ
  • 1
    In the flow designer, change the trigger to When an HTTP request is received
  • 2
    Click Use sample payload to generate schema
  • 3
    Paste the JSON below โ†’ click Done
  • 4
    Save the flow โ€” the HTTP POST URL will appear. Copy it โ€” you'll need it in Copilot Studio.
{
  "RequestType": "IT Request",
  "RequestTitle": "Laptop replacement",
  "Description": "My laptop screen is broken",
  "RequesterName": "John Doe",
  "RequesterEmail": "john@company.com"
}
๐Ÿ“Œ
Add 2 Initialize Variable actions
These hold the approver's details โ€” set inside the Switch
โ–พ
  • 1
    Click + New step โ†’ search Initialize Variable
  • 2
    Name: varApproverEmail โ€” Type: String โ€” Value: leave blank
  • 3
    Add another Initialize Variable: varApproverName โ€” Type: String
Why at the top? Variables must be initialized before the Switch. Inside each Switch case you'll use Set Variable (not Initialize) to assign values.
Step 3 โ€” Power Automate

Build the Approval Logic

This is the core of the flow โ€” Switch routing, Approvals connector, and outcome emails. This is where the magic happens.

๐Ÿ”€
Add a Switch action
Routes to the right approver based on RequestType
โ–พ
  • 1
    Click + New step โ†’ search Switch (Control)
  • 2
    In the On field โ†’ click the dynamic content icon โ†’ select RequestType from the HTTP body
  • 3
    Click + Add Case for each request type below
// Case: "IT Request"
varApproverEmail  = "it-approver@company.com"
varApproverName   = "IT Manager"

// Case: "HR Request"
varApproverEmail  = "hr-approver@company.com"
varApproverName   = "HR Manager"

// Case: "Finance Request"
varApproverEmail  = "finance-approver@company.com"
varApproverName   = "Finance Manager"

// Case: "Procurement"
varApproverEmail  = "procurement@company.com"
varApproverName   = "Procurement Lead"

// Default (catch-all)
varApproverEmail  = "admin@company.com"
varApproverName   = "Admin"
๐Ÿ’ก For the demo Use your own email for all approver values so you can approve/reject in real time during the workshop.
๐Ÿ“‹
Log to SharePoint
Create an item in your Approval Requests list
โ–พ
  • 1
    After the Switch, add Create item (SharePoint)
  • 2
    Site: select your SharePoint site โ€” List: Approval Requests
  • 3
    Map fields using dynamic content from the HTTP body + variables:
ColumnValue (dynamic content)
RequestTitleRequestTitle from body
RequestTypeRequestType from body
RequesterNameRequesterName from body
RequesterEmailRequesterEmail from body
DescriptionDescription from body
ApproverEmailvarApproverEmail
StatusType: Pending (hardcoded)
RequestDateutcNow()
โœ…
Start and wait for an approval
This is the Approvals connector โ€” sends an email with Approve/Reject buttons
โ–พ
  • 1
    Add Start and wait for an approval (Approvals connector)
  • 2
    Approval type: Approve/Reject โ€” First to respond
  • 3
    Title: Approval Request: + RequestTitle
  • 4
    Assigned to: varApproverEmail
// Paste into the Details field:
You have a new approval request.

Type:        @{triggerBody()?['RequestType']}
Title:       @{triggerBody()?['RequestTitle']}
Requested by: @{triggerBody()?['RequesterName']}
Description: @{triggerBody()?['Description']}

Please approve or reject using the buttons below.
๐Ÿ“ง
Add outcome emails + update SharePoint
Condition on the approval outcome
โ–พ
  • 1
    Add a Condition action after the approval step
  • 2
    Left value: Outcome (from Approvals) โ€” Operator: is equal to โ€” Right value: Approve
  • 3
    If Yes branch: Send email to RequesterEmail โ€” Subject: โœ… Your request has been approved
  • 4
    If No branch: Send email to RequesterEmail โ€” Subject: โŒ Your request was not approved
  • 5
    In both branches also add Update item (SharePoint) โ€” update Status and ApproverComments
Hi @{triggerBody()?['RequesterName']},

Your request "@{triggerBody()?['RequestTitle']}" has been approved.

Approver comments: @{body('Start_and_wait_for_an_approval')?['responses'][0]?['comments']}

Thanks,
Approval System
โš ๏ธ Update item note: To get the SharePoint item ID for the Update item action, store the output of your Create item step. Use ID from the Create item dynamic content.
Step 4 โ€” Copilot Studio

Build the Bot

This is what the user talks to. It asks 5 questions, stores the answers, then fires the Power Automate flow you just built.

๐Ÿค–
Create the Copilot
Set up a new agent in Copilot Studio
โ–พ
  • 1
    Go to copilotstudio.microsoft.com
  • 2
    Click + Create โ†’ New agent
  • 3
    Name: Approval Request Bot
  • 4
    Description: Helps employees submit approval requests
  • 5
    Skip the AI instructions for now โ€” click Create
๐Ÿ’ฌ
Create the topic
This is the conversation flow that collects user details
โ–พ
  • 1
    In your agent, click Topics โ†’ + Add topic โ†’ From blank
  • 2
    Name the topic: Submit Approval Request
  • 3
    Add trigger phrases (at least 5):
submit a request
I need approval
raise a request
request approval
I want to submit something
help me with an approval
โ“
Add the 5 question nodes
Each question stores the answer in a variable
โ–พ
How to add a question: In the topic canvas, click + โ†’ Ask a question. Set the question text and the variable name below it.
#Question textInput typeVariable name
1 What type of request is this? Multiple choice
IT Request, HR Request, Finance Request, Procurement, Other
RequestType
2 Give your request a short title or subject User's entire response RequestTitle
3 Please describe your request in detail User's entire response Description
4 What is your full name? User's entire response RequesterName
5 What is your email address? (You'll receive a notification with the outcome) User's entire response RequesterEmail
โšก
Call the Power Automate flow
Connect the bot to the flow you built
โ–พ
  • 1
    After the 5th question, click + โ†’ Call an action โ†’ Create a flow โ€” this opens Power Automate
  • 2
    OR if your flow already exists: Call an action โ†’ Power Automate flows โ†’ select ApprovalRequestFlow
  • 3
    Map each input:
Flow inputBot variable
RequestTypeTopic.RequestType
RequestTitleTopic.RequestTitle
DescriptionTopic.Description
RequesterNameTopic.RequesterName
RequesterEmailTopic.RequesterEmail
โš ๏ธ Important: For the Power Automate connector in Copilot Studio to work, the flow must use the Copilot Studio โ€” Run a flow from Copilot trigger, not the HTTP trigger. You may need a second version of the flow with this trigger for the bot integration. The HTTP trigger version is still used for direct testing.
๐Ÿ’ฌ
Add confirmation message
Tell the user their request was submitted
โ–พ
  • 1
    After the flow call, add a Message node
  • 2
    Paste this message:
โœ… Your request has been submitted successfully!

Summary:
โ€ข Type: {Topic.RequestType}
โ€ข Title: {Topic.RequestTitle}
โ€ข Submitted by: {Topic.RequesterName}

Your approver has been notified. You'll receive an email at
{Topic.RequesterEmail} once a decision is made.

Thank you!
  • 3. Click Save โ†’ then Publish the agent.
  • Step 5 โ€” Final

    Test End-to-End

    Run the full system. If anything breaks, use the troubleshooting checklist below.

    ๐Ÿงช
    Test the flow first
    Use the built-in test panel before connecting the bot
    โ–พ
    • 1
      In Power Automate, open ApprovalRequestFlow โ†’ click Test (top right) โ†’ Manually
    • 2
      Paste this test payload:
    {
      "RequestType": "IT Request",
      "RequestTitle": "Test: Laptop replacement",
      "Description": "Testing the approval system",
      "RequesterName": "Mayowa Ogbeide",
      "RequesterEmail": "your-email@here.com"
    }
    • 3
      Check your inbox โ€” you should receive an approval email with Approve/Reject buttons
    • 4
      Click Approve โ†’ check that the requester email arrives and SharePoint updates
    ๐Ÿค–
    Test the bot
    Use the Copilot Studio test panel
    โ–พ
    • 1
      In Copilot Studio, open your agent โ†’ click Test (top right)
    • 2
      Type: I need approval
    • 3
      Answer all 5 questions the bot asks
    • 4
      Confirm the confirmation message appears
    • 5
      Check your inbox for the approval request email
    ๐Ÿ”ง
    Troubleshooting
    Most common issues and how to fix them
    โ–พ
    • !
      Flow not triggering from bot: Make sure you're using the Run a flow from Copilot trigger in the flow, not HTTP trigger. Create a separate flow copy for the bot.
    • !
      SharePoint "item not found" on update: Make sure you're using the ID output from Create item โ€” not a hardcoded value.
    • !
      Approval email not arriving: Check the Approvals connector is authenticated under your own account. Go to Flow โ†’ Connections.
    • !
      Switch not matching: Ensure the Case values match exactly what the bot sends โ€” same capitalisation, same spacing. "IT Request" โ‰  "it request".
    • !
      400 error on HTTP trigger: Double-check the JSON body matches the schema. Never use hardcoded IDs or UUIDs in the flow body.
    ๐Ÿ
    Final pre-demo checklist
    Run through this the morning of AgentCamp
    โ–พ
    Flow test run passes end-to-end (approval email received + SP updated)
    Bot test run works in Copilot Studio test panel
    Your email is the approver for all Switch cases (so you can demo approving live)
    SharePoint list has 1โ€“2 pre-existing rows for visual effect
    Fallback environment (pre-built complete system) is ready and tested
    Slides deck open, speaker card has your photo
    Browser tabs pre-opened: PA, Copilot Studio, SharePoint, Inbox
    ๐ŸŽฏ You're ready. You're presenting a real production pattern โ€” Switch-based routing, Approvals connector, audit logging โ€” the same architecture you've used on actual client projects. Own it.