Sync scope
Default for new connectors: after OAuth, the user picks folders in Supermemory’s hosted folder picker. Only files in the selected folders are synced, and nothing syncs until at least one folder is saved. Whole OneDrive: setconfig.syncScope to "full" when creating the connector so the entire drive syncs without the picker.
Explicit scoped mode: set config.syncScope to "selected" for the picker flow, or rely on the default for new connects.
Connectors created before folder selection was available keep syncing the whole drive. They can narrow to folders by opening the picker and saving a selection.
Quick setup
1. Create OneDrive Connector
2. Handle Microsoft OAuth
Send the user toauthorization.url before authorization.expiresAt. With scoped sync (syncScope omitted or "selected"), Supermemory then sends the user to its hosted folder picker; once they save a selection, they return to your redirectUrl and the initial sync begins. With syncScope: "full", Microsoft redirects through Supermemory to your redirectUrl and the initial sync begins right away. A pending OAuth connector is not returned by list until the user finishes authorization; get returns it with system.status: "pending_authorization".
3. Monitor sync status
There is no per-connector document list in v5.
supermemory.list(namespace, "documents") returns every document in the namespace.include: "picker" and send the user to picker.url, or set folder ids directly with connectors.update(namespace, id, { selection: { folders: ["<folder-id>"] } }). A new selection replaces the old one and starts a sync. See Managing Connector Selection.
Supported document types
Word, Excel, and PowerPoint files are converted to PDF by Microsoft Graph before extraction. Markdown, PDF, JSON, and plain-text files are downloaded as-is and go through the same extraction pipeline as uploads.Microsoft Word documents
- Rich text formatting converted to markdown
- Headers and styles preserved as markdown hierarchy
- Images and charts extracted and referenced
- Tables converted to markdown tables
Excel spreadsheets
- Worksheet data converted to structured markdown
- Multiple sheets processed separately
- Charts and graphs extracted as images
- Formulas converted to calculated values
- Cell formatting simplified in markdown
PowerPoint presentations
- Slide content converted to structured markdown
- Speaker notes included when present
- Images and media extracted and referenced
- Embedded objects processed when possible
Sync mechanism
Webhooks lead to real-time syncing of changes in documents. You may also manually trigger a sync.Manual sync trigger
The call returns409 while a sync for that connector is already running.
Delete Connector
Remove a OneDrive connector when no longer needed:Deleting a connector will:
- Stop all future syncs from OneDrive
- Remove the OAuth authorization
- Delete the synced documents unless you pass
deleteDocuments: false
Advanced configuration
Custom Microsoft app
For production deployments you can connect with your own Microsoft application. Custom OAuth credentials are an organization setting and are not part of the v5 connector routes. See Custom OAuth Applications for the setup steps and callback URL.Optimization tips
- Set realistic document limits based on storage and usage
- Monitor sync health regularly with
latestRunandinclude: "syncs" - Trigger manual syncs when immediate updates are needed
- Consider account type when setting expectations
OneDrive-Specific Benefits:
- Supports both personal and business Microsoft accounts
- Processes all major Office document formats
- Preserves document structure and formatting
- Handles large enterprise document collections