Build an Autonomous AI Agent in Microsoft Copilot Studio

Publicado em

Vídeo em Inglês, publicado pelo canal m365 Show by Mirko Peters [Microsoft MVP].

About this content: The summary, key points and topics below are generated automatically from the video transcript. They reflect the content, opinions, claims and predictions presented in the video and do not represent a position, validation or fact-check by IA Dots.

Video summary

The video presents a method to build an autonomous agent using Microsoft Copilot Studio and Power Automate to automatically process Excel-based Requests for Information (RFIs). It explains how to set up triggers, filters, generative AI question-answering loops, and write-back mechanisms to eliminate manual data entry.

Key points

  • Autonomous agents in Copilot Studio operate independently using triggers, logic, and orchestration without needing human supervision for every step.
  • Power Automate acts as a gatekeeper, detecting incoming emails with Excel attachments, filtering for valid file types, and creating controlled copies in SharePoint.
  • The agent loops through structured Excel tables row by row, isolating individual questions to prevent context bleed while utilizing generative AI to formulate answers.
  • Knowledge grounding can be configured using either web searches via Bing or internal custom sources like SharePoint to ensure compliance and accuracy.
  • After generating the responses, Power Automate retrieves the updated spreadsheet, implements a synchronization delay, and replies to the original email thread automatically.

Topics

Microsoft Copilot StudioPower AutomateAutonomous AgentsExcel AutomationGenerative AISharePoint IntegrationRFI Processing
Video transcript

Transcript from available captions; it may contain errors.

Excel, humanity's favorite self-inflicted punishment disguised as productivity software. Every office has one, the person who still believes the best way [music] to complete a request for information spreadsheet is to manually copy and paste 50 answers from a Word document into neatly bordered [music] cells. Watching them is like watching someone chisel an email on stone tablets. It's moving in an anthropological sense. The [music] truth is, most professionals still handle Excel RFIs like it's 1999. >> [music] >> Repetitive, error-prone, painfully manual. Every incoming spreadsheet is another ritual of drudgery. Open email, download attachment, scan the rows, mutter obscenities, start copying [music] answers cell by cell. One typo, one wrong paste, one missing semicolon, and an entire department spends half [music] a day blaming the formula. Now, imagine refusing that fate. Imagine delegating the entire [music] misery to a machine that doesn't get bored, doesn't make typos, and certainly doesn't need coffee. That's an autonomous agent, software that performs the cycle entirely on its own. It reads the Excel file, interprets the questions, >> [music] >> finds the answers using generative AI, writes those answers back into the same file, and emails the completed masterpiece straight to the requester. You aren't just [music] saving time, you're eliminating the concept of busy work entirely. We're going to build that agent inside Microsoft Copilot Studio and Power [music] Automate, a practical rebellion against the spreadsheet status quo. I call it a hack because it bends Excel far beyond its original [music] purpose. 20 minutes from now, you'll have a process that upgrades itself while you sip your coffee and contemplate how obsolete you've become. Let's start by dissecting the organism. The anatomy [music] of an autonomous agent blueprint. First, let's define what we're actually creating. In Copilot Studio, [music] an autonomous agent isn't a polite chatbot that waits for instructions. It's a self-operating construct with three core components: a trigger, [music] logic, and orchestration. The trigger starts the process, an event like a new email arrives, or a file is uploaded to [music] SharePoint. The logic defines what to do when that happens. The orchestration handles which external tools or flows to call so everything happens in the right sequence. Think of it like an assembly line, [music] but instead of factory workers, you have Power Platform components passing digital parts to one another. Power Automate receives the email, stores the file, and notifies the agent. >> [music] >> Copilot Studio reads the spreadsheet, brainstorms answers using generative AI, and writes them back. Finally, Power Automate reattaches [music] the result and sends the email reply. Three systems, one continuous thought process. Now, [music] this is where most people get confused. Microsoft talks about Copilot as if it's one thing, but there's a crucial difference between the standard Copilot Studio agent. [music] The normal Copilot waits for you to talk to it. The Studio agent doesn't need your supervision. It can trigger itself based on conditions you define. It's the difference [music] between a helpful intern and an employee who runs the department while you're asleep. Why use an RFI workflow as the sandbox? Because RFIs are beautifully structured [music] chaos. Each row contains a question and expects an answer. The pattern never changes, just the content. [music] That makes it a perfect laboratory for machine intelligence, structured enough to automate, [music] varied enough to justify using generative AI. You know exactly what good looks like. Every question answered, neatly returned, zero emotional trauma. Before we dive deeper, [music] let's draw a mental diagram. Start with an email containing the Excel attachment. That email [music] lands in a shared mailbox. Power Automate detects the file, verifies it's the right format, then copies it to a SharePoint location like a [music] digital staging area. The agent in Copilot Studio then receives a message telling it which [music] file to process. The agent opens that file, iterates through the questions, produces answers using its configured [music] knowledge base or being grounding, and writes the responses back into the original table. When it's done, >> [music] >> Power Automate picks the file up again and emails it to whoever made the request. So, the data flows like this: email, SharePoint, Copilot Studio, Power [music] Automate, email reply. That's the anatomy of autonomy. Triggers initiate, logic decides, [music] and orchestration executes. But, autonomy doesn't mean omniscience. An agent can't improvise outside its boundaries. You have to define its permissions [music] and give it the context it needs. Where the file lives, what to read, where to write, and when to ask for [music] help. Leave any of that vague and the agent will pause politely waiting for a human who never arrives. That's the blueprint, comprehension before configuration. [music] Now that you know what the machine needs to be, we can start feeding it because the next step is teaching Power Automate to act as the gatekeeper, filtering the inputs and delivering them to your [music] new digital employee with mechanical precision. And once that's in place, that's when the fun really starts, watching [music] the machine think. Feeding the machine, input flow design. Every great automation begins with an act of bureaucracy. [music] In this case, it's an email, specifically an email arriving in a shared mailbox, the digital equivalent [music] of a pigeon hole where everyone dumps their urgent requests and promptly forgets them. That's our entry point. The incoming message completes the first link [music] in the chain and Power Automate stands ready as the gatekeeper. Now Power Automate doesn't simply wait around like an intern checking [music] the inbox every 5 minutes. It's configured with a precise trigger, when a new email arrives in the shared mailbox. >> [music] >> This is our first automation principle. Don't rely on human observation, rely on conditions. The flow springs into existence [music] the moment an attachment lands, eliminating the age-old problem of "I didn't see that email." The first action is filtration. >> [music] >> You tell Power Automate to ignore every attachment that isn't XLSX. PDFs, screenshots, and the occasional cat photo of the team [music] celebrating fiscal year end are discarded with prejudice. Without this rule, your agent would attempt to interpret a JPEG [music] of a chart and politely fail. Filtering saves CPU cycles and your professional dignity. Inside the flow, [music] the condition reads almost poetically. If attachment name ends with XLSX, [music] continue. That one line separates order from chaos because chaos in the world of automation always [music] begins with unexpected file types. Once the file passes inspection, the next challenge is [music] structure validation. A valid Excel file must contain a name table and the name matters. In [music] our universe, it's stubbornly fixed as table one. If that sounds rigid, good. It keeps Power Automate sane. >> [music] >> Without a table, Excel is just a digital whiteboard full of merged cells, hidden columns, and despair. A defined table, on the other hand, gives the [music] agent a predictable schema, columns for question, answer, and any contextual data you define. The table [music] is the skeleton. Without it, there's nothing to animate. When Power Automate encounters a file, [music] it doesn't edit it directly from the mailbox. That would be barbaric. Instead, it creates a controlled copy in SharePoint. Think of this as moving the file from a [music] noisy public street to a laboratory bench. SharePoint provides versioning, consistent URLs, and secure access tokens, allowing Copilot [music] Studio to interact with the data safely. Every automation should log its input somewhere stable. SharePoint is [music] that stability wrapped in corporate compliance. Now that the file rests in SharePoint, the flow extracts its file ID, a unique identifier that lets [music] the agent find the exact specimen later. Alongside this, it pulls the message ID, the address of the original email that brought [music] us this problem in the first place. Both IDs become reference points in the upcoming conversation with the agent. [music] This is metadata hygiene 101. Track everything that enters your system so you can close [music] the loop properly on the way out. At this point, you might be wondering why we care so much about pristine naming conventions. Simple. >> [music] >> If your file names read like final final RFI V23 at class, >> [music] >> you're effectively speaking in tongues to a robot. Machines thrive on uniformity. Humans apparently [music] do not. Name your files predictably and your agent will thank you by not crashing. With the file validated [music] and safely stored, the flow sends a precise prompt to the Copilot Studio agent. This message is deliberately [music] phrased something like, "Perform an RFI on file ID X and reply to message ID Y." No flowery prose, no passive-aggressive context, [music] just clear machine-readable intent. Ambiguity is the mortal enemy of automation. This is also where the concept of structured [music] prompting appears. It's not enough to tell the agent, "Process the file." You must include context, the file scope, the expected action, [music] and the destination for the response. That triad forms linguistic scaffolding for the AI's behavior. Without it, the agent might attempt [music] something admirable but irrelevant, like composing polite email replies instead of populating cells. [music] Data integrity is everything here. Every automation enthusiast eventually learns that unstructured spreadsheets are digital landmines. The difference between a clean table and a messy one can [music] decide whether your process looks brilliant or cursed. Power Automate loves order. Rows [music] are records, columns are variables, and merged cells are crimes against logic. When you hand the agent a properly formatted table, [music] you're not just giving it data, you're feeding it understanding. At this stage, our Power Automate flow has achieved three milestones: detection, validation, and preparation. The email [music] trigger caught the incoming message, the filter ensured only legitimate Excel files survive, [music] and the SharePoint copy provided a stable data habitat. Now, the machine has what it needs to begin digestion. In other words, it's feeding time. >> [music] >> The completed flow hands the baton to Copilot Studio, packaging all necessary information, file location, IDs, and instructions, and sending the prompt for processing. The agent [music] doesn't care how many people ignored the inbox this morning or how many versions of the spreadsheet exist. It simply takes [music] the most recent, opens the table, and begins reasoning through the questions inside. And that brings us to a turning point. The machine now holds [music] food for thought, a literal list of questions awaiting responses. The input stage is done. The gates are open, the parameters are fixed, and chaos has been tamed [music] into schema. The next phase is cognition. How the agent reads those rows, interprets them, and generates credible answers one by one without human prompting. [music] Now that we've fed the machine, it's time to watch it chew. The AI brain generative answer loop. At this point, the [music] file is sitting quietly in SharePoint like a patient in triage. It's now the Copilot Studio agent's turn to [music] play doctor, diagnose each question, and prescribe an answer. This is where intelligence replaces automation, where the system doesn't just move [music] data but understands it. Enter to RFI topic, the cognitive hub of our agent. A topic in Copilot Studio is essentially a conversation blueprint, a series of steps the agent executes when triggered. [music] But in this context, there's no chat bubble, no human to appease. The RFI topic works [music] silently, executing one question at a time in need deterministic order. Each question [music] is a short exam. Each answer is an essay drafted by the AI's generative brain. First, the topic receives [music] input parameters, namely the file ID pointing to our SharePoint copy. It then runs the list rows present in a table action. >> [music] >> This command fetches the entire table not as rows and columns, but as structured data. >> [music] >> The agent passes this into a record variable, its internal snapshot of our Excel world. Within that record [music] lies an array of all rows stored conveniently under something like record value. >> [music] >> That's the data buffet the agent is about to consume. Here's where structure meets logic. You instruct the agent to set that array as items, the working collection it will loop through. Then, using a for each loop, the agent examines every row in sequence. No skipping, no bias, no [music] complaint. For each row, it extracts the question field and targets it for the next phase, >> [music] >> generation. This design choice, isolating one question at a time, isn't arbitrary. It's about avoiding what I call context bleed. In large language models, [music] dropping multiple prompts at once invites contamination. One question's context may pollute the next answer. By isolating each prompt, we enforce mental hygiene. The agent forgets after every row, ensuring [music] each answer is born innocent, untainted by its sibling's confusion. Now comes the showpiece, the create generative answers node. This is the Copilot [music] Studio equivalent of a turbocharged brain cell. You provided the question text, instructed to find or synthesize the best possible [music] answer based on the agent's knowledge sources, and it does the rest. The agent doesn't [music] chat, it computes. This distinction is critical. Autonomy doesn't crave conversation, it just wants to complete the assignment. To maintain [music] discipline, disable the send message property in this node. That switch is buried in the advanced settings, and turning it off [music] silences the default chat output. Why? Because you don't want this agent trying to hold a polite dialogue with itself. It's not journaling its thoughts, it's working. All answers will instead be stored into a variable. Usually something elegantly named like AI response. This is the agent's notebook holding generated answers in a neat queryable form. Once the AI response variable is populated, the agent runs an update row command. Think of these [music] as the robot's mechanical arms. One inserts answers precisely where they belong matching each response to its original [music] question. It uses the same file ID, the same table name, and targets row based on the current question's identifier. Within seconds, the once empty answer [music] column begins filling like a self-writing report. At this point, you've achieved the AI cognitive loop. Read reason respond >> [music] >> record. It's not thrilling to watch, unless of course you appreciate the quiet power of automation that thinks. What used to demand hours now happens faster [music] than Excel can update its own cells. Now, let's talk about knowledge grounding, the invisible compass that guides these answers. In Copilot Studio, you have two main options. [music] Use information from the web or custom knowledge base. The web option connects through Bing's search grounding, allowing the agent to pull live data. A broad but volatile approach. >> [music] >> Great for general research, unacceptable for proprietary domains. When confidentiality matters, you disable [music] web grounding and feed your own SharePoint or Dataverse sources. That's how you keep [music] the agent smart and loyal. This decision defines the soul of your build. Using web grounding gives your agent encyclopedic awareness [music] but little restraint. It might summarize an outdated blog as gospel truth. A custom knowledge [music] base narrows its range but increases precision and compliance. In regulated environments, reliability [music] always outperforms creativity. Let your lawyer sleep at night. Choose internal grounding. To verify the loop [music] works, you can examine Copilot Studio's run transcript. You'll see each iteration unfold, the [music] prompt dispatched, the generative node responding, and the updated row written. It's oddly satisfying like watching a conveyor belt that [music] manufactures understanding. Each record moves from ignorance to enlightenment, one question, [music] one answer, one sigh of relief from your future self who didn't have to do it manually. [music] Technically, this is low-code design, but conceptually, it's digital philosophy. The agent's [music] mind, such as it is, exists only for the duration of the loop. The moment it finishes the last row, [music] its memory resets. It doesn't worry about tomorrow's email or last week's mistakes. It performs, forgets, and waits for [music] the next assignment. In a sense, it's the perfect employee, tireless, obedient, and incapable of water cooler gossip. Developers sometimes ask, "Can't I just send all the questions at once and get a single giant [music] answer?" You can, but that's not autonomy, that's chaos. One bloated prompt leads to inconsistent formatting and nonsense context linking. The [music] loop ensures determinism. Each question becomes a self-contained unit of work, a micro [music] contract the AI must fulfill. Autonomy loves repetition. It's predictable by design. By now, the Excel file itself is slowly transforming. Empty cells are being filled with [music] machine-crafted sentences drawn either from Bing's ephemeral wisdom or your internal documentation. >> [music] >> Each update row command locks those results into permanence, a timestamped act of automation. From the user's perspective, the file [music] they sent out blank will soon return with every question neatly answered. No human typing, no intermediate drafts, no accidental reply all. This is the moment the system transitions from analysis [music] to execution. The answers now exist. They simply need to be delivered. And that requires reconnecting [music] with Power Automate, which must collect the updated file and compose the return email. But before we hand control back, pause to [music] appreciate what just occurred. A trigger sparked process, data became prompts, prompts became prose, and prose became data again. The circle is complete, [music] and it all happened silently, without you. Autonomy isn't magic, it's just very well-defined [music] logic pretending to think. Next, the machine stops rationalizing and starts communicating. [music] Time to give our newly enlightened spreadsheet a voice and let it reply on your behalf. The write-back and reply mechanism. [music] Now that the agent has finished its quiet scholarship, we hand the pen back to Power Automate, [music] the part of the process that turns brain work into bureaucracy once again. The job, collect [music] the updated Excel file, attach it to an email, and send it home as though a meticulous human had done the work all along. Only faster, cleaner, and with zero existential dread. The first challenge is timing. In [music] automation, time isn't arbitrary, it's mechanical tolerance. Copilot Studio expects Power Automate to respond within roughly 100 seconds [music] of being called, or it assumes the process failed. This is Microsoft's polite way of saying, "Don't dawdle." So, the reply flow has to act with [music] precision, following a simple template. Receive input, wait only as long as necessary, reply, and close. >> [music] >> That's where a small but vital trick comes in, deliberate delay. Excel, for all its decades [music] of service, updates cloud files about as quickly as a PowerPoint deck loads during a conference call, [music] meaning you need to give it a moment. Most builders add a 2-minute delay block to guarantee all AI-written [music] rows actually register in SharePoint before anyone retrieves the file. It's not laziness, it's synchronization. [music] Computers can execute faster than storage can confirm. Once the pause expires, the flow [music] performs its surgical retrieval. It uses get file content to pull the finished spreadsheet from SharePoint. This step reads the complete binary package, [music] not just the table, ensuring that what's attached to the outgoing email is precisely what the agent last [music] wrote. No phantom buffering or half-filled cells. Paired with this, get email [music] V3 fetches metadata from the original request, sender, subject, and message ID. Without those, your reply arrives [music] like a lost drone, fast, but to nowhere. The actual dispatch is handled by sent email with attachment, referencing the archived message ID so the thread remains [music] intact. Power Automate dutifully reattaches the freshly answered Excel file, creating [music] the illusion of manual correspondence. Watching this step complete is strangely cathartic. The once-blank sheet [music] is returned transformed, answers intact, timestamped, and perfectly aligned, like grading a test where the student was an algorithm. Let's talk failure [music] tolerance because not every Excel file behaves. Maybe the table name isn't table one. Maybe someone merged the header cells [music] into a decorative mural. When this happens, the update flow should surface a controlled error [music] rather than implode. Add a conditional check. If the table isn't found, send a courteous notification reading RFI processing failed, invalid structure. It sounds human [music] and prevents 20 panicked Teams messages wondering why the AI ghost isn't answering emails anymore. Performance, too, demands foresight. Updating hundreds of rows [music] individually can bog down a flow. The trick is batching, collecting rows, updating them in groups, or leveraging parallel [music] branches with care. Microsoft's own optimization notes warn that unlimited loops invite latency. Translation, automation doesn't mean recklessness, [music] it means measured efficiency. By now, the full choreography unfolds. Copilot Studio finishes cognition. Power Automate delays for sync, retrieves the content, [music] packages it with metadata, and dispatches the response. The requester receives an email with their original attachment, only now filled with answers generated, >> [music] >> validated, and timestamped automatically. No one typed, no one waited, and nobody opened Excel [music] except the ghost in the machine. Autonomy has officially achieved output, but as any responsible [music] adult in IT governance will remind you, autonomy and anarchy are not synonyms. Before you walk away from your creation, perhaps to brag on LinkedIn, you must confront the [music] unglamorous frontier of oversight. That brings us to the part every technologist loves to ignore, scaling, governance, and reality itself. Scaling, governance, and reality checks. [music] Let's shatter the illusion early. Your autonomous agent is brilliant, but it isn't omnipotent. It operates within walls, [music] specifically the sandbox that Microsoft built. Copilot Studio agents follow consumption quotas, API throttles, and what the documentation charmingly [music] calls responsible behavior boundaries. Translation, your agent isn't going rogue because Microsoft's servers won't let [music] it. First, autonomy boundaries. The agent can act only within explicit instructions. It won't improvise new processes, [music] correct user mistakes, or self-replicate. That's not a flaw, that's civilization. You define its environment, [music] SharePoint paths, table schemas, connection rights, and it abides. Think of it as a digital intern locked in a [music] well-labeled office. Leave the door open and it won't explore. It'll still wait for permission. That limitation [music] prevents chaos and maintains auditability. Next comes scale. Excel, while iconic, is a fragile habitat for autonomy. Once your RFI volumes balloon [music] beyond a few hundred rows or involve concurrent users, migrate the data model. Dataverse or SharePoint lists transform [music] random file handling into properly governed data operations. The same Power Automate logic applies, [music] but the storage back-end no longer groans under simultaneous edits. In essence, Excel was the training wheels. Enterprise-grade [music] workflows ride Dataverse. Then there's governance, Microsoft Purview for data classification [music] and Entra agent ID for identity control. Every autonomous agent should wear a digital [music] badge declaring who owns it, what it can touch, and when it last behaved. This isn't theatrics, it's accountability. In a world of increasingly [music] agentic AI, audit trails are moral fiber. Keep them intact or risk your automation being labeled Shadow [music] IT. Now, accuracy and compliance. The RFI may generate answers, [music] but who guarantees truth? Generative AI's greatest gift is eloquence. Its greatest flaw is confidence. [music] That's why human in the loop remains non-negotiable. Periodically sample outputs and validate against source documentation. [music] In regulated sectors, record these checks as compliance evidence. According to best practices [music] in accuracy testing, combining automated benchmarks with manual review dramatically [music] reduces hallucination risk. Translation, let AI draft, but let humans judge. Operationally [music] adopt Power Automate best practices, monitor flow run history, watch for throttling, archive logs, and iterate on schema. A workflow [music] isn't furniture, it requires maintenance. Microsoft even published guidance stressing named tables, minimal loops, and active performance monitoring. Ignore it and your autonomous agent will spend [music] eternity retrying failed runs like Sisyphus pushing data uphill. And finally, think forward. Copilot Studio already hints at multi-agent orchestration, agents [music] delegating subtasks to other agents. Imagine one bot sourcing project data, while another summarizes it, and [music] a third dispatches the report. That's coming. Your RFI agent is merely the apprentice to that ensemble. But without the governance [music] disciplines you establish now, multi-agent systems will become multi-agent messes. So, the reality check, autonomy doesn't absolve you of responsibility. It transfers [music] it. You've automated labor, not accountability. The spreadsheet now answers itself. Yes, but you still own its truth, its traceability, and its tone. And that's the paradox [music] of progress. The smarter your tools, the more deliberate you must be in using them. Maintain guardrails, document limits, and treat your autonomous Excel hack not as rebellion, [music] but as refinement. Civilization by delegation. Now, the machine runs itself. The only unresolved question is obvious. If your spreadsheet can operate independently, what exactly do you [music] plan to do with the extra time? The elegance of lazy automation. There's an art to doing less. Not ignorance, efficiency disguised as detachment. [music] What you just built isn't a tool, it's a statement. You took a task that once required caffeine, [music] despair, and overtime, and turned it into a job that completes itself. That isn't laziness, it's civilization [music] showing off. The autonomous agent doesn't just automate clicks. It converts attention into architecture. Emails become triggers, spreadsheets become conversations, and Power Automate becomes the courier that never sleeps. >> [music] >> The outcome is elegant precisely because it disappears. You don't see the machine working. You only witness the absence of hassle. So, here's the real lesson. Automation is [music] not about speed, it's about reduction. Each rule you defined, each flow you connected, is one fewer [music] human decision required tomorrow. The agent answers questions, sends replies, and retires silently, leaving you free to chase higher-order problems, or take a [music] very dignified nap. Excel, that ancient symbol of persistence, finally learns self-preservation. The same program that once punished inefficiency now rewards foresight. It reads, [music] it responds, it redeems. The spreadsheet has entered enlightenment. Of course, this hack breaks expectations. Excel was never meant to hold consciousness, and yet here we are, watching cells fill [music] themselves out of obligation rather than instruction. If that doesn't feel like progress, you may still be merging cells manually. Let the autonomous era begin with humility >> [music] >> and a checkbox labeled run automatically. Lock in your upgrade path, subscribe, enable alerts, and let knowledge deliver itself. The next generation of workflows won't ask for your approval. [music] They'll ask for your email address. Send it in and the machine will handle the rest.

Assistir ao vídeo original no YouTube

Assuntos: Agentes de IA, Assistente pessoal. Publicado no YouTube em 2026-10-23.

Seleção automática por assunto e idioma. O vídeo pertence ao canal de origem.

Comentários

Postagens mais visitadas deste blog

How to build a JARVIS AI Voice Agent for FREE | Full Livekit Tutorial (2026)

How Does AI Actually Work? 🤖 | AI, Machine Learning & Generative AI Explained