Microsoft Workspace logo

Microsoft Workspace

Community
Andrew-Girgis
microsoft-workspace

Outlook Calendar, Email, Contacts, and To-Do integration via Microsoft Graph API. Uses OAuth2 with automatic token refresh. Supports Hotmail/Outlook/Microsoft 365 accounts.

Overview

PublisherAndrew-Girgis
Repositorymicrosoft-workspace-skill
Skill namemicrosoft-workspace
Stars
34
Forks
9
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Andrew-Girgis on GitHub. Read the source before you install it.

Installation

Install the Microsoft Workspace AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Andrew-Girgis/microsoft-workspace-skill/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Andrew-Girgis/microsoft-workspace-skill.git \
  .claude/skills/microsoft-workspace
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Microsoft Workspace in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Microsoft Workspace on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Microsoft Workspace is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Microsoft Workspace (Outlook/Hotmail)

Outlook Calendar, Email, Contacts, and To-Do integration via Microsoft Graph API.

Quick Setup

bash
# Save credentials
./scripts/auth.sh --client-id "YOUR_CLIENT_ID" --client-secret "YOUR_CLIENT_SECRET"

# Get auth URL and authorize
python3 scripts/setup.py --auth-url
python3 scripts/setup.py --auth-code "PASTE_REDIRECT_URL"

# Verify
./scripts/auth.sh --check

See README.md for full Azure App Registration setup instructions.

Scripts

  • scripts/microsoft_api.py -- API wrapper CLI
  • scripts/setup.py -- OAuth2 setup (run once to authorize)
  • scripts/auth.sh -- Credential management and auth verification
  • scripts/safe_mail_send.sh -- Preview emails before sending (prevents $ mangling and duplicates)

Usage

bash
GAPI="python3 ~/.hermes/skills/productivity/microsoft-workspace/scripts/microsoft_api.py"

# --- CALENDAR ---

# List upcoming events (default)
$GAPI calendar list
$GAPI calendar list --all
$GAPI calendar list --start 2026-04-10T00:00:00 --end 2026-04-10T23:59:59

# Create event (auto-adds Teams link)
$GAPI calendar create --summary "Meeting" --start "2026-04-10T15:00:00-04:00" --end "2026-04-10T15:30:00-04:00" --description "Syncing on ideas" --attendees "john@example.com"

# Create invite with video link (uses branded HTML template if configured)
$GAPI calendar invite --summary "Project Sync" --start "2026-04-11T14:00:00-04:00" --end "2026-04-11T14:30:00-04:00" --description "Let's discuss" --attendees "john@example.com" --meet

# Update an existing event (partial -- only update what you pass)
$GAPI calendar update EVENT_ID --summary "New Title"
$GAPI calendar update EVENT_ID --start "2026-04-11T16:00:00-04:00" --end "2026-04-11T16:30:00-04:00"

# Delete event
$GAPI calendar delete EVENT_ID

# Check free/busy status for people
$GAPI calendar freebusy --emails "user@example.com,other@example.com" --start "2026-04-14T09:00:00-04:00" --end "2026-04-14T17:00:00-04:00" --interval 30

# Find open slots where all attendees are free
$GAPI calendar findopen --emails "user@example.com" --start "2026-04-14T09:00:00-04:00" --end "2026-04-14T17:00:00-04:00" --duration 30 --interval 15

# --- EMAIL ---

# List emails (add --unread for unread only, --important for high importance)
$GAPI mail list --max 10
$GAPI mail list --unread
$GAPI mail list --important --folder archive

# Search emails by keyword
$GAPI mail search --query "invoice" --max 5
$GAPI mail search --query "project report" --folder sent

# Get full email content
$GAPI mail get MESSAGE_ID

# Send email
$GAPI mail send --to user@example.com --subject "Hello" --body "Message text"

# Send with attachment (max 3MB)
$GAPI mail send --to user@example.com --subject "Here's the file" --body "See attached" --attachment /path/to/file.png

# Reply to an email
$GAPI mail reply MESSAGE_ID --body "Thanks for the update!"

# Reply-all to an email
$GAPI mail replyall MESSAGE_ID --body "Sounds good, team."

# Forward an email
$GAPI mail forward MESSAGE_ID --to "forward@example.com" --body "FYI"

# List all mail folders
$GAPI mail folders

# Move an email to a different folder (get folder ID from 'mail folders')
$GAPI mail move MESSAGE_ID --folder FOLDER_ID

# --- CONTACTS ---

$GAPI contacts list --max 20

# --- USER PROFILE ---

$GAPI user profile

Safe Email Sending

Use the safe_mail_send.sh script to preview before sending:

bash
SAFE="~/.hermes/skills/productivity/microsoft-workspace/scripts/safe_mail_send.sh"

# Preview only (does not send)
$SAFE --to "user@example.com" --subject "Hello" --body-file /tmp/email_body.txt

# Preview + send
$SAFE --to "user@example.com" --subject "Hello" --body-file /tmp/email_body.txt --confirm

# With attachment
$SAFE --to "user@example.com" --subject "See attached" --body-file /tmp/email_body.txt --attachment /path/to/file.png --confirm

The script checks for $ shell variable issues, large attachments, and missing files before sending.

Configuration

Optional config at ~/.hermes/microsoft_config.json:

json
{
  "sender_name": "Your Name",
  "agent_name": "YourAgent"
}

When set, calendar invites include a branded sign-off. Without this config, invites use a clean template with no personal info.

Set via: ./scripts/auth.sh --config --name "Your Name" --agent "AgentName"

Output Format

All commands return JSON or structured text. Key fields:

  • Calendar list: [{id, subject, start, end, notes, meet, link}]
  • Calendar create: {status, id, subject, start, end, link, meet, attendees}
  • Calendar free/busy: [{email, status, availability}]
  • Calendar find open: [{start, end, duration}]
  • Mail list: [{id, from, subject, date, isRead, importance, preview}]
  • Mail search: [{id, from, subject, date, preview}]
  • Mail folders: [{id, name, total, unread}]
  • Contacts list: [{displayName, emailAddresses, phones}]
  • User profile: {displayName, email, jobTitle, office}

Sending Emails Safely (IMPORTANT)

The $ character is interpreted as a shell variable. $20 becomes empty (treated as $2 + 0). This causes mangled subjects and forces re-sends.

NEVER do this:

bash
$GAPI mail send --to user@example.com --subject "Refund of $20" --body "I paid $50"

ALWAYS do this: Write the body to a temp file first:

bash
cat > /tmp/email_body.txt << 'EOF'
Subject: Refund of $20

Hi, I was charged $20 and would like a refund.
EOF

# Preview
echo "To: user@example.com"
cat /tmp/email_body.txt

# Send
BODY=$(cat /tmp/email_body.txt)
$GAPI mail send --to "user@example.com" --subject "Refund of $20" --body "$BODY"

Or use safe_mail_send.sh which handles this automatically.

Troubleshooting

ProblemFix
NOT_AUTHENTICATEDRun auth.sh --check then re-authorize
REFRESH_FAILEDToken expired -- re-run setup.py --auth-url
AADSTS700016Wrong client_id or tenant_id
AADSTS65001User not consented -- check API permissions
Insufficient privilegesNeed Calendars.ReadWrite permission
$20 becomes 0Use safe_mail_send.sh or temp file pattern
Attachment too largeMax 3MB -- compress or split the file

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Microsoft Workspace AI skill do?

Outlook Calendar, Email, Contacts, and To-Do integration via Microsoft Graph API. Uses OAuth2 with automatic token refresh. Supports Hotmail/Outlook/Microsoft 365 accounts.

Why use Microsoft Workspace on TypingMind?

Because you install it once and use it with any model. Microsoft Workspace is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Microsoft Workspace in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Andrew-Girgis/microsoft-workspace-skill/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Microsoft Workspace?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Microsoft Workspace?

As many as you like. As long as a model supports skills, you can use Microsoft Workspace with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Microsoft Workspace AI skill free?

Yes. It is published on GitHub by Andrew-Girgis under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇