Add Microsoft 365 integration to community plugins#6865
Add Microsoft 365 integration to community plugins#6865snyfer wants to merge 1 commit intoBasedHardware:mainfrom
Conversation
Adds external-integration entry for OMI + Microsoft 365 (Outlook Mail, Calendar, Teams, SharePoint, OneDrive) with user-facing setup instructions and icon. Backend: https://github.com/snyfer/omi-ms365-plugin Hosted: https://omi-ms365-plugin.onrender.com
Greptile SummaryThis PR adds a new community plugin ( Confidence Score: 5/5Safe to merge; all remaining findings are P2 style/operational suggestions that do not block correctness. The change is purely additive. JSON schema matches existing patterns, OAuth setup follows the same auth_steps convention used by Notion, Google Drive, and other plugins, and the README provides clear scope disclosure. The two P2 notes (scope wording and Render cold-start) are quality improvements, not blockers. No files require special attention; minor scope-wording clarification in plugins/instructions/ms365/README.md is the only suggested improvement. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant OMI App
participant Plugin Backend (Render)
participant Microsoft Entra ID
participant Microsoft Graph API
User->>OMI App: Tap "Connect with Microsoft"
OMI App->>Plugin Backend (Render): GET /setup/ms365?uid=<uid>
Plugin Backend (Render)-->>OMI App: Renders sign-in page
User->>Plugin Backend (Render): Click "Connect with Microsoft"
Plugin Backend (Render)->>Microsoft Entra ID: Redirect /auth/microsoft (PKCE + state token)
Microsoft Entra ID-->>User: Login + consent screen (15 scopes)
User->>Microsoft Entra ID: Approve
Microsoft Entra ID->>Plugin Backend (Render): Callback with auth code
Plugin Backend (Render)->>Microsoft Entra ID: Exchange code for tokens
Plugin Backend (Render)->>Plugin Backend (Render): Store tokens server-side (Redis, keyed by uid)
Plugin Backend (Render)-->>OMI App: Redirect back to OMI
OMI App->>Plugin Backend (Render): GET /setup_check?uid=<uid>
Plugin Backend (Render)-->>OMI App: {"is_setup_completed": true}
Note over OMI App, Plugin Backend (Render): Tool calls (16 tools)
OMI App->>Plugin Backend (Render): POST tool call (e.g. draft email)
Plugin Backend (Render)->>Microsoft Graph API: Delegated API request
Microsoft Graph API-->>Plugin Backend (Render): Response
Plugin Backend (Render)-->>OMI App: Tool result
Note over OMI App, Plugin Backend (Render): Memory webhook (no-op currently)
OMI App->>Plugin Backend (Render): POST /webhook/memory
Plugin Backend (Render)-->>OMI App: {"received": true}
Reviews (1): Last reviewed commit: "Add Microsoft 365 community plugin" | Re-trigger Greptile |
| The plugin requests the minimum delegated Microsoft Graph scopes required | ||
| for the features above: `User.Read`, `MailboxSettings.Read`, `Mail.Read`, | ||
| `Mail.Send`, `Mail.ReadWrite`, `Calendars.ReadWrite`, `Chat.ReadWrite`, | ||
| `ChannelMessage.Send`, `OnlineMeetings.ReadWrite`, `Team.ReadBasic.All`, | ||
| `Files.ReadWrite.All`, `Sites.Read.All`, `People.Read`, `Contacts.Read`, | ||
| `offline_access`. |
There was a problem hiding this comment.
"Minimum" scopes overstated for broad write permissions
Describing these as the minimum required scopes may give users false confidence. Files.ReadWrite.All grants write access to every file the signed-in user can reach — including files shared with them in SharePoint — not just files the plugin itself creates. Similarly, Mail.ReadWrite allows modifying (not just reading or sending) all mail, and Sites.Read.All exposes all SharePoint site content for work/school accounts. Consider using Files.ReadWrite (app-created files only) where feasible, and replace "minimum" with more neutral phrasing such as "required" so users can make a fully informed decision.
| The plugin requests the minimum delegated Microsoft Graph scopes required | |
| for the features above: `User.Read`, `MailboxSettings.Read`, `Mail.Read`, | |
| `Mail.Send`, `Mail.ReadWrite`, `Calendars.ReadWrite`, `Chat.ReadWrite`, | |
| `ChannelMessage.Send`, `OnlineMeetings.ReadWrite`, `Team.ReadBasic.All`, | |
| `Files.ReadWrite.All`, `Sites.Read.All`, `People.Read`, `Contacts.Read`, | |
| `offline_access`. | |
| The plugin requests the following delegated Microsoft Graph scopes required |
| ], | ||
| "external_integration": { | ||
| "triggers_on": "memory_creation", | ||
| "webhook_url": "https://omi-ms365-plugin.onrender.com/webhook/memory", |
There was a problem hiding this comment.
Render free-tier cold-start latency
The backend is hosted on Render's free tier (omi-ms365-plugin.onrender.com), which spins down after ~15 minutes of inactivity and takes 50+ seconds to wake on the first request. Tool calls that arrive during a cold-start window will time out or return an error from OMI's side, and users will have no context for why the integration stopped responding. Consider either noting this in the README or upgrading to a paid plan before the plugin goes live to a wider audience.
|
Hey @snyfer 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! 💜 |
Full-featured Microsoft 365 integration for Omi — Outlook Mail, Outlook Calendar, Microsoft Teams (chats + meetings), SharePoint and OneDrive — exposed as Omi chat tools. Self-contained FastAPI app following the convention of sibling apps in plugins/ (e.g. omi-google-calendar-app, omi-notion-app). Supersedes closed PR BasedHardware#6865, which used the deprecated community-plugins.json entry format. Layout: - main.py FastAPI + tool dispatcher (16 tools) - config.py Settings + Graph scopes - services/ auth, mail, calendar, teams, sharepoint, profile, graph_client, storage - omi-tools.json Tool manifest served at /.well-known/omi-tools.json - Procfile, railway.toml Railway/Render/Heroku deploy - requirements.txt, .env.example, .gitignore
Add Microsoft 365 integration to community plugins
This PR adds a new external-integration community plugin that connects OMI to Microsoft 365 (Outlook Mail, Calendar, Teams, SharePoint and OneDrive) via a single Microsoft Entra ID OAuth 2.0 sign-in.
What it does
Once a user connects their Microsoft account from the OMI Apps screen, the plugin exposes 16 callable tools so the OMI assistant can:
The memory webhook currently acknowledges
memory_creationevents without side effects; the plugin is driven by explicit tool calls from the assistant. The webhook is kept as a hook for future auto-archive / auto-scheduling features.What's included
community-plugins.json(id: omi-ms365-integration)plugins/instructions/ms365/README.md(user-facing setup doc)plugins/logos/ms365.png(square icon)Backend
tenant_id=common), 15 delegated Graph scopes, standard authorization-code + PKCE flowVerification
GET /→ 200, status runningGET /setup/ms365?uid=<uid>→ renders "Connect with Microsoft" pageGET /auth/microsoft?uid=<uid>→ 302 tologin.microsoftonline.comwith all 15 scopes and a signed state tokenGET /setup_check?uid=<uid>→{"is_setup_completed": bool}POST /webhook/memory→{"received": true}Security / Privacy
uidpassed at setup time. Never returned to the client.offline_access+ refresh-token rotation used to keep the connection alive.uidand structural event metadata.Checklist
community-plugins.jsonplugins/instructions/ms365/README.mdplugins/logos/ms365.pngsetup_completed_urlandwebhook_urlreachable and returning correct JSON