| name | frontier-cup-skill |
| description | Automate Microsoft 365 Copilot Chat via Playwright browser automation.
Open M365 Chat, select agents (Cowork, Researcher, Analyst, Sales),
send prompts, and read responses programmatically.
USE FOR: m365 copilot chat, cowork agent, email summary, calendar query,
standup draft, inbox triage, meeting prep, browser automation m365.
DO NOT USE FOR: Azure resource management, non-browser tasks, local file operations.
|
Frontier Cup Skill — M365 Copilot Chat Automation
Browser automation skill for interacting with Microsoft 365 Copilot Chat through Playwright MCP.
Installation
1. Install Playwright MCP Bridge Extension
Install from Chrome Web Store:
Playwright MCP Bridge
2. Configure MCP Server
Add to your agent's MCP configuration:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest", "--extension"],
"env": {
"PLAYWRIGHT_MCP_EXTENSION_TOKEN": "<your-token>"
}
}
}
}
Get the token from the Playwright MCP Bridge extension icon in the browser toolbar.
3. Browser Configuration
The included playwright-config.json configures Edge with CSP bypass flags required for M365:
{
"browser": {
"browserName": "msedge",
"launchOptions": {
"args": [
"--disable-web-security",
"--disable-features=TrustedTypes,IsolateOrigins",
"--disable-site-isolation-trials"
]
}
}
}
Core Workflow
1. Open M365 Chat
Navigate to https://m365.cloud.microsoft/chat. Ensure the user is already signed in.
2. Select an Agent
Click an agent from the sidebar:
| Agent | Purpose |
|---|
| Cowork | Daily productivity — emails, calendar, standups, inbox triage |
| Researcher | Deep research across web and work data |
| Analyst | Data analysis, charts, spreadsheet insights |
| Sales | CRM, pipeline, customer intelligence |
3. Send Prompts
- Snapshot the page to get the current input field ref
- Click the input field
- Fill with prompt text
- Press Enter
4. Read Responses
Wait 25-45 seconds, then snapshot. If still generating, wait 15 more seconds.
5. Follow-up Messages
Snapshot again before each follow-up to get the updated input field ref.
CLI Quick Reference
playwright-cli -s=m365 open --browser=msedge --extension https://m365.cloud.microsoft/chat
playwright-cli -s=m365 snapshot
playwright-cli -s=m365 click "Cowork"
playwright-cli -s=m365 fill "Message Copilot" "Summarize my unread emails"
playwright-cli -s=m365 press "Enter"
Automation Script
Run the included automation script for a complete demo:
scripts\m365-demo.bat
bash scripts/m365-demo.sh
Example Prompts
| Agent | Prompt |
|---|
| Cowork | "Summarize my unread emails from today" |
| Cowork | "What meetings do I have for the rest of this week?" |
| Cowork | "Draft a 5-sentence standup update based on my recent activity" |
| Cowork | "Organize my inbox by priority" |
| Researcher | "Research the latest trends in AI agent frameworks" |
| Analyst | "Analyze the data in [spreadsheet name]" |
Timing Guidelines
| Action | Wait Time |
|---|
| Page load | 5 seconds |
| Agent selection | 3 seconds |
| Simple response | 25 seconds |
| Complex response | 45 seconds |
Key Caveats
- Always use
--extension mode to attach to the existing logged-in browser session
- Input field refs change between messages — always snapshot before filling
- M365 enforces CSP restrictions; the
playwright-config.json flags bypass them
- Some API calls may show "Error" but Copilot retries with alternative approaches