From zero to first heartbeat in ~30 minutes
Follow these eight steps in order. Each one expands with full details below.
- 1. Create a SharePoint site
- 2. Import the solution
- 3. Manage connections
- 4. Configure flows
- 5. Provision the workspace
- 6. Verify tools in Copilot Studio
- 7. Personalize your agent
- 8. Verify it's working
📋 Prerequisites
| Requirement | Details |
|---|---|
| Microsoft 365 | E3 or E5 (for SharePoint, Teams, Outlook, Graph API) |
| Copilot Studio | Credit pack or pay-as-you-go — see pricing |
| Power Automate | Premium plan — required because HeartbeatFlow uses the Copilot Studio connector |
| Permissions | Ability to create a SharePoint site |
| PnP PowerShell | Optional — only needed for the backup script path, which also requires an app registration + admin consent |
PowerClaw needs a dedicated SharePoint site as its workspace.
- Create a new SharePoint Team site (e.g.,
https://contoso.sharepoint.com/sites/PowerClaw-Workspace) - Ensure the account importing the solution has Owner or Edit permissions on this site
- Note the Site URL — you'll need it in Steps 4 and 5
- Go to Power Apps Maker Portal
- Select your environment
- Click Solutions → Import solution
- Upload the
PowerClaw_Solution.zipfile - Map Connections — you'll be prompted to authorize:
- SharePoint Online
- Office 365 Outlook
- Microsoft Teams
- Microsoft Copilot Studio
- WorkIQ MCP servers (Calendar, Mail, Teams, User, Word, Copilot)
- Environment Variables — if environment variables appear during import, it's fine to enter your actual SharePoint site URL and admin email from Step 1, but the flows themselves are configured in Step 4: Configure Flows using Compose actions
ℹ️ Expected warning: You may see "Solution imported successfully with warnings: The original workflow definition has been deactivated and replaced." This is normal — all flows are imported in an OFF state so you can complete setup before activating them.
Before running any flows, verify that all connection references are properly linked.
- Go to Power Apps Maker Portal → Solutions → PowerClaw
- Click Connection References in the left nav (or filter by type)
- For each connection reference, click it and verify a valid connection is selected
- If no connection exists, click + New connection, authenticate, and select it
- Repeat for all connection references (SharePoint, Outlook, Teams, Copilot Studio)
💡 This ensures all flows can authenticate when turned on. Skipping this step is the most common cause of flow failures.
After importing the solution and setting up connections, configure the flows to point at your workspace.
- Go to Power Automate → My flows (or find the flows in the PowerClaw solution)
- Open Heartbeat Flow → click Edit
- Find the
Compose:_Config_SiteURLaction near the top of the flow - Replace
https://contoso.sharepoint.com/sites/PowerClaw-Workspacewith your actual SharePoint site URL from Step 1 - Find the
Compose:_Config_AdminEmailaction - Replace
admin@contoso.comwith your email address - Click Save
- Repeat for the GetContext flow — update
Compose:_Config_SiteURLonly (no email change needed) - Repeat for the Housekeeping flow — update
Compose:_Config_SiteURLonly
💡 This is the only manual flow configuration needed. All SharePoint actions in the flows automatically use these Compose values.
Choose one provisioning path to create the SharePoint lists and constitution files. All three paths target the same workspace shape:
- Bootstrap Flow (recommended) — run after importing the solution
- PowerShell Script (backup) — for DLP-restricted environments; requires app registration + admin consent
- Manual Setup (universal fallback) — browser-only, zero dependencies
The solution includes a helper flow that provisions everything — no scripts required.
- Go to Power Automate → My flows
- Find the Bootstrap flow (inside the PowerClaw solution)
- Click Run and enter:
- SiteUrl — the SharePoint site URL from Step 1
- AdminEmail — your email address
- AgentName — name for your agent (default: "PowerClaw")
- The flow creates all lists, columns, and uploads the default constitution files
💡 Tip: The Bootstrap flow is separate from the Compose-based flow configuration in Step 4. It uses its own run inputs — SiteUrl, AdminEmail, and AgentName — which you enter when running the flow. AgentName defaults to "PowerClaw" if left blank.
Option B: PowerShell Script (Backup — DLP-restricted environments)
Use this when the Bootstrap flow is blocked but you can obtain app registration + admin consent for delegated SharePoint access.
1. Register a PnP PowerShell app (one-time per tenant):
Register-PnPEntraIDAppForInteractiveLogin `
-ApplicationName "PowerClaw Setup" `
-Tenant yourtenant.onmicrosoft.com `
-DeviceLogin `
-SharePointDelegatePermissions AllSites.ManageThis requests only the permission needed. The consent screen will show "read and write items and lists in all site collections" (AllSites.Manage) — that is expected and acceptable for this setup. Save the Client ID it outputs.
2. Run the provisioning script:
.\scripts\Setup-PowerClaw.ps1 `
-SiteUrl "https://your-tenant.sharepoint.com/sites/PowerClaw-Workspace" `
-AdminEmail "you@example.com" `
-ClientId "your-client-id" `
-AgentName "PowerClaw"Option C: Manual Setup (Universal fallback)
Use this when you want a browser-only path with zero script dependencies.
- Follow
docs/MANUAL-SETUP.md - Estimated time: ~15 minutes
- Works anywhere you can create SharePoint lists and upload files
What gets created
Regardless of method, the following resources are provisioned:
- ✅ PowerClaw_Memory_Log list — audit trail for all agent activity
- ✅ PowerClaw_Config list — heartbeat safeguards and admin contact settings
- Seeded items:
KillSwitch = false,IsRunning = false,MaxActionsPerHour = 20,AdminEmail = <your email>
- Seeded items:
- ✅ PowerClaw_Memory list — long-term knowledge store (preferences, people, projects)
- ✅ PowerClaw_Tasks list — task workflow:
To Do → Human Review → Done - ✅ Constitution files uploaded to Shared Documents:
soul.md— Agent personality and core valuesuser.md— Your role, team, and preferencesagents.md— Operating rules (calendar, email triage, task management, notifications)tools.md— Available capabilities referencememory-journal.md— Rolling narrative journal
Automatic retention: A daily Housekeeping flow removes old log entries and completed tasks after 30 days, expires stale memories, and trims
memory-journal.md.
After provisioning completes, turn on the flows in this specific order:
- Bootstrap — This is a manual instant flow. You already ran it in the step above. No need to turn it on/off — it runs on demand.
- HeartbeatFlow — Turn on only after Bootstrap has succeeded. This is the recurring 30-minute heartbeat.
- HousekeepingFlow — Turn on anytime after Bootstrap. This handles daily cleanup of old logs, completed tasks, and memory trimming.
⚠️ Do not turn on HeartbeatFlow before Bootstrap has run successfully — the heartbeat depends on the SharePoint lists and files that Bootstrap creates.
Open the agent in Copilot Studio and confirm these 9 tools are enabled:
| Tool | Type |
|---|---|
| WorkIQ Calendar MCP | MCP |
| WorkIQ Mail MCP | MCP |
| WorkIQ Teams MCP | MCP |
| WorkIQ User MCP | MCP |
| WorkIQ Word MCP | MCP |
| WorkIQ Copilot MCP | MCP |
| WorkIQ SharePoint MCP | MCP |
| Office 365 Outlook - Send email (V2) | Connector |
| Microsoft Teams - Post message | Connector |
💡 No extra task connectors needed — PowerClaw manages tasks directly via the WorkIQ SharePoint MCP.
PowerClaw's personality and operating rules are fully decoupled from code. Edit these markdown files in your SharePoint Documents library:
| File | Action | What it controls |
|---|---|---|
user.md |
Required — fill in | Your name, role, team, manager, preferences, focus time |
agents.md |
Review defaults | Operating rules: calendar monitoring, email triage, digest schedule, quiet hours |
soul.md |
Optional | Personality, core values, communication style |
tools.md |
Reference | Available capabilities — update if you add/remove tools |
🎨 Custom icon: To change the agent's avatar, upload a custom icon through the Copilot Studio UI under the agent's channel settings. Icon upload is not supported via YAML or solution import.
Run through these checks to confirm everything is connected:
| Test | What to do | Expected result |
|---|---|---|
| Config check | Open the PowerClaw_Config list | KillSwitch = false, IsRunning = false, MaxActionsPerHour = 20, AdminEmail = <your email> |
| Interactive chat | Say "Hi, what can you do?" in Teams | Natural language response (not JSON) |
| Briefing | Say "brief me" in Teams | Calendar + tasks + email summary |
| Task execution | Add an item with TaskStatus = To Do to the PowerClaw_Tasks list, then trigger the Heartbeat Flow |
"Starting" email → task moves to "Human Review" |
| Heartbeat | Trigger the Heartbeat Flow manually | New entries in Memory_Log, PowerClaw_Memory, and memory-journal.md |
After verification, the heartbeat runs automatically every 30 minutes.
⚙️ Configuration Reference
| Setting | Default | Purpose |
|---|---|---|
| KillSwitch | false |
Emergency stop for all autonomous activity |
| IsRunning | false |
Runtime coordination flag used by the heartbeat |
| MaxActionsPerHour | 20 |
Rate limit safety valve |
| AdminEmail | you@example.com |
Admin contact for alerts and setup ownership |
- Heartbeat frequency — Edit the Power Automate recurrence trigger
- Operating rules — Edit
agents.mdto add/change behaviors (no code needed) - Kill switch — Set
KillSwitch = truein PowerClaw_Config to pause all autonomous activity - Agent name — Update
soul.md(or rerun Bootstrap / setup withAgentName) - Long-term memory — Review the PowerClaw_Memory list to see what the agent has learned; edit or delete entries to correct its knowledge
PowerClaw can execute recurring tasks based on your calendar. Add a calendar event with [PowerClaw Routine] in the title, and describe the task in the event body. PowerClaw will execute it during that time window.
Example — Morning AI News Brief:
| Field | Value |
|---|---|
| Subject | [PowerClaw Routine] Morning AI News Brief |
| Body | Research what's the latest in AI News. Anything interesting or exciting send to me via Email. Format it well for readability, use a dark theme, and make it engaging. |
| When | Recurring daily, 8:00 AM – 8:30 AM |
💡 Tips:
- The
[PowerClaw Routine]tag in the title is required — PowerClaw scans for this exact tag- Make the body descriptive — this is the instruction PowerClaw follows
- Set the event to the time window when you want the task executed
- PowerClaw checks Sent Items to avoid duplicate execution if the heartbeat fires twice in the same window
| Data Type | Retention | Action |
|---|---|---|
| PowerClaw_Memory_Log | 30 days | Deleted |
| Done Tasks | 30 days | Deleted |
| Active Memories | Max 100 | Lowest confidence archived |
| memory-journal.md | 50 KB | Truncated to recent content |
📋 PowerClaw_Tasks — How the Board Works
PowerClaw uses a SharePoint list called PowerClaw_Tasks as its task board. The setup process creates this automatically.
Columns: Title · TaskStatus · TaskDescription · Priority · Source · DueDate · Notes · LastActionDate
Workflow:
📋 To Do → PowerClaw picks up to 2 tasks per heartbeat
Sends a "Starting" email with initial analysis
Works the task using M365 tools
When ready, moves task to ↓
👁️ Human Review → PowerClaw sends deliverable email and waits
You review, request edits, or approve
When satisfied, mark as ↓
✅ Done → Complete — no further action
- Open the PowerClaw_Tasks list → click the view dropdown → Create new view
- Choose Board as the view type, name it "Board"
- Set Group by → TaskStatus
- (Optional) Show Priority and DueDate on cards via card settings
- Click Save
You'll get a drag-and-drop Kanban board: To Do → Human Review → Done.
🏗️ Agent Configuration Reference
These settings are pre-configured in the imported solution. Reference only — no changes needed for basic setup.
PowerClaw
24/7 Personal Assistant built on Microsoft 365 stack that runs on a scheduled heartbeat,
monitors calendar, email, and tasks, uses SharePoint as its operating brain, and supports
both proactive autonomous work and interactive Teams chat.
Instructions are embedded in the solution and dynamically loaded at runtime from the
SharePoint constitution files soul.md, user.md, agents.md, and tools.md.
In Interactive Mode (Teams / M365 Copilot), constitution files are loaded just-in-time
on the first user message via the ConversationInit topic, which calls the GetContext flow.
A JIT guard (IsBlank check) ensures the flow runs only once per conversation.
In Autonomous Mode (Heartbeat), the HeartbeatFlow loads constitution files independently
from SharePoint and injects them directly into the prompt.
- Orchestration: Generative
- Response Model: Claude Sonnet 4.6
- Trigger: Recurrence (Power Automate) — every 30 minutes
- SharePoint workspace site (operational brain)
- Constitution files:
soul.md,user.md,agents.md,tools.md - Memory Log list, PowerClaw_Memory list,
memory-journal.md - Open tasks from the PowerClaw_Tasks list
- Calendar, email, and user context loaded by the HeartbeatFlow
To update PowerClaw to a newer version:
- Download the latest
PowerClaw_Solution.zip - Re-import into your existing environment (same steps as Step 2)
- Re-authorize connections if prompted
- Re-edit
Compose:_Config_SiteURLin HeartbeatFlow, GetContext, and Housekeeping with your site URL - Turn on HeartbeatFlow and HousekeepingFlow (they are deactivated on import)
⚠️ Do not re-run the Bootstrap flow — your SharePoint lists and constitution files are already in place. Re-running Bootstrap may create duplicate lists or overwrite your customized constitution files.
Your SharePoint data (config settings, memories, tasks, constitution files) is fully preserved during solution re-import.
🚑 Common Issues
| Issue | Check |
|---|---|
| Heartbeat skipped | Is KillSwitch set to true in PowerClaw_Config? Reset to false. |
| Flow fails / No response | Check Connections in Power Automate — they may need re-authentication. |
| Lock stuck | If IsRunning is true for 35+ minutes, stale lock recovery auto-fixes on next heartbeat. Or manually set to false. |
| Agent returns JSON in chat | The message must NOT start with [HEARTBEAT EVENT TRIGGERED] for interactive mode. |
| Duplicate task emails | Check PowerClaw_Memory for entries with scopeKey starting with task:. Delete stale entries. |
| Rate limit triggered | Check MaxActionsPerHour in PowerClaw_Config. Reset KillSwitch to false after reviewing. |
| Permissions errors | Ensure the flow account has Edit access to the SharePoint site and all connections are authorized. |
| Memory not saving | Verify the PowerClaw_Memory list exists. Check the list GUID in HeartbeatFlow. Ensure memory-journal.md exists in Shared Documents. |
📐 How PowerClaw Works Under the Hood
PowerClaw uses three tiers of memory:
- PowerClaw_Memory_Log (Short-Term) — Audit trail of recent actions (last 25 entries)
- PowerClaw_Memory (Semantic) — Specific facts about preferences, people, and projects
- Memory Journal (Episodic) — Rolling narrative of observations and insights
- Calendar Routines — Events flagged for PowerClaw (e.g., "Morning Briefing")
- Proactive Intelligence — Urgent emails or upcoming meetings
- Task Management — Up to 2 "To Do" tasks per heartbeat
- Observations — Updates long-term memory with new insights
graph TD
Trigger[🕒 Recurrence Trigger<br/>Every 30 min] --> Flow[⚡ Heartbeat Flow]
Flow --> Lock[🔒 Check Lock & KillSwitch]
Lock -->|Locked/Killed| Skip[⏭️ Skip & Log]
Lock -->|Ready| RateLimit[📊 Rate Limit Check]
RateLimit -->|Over limit| Alert[📧 Alert Admin & Kill]
RateLimit -->|OK| Context[📄 Load Constitution<br/>soul.md / user.md / agents.md / tools.md]
Context --> Memory[📝 Load Recent Memory]
Context --> LTM[🧠 Load Long-Term Memory<br/>PowerClaw_Memory list + journal]
Memory --> Agent[🤖 PowerClaw Agent<br/>Claude Sonnet 4.6]
LTM --> Agent
Agent -->|Read| Calendar[📅 Calendar MCP]
Agent -->|Read| Mail[📧 Mail MCP]
Agent -->|Read/Write| Tasks[📋 PowerClaw_Tasks List]
Agent -->|Send| Teams[💬 Teams Connector]
Agent -->|Search| Copilot[🔍 Copilot MCP]
Agent -->|Log| MemLog[📝 PowerClaw_Memory_Log]
Agent -->|Learn| LTMStore[🧠 PowerClaw_Memory]
Agent -->|Journal| Journal[📓 memory-journal.md]
User[👤 User in Teams] -.->|Interactive Chat| Agent
| File | Purpose |
|---|---|
PowerClaw_Solution.zip |
Unmanaged solution (Agent + Flows including Bootstrap) |
scripts/Setup-PowerClaw.ps1 |
SharePoint workspace provisioning script (backup path; requires app registration + admin consent) |
docs/MANUAL-SETUP.md |
Universal browser-only manual setup guide |
SETUP.md |
This guide |
Images/ |
Screenshots and diagrams |
![]()
PowerClaw — Your autonomous AI chief of staff
Built with 🦀 by the PowerClaw Team