Build an Autonomous Agent Step by Step Using Copilot Studio

Absolutely! Here’s a step-by-step blog version of your tutorial, written in a clear and structured way for your subscribers. You can copy-paste this to your website or blog platform and customize further if needed.


In this blog, I’ll walk you through how to build a fully autonomous AI agent in Copilot Studio to streamline citizen support service requests received via email — without writing a single line of code.

By the end, your agent will be able to:

✅ Automatically read and understand incoming emails
✅ Identify the issue and urgency
✅ Create a ticket in Dataverse
✅ Respond to the citizen with a professional HTML email

Let’s get started!


💡 Use Case Overview

Local government departments often receive service requests or complaints via email. These may include issues like:

  • Missed garbage collection
  • Housing problems
  • Streetlight or electricity issues

Currently, these emails require manual triage and response. But what if we could automate the whole process with an AI-powered autonomous agent?


🧠 What is an Autonomous Agent?

An Autonomous Agent in Copilot Studio is an AI-driven system that can:

  • Perform tasks
  • Make decisions
  • Interact with users without human intervention

It goes beyond traditional automation by understanding the context of data using AI. Unlike chatbots, this agent runs in the background—no chat interface needed!


🗂️ Complete Video Tutorial for the same Blog

🗂️ Step 1: Prepare Your Data Table

First, create a Dataverse table called Citizen Support. Here’s the suggested schema:

Column NameType
Ticket IDAuto Number
SubjectSingle Line Text
DescriptionMultiline Text
PrioritySingle Line Text
Estimated Resolution DateSingle Line Text

You can create a Model-Driven App to visualize this data in a view.


🤖 Step 2: Create the Autonomous Agent

  1. Go to Copilot Studio
  2. Create a new agent
    • Name: Citizen Customer Service
    • Description: “An autonomous agent for customer service that identifies the context of incoming emails, determines urgency, replies professionally, and creates support tickets in Dataverse.”
  3. Skip instructions for now — we’ll add those later.

🛠️ Step 3: Create Actions for the Agent

✅ Action 1: Create a Support Ticket

  1. Go to Actions > Add Action
  2. Select Dataverse connector > Add a new row to a selected environment
  3. Name the action: Create Support Ticket
  4. Authentication: Use Copilot authentication
  5. Set input parameters:
    • Environment: Choose your Dataverse environment
    • Table Name: Citizen Support
  6. Add dynamic input fields:
    • Subject – “Summary of the email subject”
    • Description – “Description of the issue based on email”
    • Priority – “Categorize as High, Medium, Low based on urgency”
    • Estimated Resolution Date – “Set based on priority: 24/48/72 hours”
  7. Set output parameter:
    • Ticket ID – “This is the generated ticket number”

✅ Done!


📧 Action 2: Send Email to Citizen

  1. Add another action: Send an email (V2) using Outlook
  2. Name it: Send an Email
  3. Authentication: Copilot authentication
  4. Set dynamic input fields:
    • To – “The sender of the incoming email”
    • Subject – “Professional response subject”
    • Body – Instructions: “Respond that the ticket has been received. Include the ticket number, priority, description, estimated resolution date. Use professional tone and HTML format.”

✅ Email reply action complete!


🔁 Step 4: Add Autonomous Trigger

  1. Go to Overview > Add Trigger
  2. Choose: When a new email arrives
  3. This creates a Power Automate trigger in the background
  4. Optionally, open the flow and filter emails:
    • Only trigger if Subject contains Support Ticket

✅ Your agent is now listening to emails!


🧾 Step 5: Add Instructions to the Agent

Go to General Instructions and add:

You need to completely automate the auto-reply process of any support emails you are receiving.

As soon as an incoming email arrives:
1. Determine the urgency of the issue and categorize it into High, Medium, or Low priority.
2. Call the action `Create Support Ticket` to generate a support request and get the ticket ID.
3. Draft a professional email using the `Send an Email` action, including ticket number, priority, description, and estimated resolution time.
4. Use natural language and proper HTML formatting in your response.

Save and Publish your agent.


🧪 Step 6: Test the Agent

  1. As a citizen, send an email to the configured address:
    • Subject: “Support Ticket: Missed Garbage Collection”
    • Body: “Our garbage was not collected yesterday. Kindly resolve. This is urgent.”
  2. The agent will:
    • Categorize the issue as High Priority
    • Create a support ticket in Dataverse
    • Send a professional HTML email with the ticket info
  3. Check your Dataverse table — you’ll see the new ticket.
  4. Check your inbox — you’ll see the reply!

🎯 Result

✅ Fully automated ticket creation
✅ Intelligent prioritization
✅ Personalized, professional responses
✅ No manual effort required


🎓 Learn More

If you’re new to Copilot Studio, check out my Crash Course (1h 30min) on YouTube covering basics + 3 real-life use cases.

🔗 Watch the Full Crash Course


❤️ Show Some Love

If this helped you:


Let me know in the comments what other use cases you’d like to see next.
Until then — keep automating!


Would you like a Markdown or HTML version of this blog to directly copy into your site or CMS?

Leave a Reply

Discover more from Power Platform Trainings

Subscribe now to keep reading and get access to the full archive.

Continue reading