office secretary
Scanned@Cenralsolution
npx machina-cli add skill @Cenralsolution/office-secretary --openclaw🛡️ Role & Logic
I am a Security-First Executive Assistant. I operate using delegated permissions to ensure I only access the user's data.
- Administrative: High-priority email triage and calendar coordination.
- Governance: Identifying stale OneDrive data.
- Communication: Securely posting alerts to Teams channels.
🛠 Command Interface
- Mail:
python3 secretary_engine.py mail(Triage high-priority mail). - Calendar:
python3 secretary_engine.py calendar [email](Find meeting slots). - Drive:
python3 secretary_engine.py drive(List orphaned files). - Teams:
python3 secretary_engine.py teams [team_id] [channel_id] [msg].
🏗 Setup
- App Registration: Create an Azure Entra ID app as a Public Client.
- Permissions: Grant Delegated
Mail.ReadWrite,Calendars.ReadWrite,Files.ReadWrite, andChatMessage.Send. - Env: Provide
SECRETARY_CLIENT_IDandSECRETARY_TENANT_IDin.env.
Overview
Office Secretary is a security‑first digital administrative assistant for Microsoft 365 that triages high‑priority emails, coordinates calendars, and governs data by identifying stale OneDrive files. It operates with delegated permissions to protect user data and can post secure alerts to Teams channels to keep teams aligned.
How This Skill Works
The tool authenticates via MSAL using delegated permissions and exposes commands to manage Mail, Calendar, Drive, and Teams. It relies on environment variables SECRETARY_CLIENT_ID and SECRETARY_TENANT_ID (in .env) and requires msal, requests, and python-dotenv to function, enabling controlled access to Outlook, OneDrive, and Teams data.
When to Use It
- Triage high-priority emails and coordinate quick follow-ups to avoid missing deadlines.
- Find suitable meeting slots across multiple attendees and draft calendar invites.
- Identify stale or orphaned files in OneDrive for governance and cleanup.
- Post secure alerts to Teams channels to notify teams of urgent actions.
- Automate basic administrative workflows that touch Outlook, OneDrive, and Teams data.
Quick Start
- Step 1: Create an Azure Entra ID public client app and set SECRETARY_CLIENT_ID and SECRETARY_TENANT_ID in .env.
- Step 2: Install dependencies (msal, requests, python-dotenv) and verify access to Outlook and OneDrive.
- Step 3: Use the command interface: python3 secretary_engine.py mail; python3 secretary_engine.py calendar [email]; python3 secretary_engine.py drive; python3 secretary_engine.py teams [team_id] [channel_id] [msg].
Best Practices
- Limit access with delegated permissions and avoid broad data scopes.
- Store SECRETARY_CLIENT_ID and SECRETARY_TENANT_ID securely in a .env file.
- Test mail, calendar, drive, and teams workflows in a staging environment first.
- Implement governance policies for when to surface or delete stale OneDrive data.
- Regularly audit logs and alerting to ensure security and accountability.
Example Use Cases
- An executive receives a flood of urgent emails; the secretary triages and highlights critical messages for immediate action.
- You coordinate a cross‑team board meeting by finding common availability and proposing time slots.
- A governance routine surfaces orphaned OneDrive files for review and potential archiving.
- Security or incident alerts are posted to a dedicated Teams channel for rapid visibility.
- A daily workflow lists top-priority emails and creates calendar notes for follow-up tasks.