Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
- This is a preview feature provided under Microsoft Product Terms.
- Preview features may have restricted functionality and may not be released for general availability. These features are available before an official release so that customers can get early access and provide feedback.
- You need to be part of the Frontier preview program to get early access. Frontier connects you directly with Microsoft's latest AI innovations. Frontier previews are subject to the existing preview terms of your customer agreements. As these features are still in development, their availability and capabilities may change over time.
Use automations in Copilot Code for tasks you repeat. An automation is a saved task that Code runs on your device, either on a schedule or whenever you start it. Each run uses the same plugins, skills, and protections as your other Code work. You can check what happened in each run.
This article explains how to create an automation, how approvals work while it runs, and how to manage automations and review their runs.
Note
Automations run on your device. Your device and the Microsoft Copilot app need to be available when a scheduled run is due.
What you can automate
Automations work best for tasks that use files on your device or that you'd otherwise do by hand on a regular schedule. For example:
- Expense receipts: Find receipts saved on your device, match them to trips on your Outlook calendar, check them against your travel policy, and prepare the compliant ones for upload.
- Morning briefing: Combine open sales leads with today's meetings to produce a prioritized outreach list and briefs for customer meetings.
- Task list sync: Collect requests from Teams, @mentions, flagged email, and meeting recaps into a task list on your device. Duplicates are removed and each item links to its source.
- Spec to draft pull request: Review a new spec against a repository on your device, identify the affected files, and propose a plan. After you approve the plan, Code creates a branch and a draft pull request.
Create an automation
You can create an automation in either of two places. Each one opens the same automation settings.
Create an automation from chat
- Open the Code tab in Microsoft Copilot.
- In the chat, describe the task and when it should run. For example, Update this dashboard every day at 9:00 AM.
- Review the automation that Code proposes, adjust its settings if needed, and then create it.
Create an automation from the Automations page
- In the Code tab, select Automations in the side navigation.
- Create a new automation, and then enter its settings.
Automation settings
Every automation has the following settings.
| Setting | Description |
|---|---|
| Title | The name that appears in your list of automations. |
| Description | What the automation does. |
| Schedule | When the automation runs: Manual, Hourly, Daily, Weekly, or Custom. Choose Custom to pick specific weekdays and times. Choose Manual to run the automation only when you start it. |
| Interaction mode | How much the automation checks with you while it runs: Interactive (step-by-step collaboration), Plan (plan first, then execute), or Automatic (run end-to-end with fewer interruptions). |
You don't need a GitHub account to use automations, unless the task itself needs GitHub, such as creating a pull request.
What an automation can use
You don't configure tools or protections separately for each automation. Each run uses:
- Plugins and skills: All plugins and skills you have turned on are available to the automation.
- Sandbox: The same file and network limits that apply to your other local work apply to every automation run. For more information, see Sandbox in Copilot Code.
- Work context: An automation can use your Microsoft 365 work context, such as documents, emails, meetings, and calendar, when your organization allows it.
Approvals while an automation runs
Automations follow the Run all tools without asking setting, which applies to all of your Code chats. When this setting is on, Code approves tool use automatically. When it's off, Code asks before it uses tools. Together with the automation's Interaction mode, this setting determines how often a run stops for your input.
| Interaction mode | Run all tools without asking | What to expect |
|---|---|---|
| Automatic | On | The run usually completes with few or no requests for your input. |
| Automatic | Off | Tool use is rejected. See the known issue in the following note. |
| Interactive or Plan | Off | The run often stops to ask for your input or approval. |
When a run needs your input or approval, its status changes to Waiting for consent. To respond, open the automation and select Open as Chat. You can review and approve the request in the chat. You can't respond from inside the automation session itself.
Note
Known issue: If an automation uses the Automatic interaction mode and Run all tools without asking is off, Code automatically rejects tool use, and the run might not complete. To avoid this issue, turn on Run all tools without asking, or use the Interactive or Plan interaction mode.
Manage your automations
Select Automations in the side navigation to see all your automations. Each automation in the list shows:
- Name and description.
- Schedule, such as Daily at 9:00 AM.
- Date and time of the last run.
- Status of the latest run.
- Project name.
From the list, you can:
- Edit an automation to change its title, description, or schedule.
- Run an automation manually, whatever its schedule.
- Open an automation to see its latest session.
Review runs and status
Each automation keeps a history of its runs, and each run has one of the following statuses.
| Status | Meaning |
|---|---|
| Scheduled | The run is set to start at its next scheduled time. |
| Running | The run is in progress. |
| Waiting for consent | The run needs your input or approval. Select Open as Chat to respond. |
| Succeeded | The run finished successfully. |
| Failed | The run didn't finish. Open the automation to see what happened. |
Limitations
Keep the following limitations in mind when you set up automations:
- Runs on your device only: Automations run on your device. Cloud automations aren't available.
- Schedules only: Automations run on a schedule or when you start them. They can't start when something happens, such as when a new message is posted in a Teams channel.
- No replies inside the automation session: To respond to a run that needs your input, select Open as Chat.
- Credit limits: If you run out of credits during a run, Code pauses that run and its automation. Your other automations keep running.