Tutorials/Copilot Studio/Automate Web Data Extraction with Computer Use Agents in Copilot Studio
Copilot Studiointermediate

Automate Web Data Extraction with Computer Use Agents in Copilot Studio

Build an agent that uses the Computer Use tool to open websites, pull specific data fields, and send the results via email—no custom API required.

NA
Narmer Abader
@narmer · Published June 3, 2026

Copilot Studio’s Computer Use tool expands what an agent can do by letting it interact with a remote Windows machine exactly like a human: opening a browser, clicking links, scrolling, and reading on‑screen content. This opens up possibilities for extracting information from websites that don’t offer APIs or structured feeds. In this article you’ll build an agent that reads job‑posting pages from corporate career sites, extracts key details into JSON, looks up the right recruiter in an Excel table, and forwards the original email alert with the extracted data to that recruiter. The same pattern can be adapted for any web‑scraping workflow.

Scenario Overview: a Staffing Agency’s Lead Router

Good Day Staffing receives dozens of email alerts each day from corporate career portals. Each email contains a link to a new job posting but no actual details. The agency needs to extract structured information—Job Title, Reference ID, Location, Department, Date Posted, Application Deadline—and route the opportunity to the recruiter who specializes in that department. The recruiter’s email address is stored in a SharePoint Excel file with columns: Recruiter Name, Specialty Department, Email Address.

Instead of a human opening each link and typing fields into a CRM, a Copilot Studio agent will perform the whole flow:

  1. When a new email arrives, the agent reads the link from the email body.
  2. The Computer Use tool opens the link, extracts the required fields, and returns them as JSON.
  3. The agent queries the Excel table to find the recruiter whose specialty matches the extracted department.
  4. The agent forwards the original email to that recruiter, appending the extracted details in the forwarded message.

All of this happens on a secure cloud PC provided by the Computer Use infrastructure.

Creating the Agent in Copilot Studio

From the Copilot Studio home page, choose Create and then Blank agent. Give the agent a descriptive name (e.g., “Job Posting Analyzer”) and a clear purpose: “Extracts job details from a webpage and routes them to the appropriate recruiter.” Select a capable model such as GPT‑4o or the latest available. The agent description helps the model choose the right tools later.

Adding and Configuring the Computer Use Tool

Navigate to the Tools section and click + Add tool. Select Computer Use. This tool will control a virtual Windows machine to open the job‑posting URL and scrape the relevant fields.

Tool Instructions

The most important part of the Computer Use configuration is the Instructions text box. Here you describe exactly what the agent should do with the website. Clear, step‑by‑step instructions reduce the chance of the agent getting stuck or misinterpreting the page.

Paste the following into the Instructions field:

textComputer Use Tool Instructions
Objective: Extract standard job posting fields from the given URL.

1. Launch the default web browser and open the provided URL.
2. Look for these pieces of information on the page:
 - Job Title
 - Reference ID (sometimes called Requisition ID)
 - Location (city, state, or remote)
 - Department (e.g., Engineering, Marketing)
 - Date Posted
 - Application Deadline
3. If a field is not present or cannot be found, use an empty string "" for that field.
4. After collecting all available fields, return them as a JSON object with keys exactly as listed above.
5. Navigate the page using keyboard shortcuts (Page Down / Page Up). Avoid continuous scrolling; if pressing Page Down does not change the visible content, stop and return what you have.
6. Do not click any links or submit any forms. Stay on the original page.

The last two lines are safety nets—they prevent the agent from spiraling into infinite scrolling or accidentally leaving the target page.

Input Variables

Click + Add input to define a variable that will receive the URL to process. Name the variable WebsiteAddress (or TargetUrl) and provide a description such as “The full URL of the job posting to analyze.” This variable will be supplied by the agent’s trigger or previous steps.

Machine Selection

The Computer Use tool needs a machine to operate. The simplest option is Hosted browser—Microsoft manages a lightweight Windows environment optimized for browser tasks. No extra setup is required. If your workflow required running a desktop application, you would choose a Cloud PC pool or Bring your own machine (BYOM) with a Windows connector. For web‑only extraction, Hosted browser is both fast and cost‑effective.

Testing the Tool in the Chat Panel

Before wiring up the rest of the logic, confirm that the Computer Use tool works. Open the test chat panel in Copilot Studio and manually provide a job‑posting URL as the value of the WebsiteAddress variable.

The agent will connect to the hosted browser, open the page, and begin scanning. You can watch its reasoning in the Activity map panel, which shows every mouse click, keystroke, and page change.

After a few seconds, the agent should respond with a JSON block similar to this:

jsonExample Computer Use Output
{
"Job Title": "Senior Cloud Engineer",
"Reference ID": "CLD-2026-0421",
"Location": "Austin, TX",
"Department": "Engineering",
"Date Posted": "2026-05-01",
"Application Deadline": "2026-06-15"
}

If some fields are missing, the agent returns empty strings as instructed. This is a good sign—the agent knows how to handle missing data gracefully.

Testing Tip
During testing, use a real URL that is publicly accessible and does not require authentication. Pages behind a login screen will cause the Computer Use tool to fail because it cannot supply credentials automatically.

Preparing the Excel Reference Table

The agent needs a lookup table to map a department name to the recruiter’s email address.

  1. Create a SharePoint document library (e.g., “Operations Data”).
  2. Upload a new Excel workbook and name it RecruiterContacts.xlsx.
  3. Inside the workbook, create a table named Recruiters with three columns:
    • RecruiterName (Text)
    • Department (Text)
    • EmailAddress (Text)
  4. Populate the table with rows such as “Alice Chen”, “Engineering”, “alice.chen@gooddaystaffing.com”.

Back in Copilot Studio, add a new tool: Excel Online (Business) – List rows present in a table. Configure it to point to your SharePoint site, the document library, the file, and the table. This action will return a list of all recruiter rows.

Adding the Outlook Action to Forward the Email

Now that the agent can extract job details and find the appropriate recruiter, the last step is to send the information. Add the Outlook – Reply to email (V3) action. Configure it as follows:

  • Message: The original email to forward (obtained from the trigger).
  • Reply type: Forward.
  • Recipients: Choose the email address you get from the Excel lookup.

Inside the Body field, compose a message that includes the JSON output from the Computer Use tool. You can reference the tool’s output using dynamic tokens (e.g., insert the ComputerUse.response token). The forwarded email will contain both the original message and the structured job details.

Dynamic Tokens
Make sure the tokens are correctly mapped. In the reply body, write something like “Extracted Job Details: [insert ComputerUse.response]” and then add the token from the editor.

Writing the Agent‑Level Instructions

The agent needs a high‑level workflow that ties all the tools together. Go to the Overview tab of the agent and replace the default instructions with the following:

textAgent Instructions (Overview Tab)
Goal: Route a job-posting email to the correct recruiter with extracted details.

Steps to perform in order:
1. Extract the URL from the body of the incoming email.
2. Run the [Computer Use] tool, passing the URL as the WebsiteAddress input.
3. Take the JSON result from step 2 and read the "Department" field.
4. Call [List rows present in a table] to get the recruiter contacts.
5. Find the row where the Department column matches the department from step 3.
6. Use [Reply to email (V3)] to forward the original email to the email found in step 5.
7. In the forwarded message body, include the JSON from step 2 so the recruiter sees the extracted fields.

This structured instruction set ensures the agent executes the sequence correctly and does not skip steps.

Adding an Email Trigger

The agent must start automatically when an email arrives. On the Overview page, click + Add trigger and select Outlook – When a new email arrives. Configure it to monitor the inbox folder (or a specific subfolder). Optionally, supply a subject filter (e.g., “Job Alert:”) to avoid processing unrelated messages. After saving, the agent becomes event‑driven and requires no manual invocation.

Trigger Permissions
The agent needs the appropriate Graph API permissions to read and reply to emails. Make sure the associated Power App or bot channel has the right consent granted.

End‑to‑End Test

Publish the agent and send a test email to the monitored inbox. The email should contain a brief message and the link to a job posting.

Check the agent’s activity log to observe each step:

  • Computer Use connecting to a hosted browser and extracting fields.
  • Excel action returning the recruiter list.
  • The matching logic selecting the correct email.
  • Outlook forwarding the email with extracted data.

If everything works correctly, the recipient recruiter receives a forwarded email that includes the original alert plus a clean JSON block with all the job details—no manual copy‑and‑paste needed.

Security and Performance Considerations

  • Hosted browser isolation: Each Computer Use session runs in a dedicated, ephemeral Windows container. After the task completes, the container is destroyed. No browser history or cookies persist.
  • Data sent over the wire: The agent sends the page content back to Copilot Studio. For sensitive websites, ensure your organization’s compliance policies allow this.
  • Rate limits and concurrency: Computer Use tool calls consume capacity in the agent’s messaging plan. Monitor usage and consider adding delays between steps if you hit throttling limits.
  • Failures and timeouts: If the website is slow, the agent may time out before completing extraction. Increase the agent’s overall timeout if necessary, but remember that longer run times increase consumption.
  • No authentication: The Computer Use tool cannot log into websites. Only use it for publicly accessible pages or pages that are already open without credentials.

Common Mistakes and Troubleshooting

The agent scrolls endlessly or doesn’t stop scrolling

Include explicit instructions to stop scrolling after a certain number of key presses or when no new content appears. The example instructions above already limit scrolling behavior. If the problem persists, add “After 5 key presses, evaluate whether the page changed; if not, stop.”

The agent returns only part of the data or blank fields

Websites load content dynamically—some details might be hidden behind a “Show more” button. The Computer Use tool can click buttons if you instruct it to. Update the instructions to include: “Click on any ‘Show more’ or ‘Read more’ buttons to expand hidden content before extracting.” Be careful, though—broad click instructions can lead to navigating away from the page.

The email trigger does not fire

Verify that the agent is published and the connection to Outlook is working. Check the Activity pane for errors like “Trigger not subscribed” or “Permission denied”. Re‑authorize the Outlook connection if needed.

The Excel lookup fails because the department names don’t match exactly

The agent’s natural language understanding can handle minor variations, but it’s safer to normalize department names in the Excel file. For example, ensure that the cell contains exactly “Engineering” if that is the value the Computer Use tool will extract. You can also add a step in the instructions to trim whitespace and convert to title case.

Final Recommendation

The Computer Use tool opens a new automation frontier for Copilot Studio agents. Use it when you need to extract data from websites that lack APIs, but keep the scope focused: small sets of structured fields, static or straightforward pages, and clear failure fallbacks. Start with the hosted browser option to avoid machine management overhead, and always test with a variety of real‑world URLs before going into production. With careful instructions, you can build robust “web scraper” agents without writing a single line of traditional code.

References