Skip to content

How to Build an Autonomous Agent in Copilot Studio: Step-by-Step Guide

How to Build an Autonomous Agent in Copilot Studio: Step-by-Step Guide

This guide shows you how to create a fully autonomous AI assistant in Microsoft Copilot Studio. The agent processes new form submissions, automatically assigns them to the right employee based on zip code, sends email notifications, logs the result, and notifies a supervisor via Teams, all without human intervention.

What Are the Types of Agents in Copilot Studio?

Three main types of agents exist, from simple to complex:

  • Retrieval Agents (Classic Chatbot): Answer questions using knowledge sources like web pages or SharePoint. Simple ask-and-answer bots (e.g., IT helpdesk, project tracker). For a complete example, see our Master AI Agents in Microsoft Copilot Studio: Complete IT Support Bot Tutorial.
  • Task-Oriented Agents (Personal Assistant): Complete specific tasks using Power Automate workflows triggered by conversation topics (e.g., submitting an expense report, requesting a new laptop).
  • Autonomous Agents (AI Assistant): Operate independently. Dynamically decide how to complete a process based on instructions and tools. Can hand off tasks to other agents and learn from past actions. This is the focus of this tutorial.

Scenario Overview: Landscaping Service Request Automation

A fictitious company, "Pragmatic Works Landscaping Solutions," receives customer requests via a Microsoft Form. The goal is to build an autonomous agent that:

  1. Detects when a new form response is submitted.
  2. Reads the response data (including zip code).
  3. Looks up an employee information Excel table to find the employee covering that zip code.
  4. Drafts and sends an email notification to the assigned employee.
  5. Logs the request details into a separate Excel log file.
  6. Posts a notification in Microsoft Teams to a supervisor.

Building the Autonomous Agent: Step-by-Step

Step 1: Prepare Your Data and Form

  • Microsoft Form: Create a form to collect customer requests (Name, Email, Zip Code, Service, Description, etc.). Duplicate the provided template.
  • Excel File (Employee Information): Table with Employee ID, Name, Email, and territory Zip Codes.
  • Excel File (Request Log): Table to store completed request details for future reporting.

Step 2: Create a New Agent in Copilot Studio

Navigate to copilotstudio.microsoft.com. Select "Create" > "New Agent." Use a descriptive name (e.g., "Pragmatic Works Landscaping Agent") and a clear description of its purpose. You can use the AI chat to help craft initial instructions or skip to configure manually. If you are new to Copilot Studio, our How to Use Copilot Studio: Complete Beginner Tutorial for Building AI Agents provides a solid foundation.

Step 3: Define the Trigger (Start of Automation)

Triggers tell the agent to start automatically. This is the core of an autonomous agent.

  1. Go to the Triggers section and select Add trigger.
  2. Choose "When a new response is submitted" (Microsoft Forms connector).
  3. Select your specific form from the dropdown or provide the Form ID.
  4. Key Setting: Under "Additional details" > "Authentication," select "No, pass through the owner's credentials" (assuming an external user submits the form).
  5. Click Create trigger. This trigger will automatically start the agent whenever a form is submitted.

Step 4: Add Tools (Power Platform Connectors)

Tools are the actions your agent can perform. Add them one by one, configuring each.

  • Tool 1: Get Response Details (Microsoft Forms):
    • Action: Get response details.
    • Configuration: Set authentication to "owner's credentials." Leave the form ID static (custom value) and the response ID dynamic (filled by AI).
  • Tool 2: List Rows Present in a Table (Excel Online):
    • Action: List rows present in a table.
    • Configuration: Point to your Employee Information Excel file and the specific table (e.g., Table1). Set authentication to owner's credentials.
  • Tool 3: Add a Row into a Table (Excel Online):
    • Action: Add a row into a table.
    • Configuration: Point to your Request Log Excel file and table. Set authentication to owner's credentials.
  • Tool 4: Draft an Email Message (Office 365 Outlook):
    • Action: Draft an email message.
    • Configuration: Set authentication to owner's credentials. Leave the "To" and body dynamic (AI will fill based on instructions). Set a static subject (e.g., "New Landscaping Request Assignment"). Add a description so the AI understands its purpose.
  • Tool 5: Send Draft Message (Office 365 Outlook):
    • Action: Send draft message.
    • Configuration: Set authentication to owner's credentials. No other inputs needed.

Step 5: Write Clear Instructions

Instructions are the most critical part. They tell the agent how to use the tools and in what order.

  • Role & Purpose: "You are a landscaping agent..."
  • Task Breakdown (Number Steps):
    1. Trigger when a new form response is submitted.
    2. Use the Get response details tool to extract Name, Email, Zip Code, etc.
    3. Use the List rows present in a table tool. Get all rows where the employee's zip code matches the submitted zip code. Use dynamic content (e.g., /listRowspresentInATable) to tie data between tools.
    4. Use the Draft an email message tool to create a notification for the assigned employee. Include customer name, service requested, and description.
    5. Use the Send draft message tool to send the drafted email.
    6. Use the Add a row into a table tool to log the request. Explicitly state which column gets which data (e.g., "Assigned Employee" column gets the employee's name).
  • Provide Examples: Give a sample email body or table row format.
  • Use "Do" instead of "Do Not" : Be positive and specific.

Step 6: Implement Agent-to-Agent Handoff (Optional)

Create a child agent to handle a specific subtask (e.g., notify a supervisor via Teams). For a deeper dive into how this works, explore our guide on Building AI Agents with Microsoft Copilot Studio – No Code Guide.

  1. Go to the Agents tab and select Add an agent > Child agent.
  2. Name it (e.g., "Notify Supervisor Agent"). Describe when it gets triggered (e.g., "Triggered when the main agent calls me after assigning a request").
  3. Add a Tool to this child agent: Post a message in a chat or channel (Microsoft Teams connector). Configure it to post a message to a specific supervisor or channel. Set authentication to owner's credentials.
  4. Write instructions for the child agent, e.g., "Post a message in Teams with the assigned employee name and project description."
  5. Critical Step: In the main agent's instructions, add a final step: "Call the Notify Supervisor Agent." Use /notifySupervisorInTeamsAgent (or whatever you named it) to add dynamic content.
  6. Publish the main agent before testing. Agent-to-agent handoff only works on published agents.

Testing and Verification

  • Test Trigger: Use the beaker icon in the Trigger view.
  • Activity Map: Watch each step execute in real-time.
  • Manual Form Submission: Submit a new form response. The agent should run automatically.
  • Check Outcomes: Verify the email was drafted/sent, the Excel log was updated, and the Teams notification was received.

Key Takeaways

  • Autonomous vs. Task-Oriented: Autonomous agents decide how to achieve a goal, while task-oriented agents follow a rigid step-by-step flow.
  • Triggers are Essential: They replace manual initiation, making the agent truly automatic.
  • Instructions are King: Vague instructions lead to errors. Be specific, use numbered steps, and provide examples.
  • Agent-to-Agent Handoff: Enables complex, multi-step business processes where specialized agents handle specific parts. For a practical example, our Creating Custom Agents with Microsoft 365 Co-Pilot: A Step-by-Step Guide is a helpful resource.
  • Publishing: Required for agent-to-agent handoff and live functionality.
  • Get Real Value: To understand the broader context, review our Microsoft 365 Copilot Complete Tutorial: How to Get Real Value.

You now have a fully functional, no-code autonomous AI assistant built with Copilot Studio. Start building your own to automate repetitive tasks and improve efficiency.

Keep this summary

Save it to LunaNotes and it becomes a real note in your library — editable, searchable, and ready to turn into flashcards or a diagram. Free to start.

Save to LunaNotes

Or summarise for another video.

This summary and transcript were automatically generated using AI with the Free YouTube Transcript Summary Tool by LunaNotes.

Related summaries

Build AI Agents with Microsoft Copilot Studio – No Code Guide

Build AI Agents with Microsoft Copilot Studio – No Code Guide

Learn how to create custom AI agents using Microsoft Copilot Studio without writing any code. This step-by-step tutorial covers building a customer service bot, connecting it to company documents, automating email responses, and publishing it for your team.

Master AI Agents in Microsoft Copilot Studio: Complete IT Support Bot Tutorial

Master AI Agents in Microsoft Copilot Studio: Complete IT Support Bot Tutorial

Learn how to build a fully functional AI agent in Microsoft Copilot Studio from scratch. This step-by-step tutorial covers agent creation, knowledge integration, custom instructions, topic building, and action automation to create an IT support bot that resolves tickets and answers queries.

How to Use Copilot Studio: Complete Beginner Tutorial for Building AI Agents

How to Use Copilot Studio: Complete Beginner Tutorial for Building AI Agents

This comprehensive tutorial walks beginners through every step of building a custom copilot agent using Microsoft Copilot Studio. Learn how to create agents from scratch, add knowledge from websites and documents, control conversations with topics, and publish your agent to demo websites—all within a free trial.

Creating Custom Agents with Microsoft 365 Co-Pilot: A Step-by-Step Guide

Creating Custom Agents with Microsoft 365 Co-Pilot: A Step-by-Step Guide

This video provides a comprehensive overview of the Agent Builder experience within Microsoft 365 Co-Pilot, enabling users to create personalized agents without any prior skills. It covers the process of customizing agents for specific business needs, connecting to various data sources, and refining agent functionalities.

Microsoft 365 Copilot Complete Tutorial: How to Get Real Value

Microsoft 365 Copilot Complete Tutorial: How to Get Real Value

Learn how to master Microsoft 365 Copilot in this comprehensive guide. Move beyond basic prompts to harness its full Work IQ for enhanced productivity across Teams, Outlook, Word, and Excel, with actionable strategies for creating agents and notebooks to automate tasks and get better results.

Found this summary useful?

Take it with you. One click puts it in your own LunaNotes library.

Save to LunaNotes

Start taking better notes today with LunaNotes