Skip to content

BasedHardware/omi-microsoft-one-note

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OneNote Integration for Omi

Create and search notes using voice commands through your Omi device. Save ideas, reminders, meeting notes - all hands-free!


Features

  • Create Notes - Save notes using natural voice commands
  • Search Notes - Find your notes instantly by keywords
  • Organize by Notebook - Save to specific notebooks and sections
  • List Recent Notes - See what you've been working on
  • Read Note Content - Retrieve full content of any note
  • Secure OAuth - Industry-standard OAuth 2.0 with Microsoft

Quick Start

  1. Install the OneNote app from the Omi App Store
  2. Click "Connect with Microsoft" to authenticate
  3. Start using voice commands!

Voice Commands

Command Description
"Create a note about meeting with John" Create a quick note
"Save a note titled Shopping List with milk, eggs, bread" Create note with title
"Search my notes for project ideas" Search by keywords
"Show my recent notes" List recent notes
"What notebooks do I have?" List your notebooks

Omi App Store Details

App Information

Field Value
App Name OneNote
Category Productivity
Description Create and search OneNote notes using voice commands. Save ideas, meeting notes, reminders, and more - all hands-free through Omi.
Author Omi Community
Version 1.0.0

Capabilities

  • External Integration (required for chat tools)
  • Chat (for voice command responses)

URLs for Omi App Configuration

URL Type URL
App Home URL https://your-app.up.railway.app/
Setup Completed URL https://your-app.up.railway.app/setup/onenote
Auth URL https://your-app.up.railway.app/auth/microsoft
Chat Tools Manifest URL https://your-app.up.railway.app/.well-known/omi-tools.json

Note: Omi automatically appends ?uid=USER_ID to these URLs.


Microsoft Azure Setup

Step 1: Register an Azure AD Application

  1. Go to Azure Portal
  2. Navigate to Azure Active Directory > App registrations > New registration
  3. Enter app name (e.g., "Omi OneNote Integration")
  4. Select Accounts in any organizational directory and personal Microsoft accounts
  5. Click Register

Step 2: Configure Authentication

  1. In your app registration, go to Authentication
  2. Click Add a platform > Web
  3. Add redirect URI: https://your-app.up.railway.app/auth/microsoft/callback
  4. For local development, also add: http://localhost:8080/auth/microsoft/callback
  5. Click Configure

Step 3: Create Client Secret

  1. Go to Certificates & secrets
  2. Click New client secret
  3. Add a description and select expiration
  4. Copy the secret value immediately (it won't be shown again)

Step 4: Configure API Permissions

  1. Go to API permissions
  2. Click Add a permission > Microsoft Graph > Delegated permissions
  3. Add these permissions:
    • User.Read
    • Notes.Read
    • Notes.ReadWrite
    • Notes.Create
    • offline_access
  4. Click Grant admin consent if you have admin access (optional but recommended)

Chat Tools

This app exposes a manifest endpoint at /.well-known/omi-tools.json that Omi automatically fetches.

Available Tools

Tool Description
create_note Create a new note in OneNote
search_notes Search for notes by keywords
list_notebooks List all notebooks
list_sections List sections in a notebook
list_recent_notes Show recently modified notes
get_note_content Get full content of a note

Development

Prerequisites

  • Python 3.8+
  • Microsoft Azure account with app registration

Local Setup

# Navigate to the plugin directory
cd plugins/onenote

# Create virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Create .env file with your credentials
cat > .env << EOF
MICROSOFT_CLIENT_ID=your_client_id
MICROSOFT_CLIENT_SECRET=your_client_secret
MICROSOFT_REDIRECT_URI=http://localhost:8080/auth/microsoft/callback
MICROSOFT_TENANT=common
PORT=8080
EOF

# Run the server
python -m uvicorn main:app --reload --port 8080

Environment Variables

Variable Description Default
MICROSOFT_CLIENT_ID Azure AD Application (client) ID Required
MICROSOFT_CLIENT_SECRET Client secret from Azure AD Required
MICROSOFT_REDIRECT_URI OAuth callback URL http://localhost:8080/auth/microsoft/callback
MICROSOFT_TENANT Azure AD tenant (common for multi-tenant) common
PORT Server port 8080
REDIS_URL Redis connection URL (optional for production) None

Deploy to Railway

Step 1: Create Railway Project

  1. Go to Railway and sign in
  2. Click "New Project" > "Deploy from GitHub repo"
  3. Select your repository and choose the plugins/onenote folder

Step 2: Add Redis Database

  1. In your Railway project, click "+ New" > "Database" > "Add Redis"
  2. Railway automatically creates and connects the Redis instance
  3. The REDIS_URL environment variable is set automatically

Step 3: Configure Environment Variables

Go to your service's Variables tab and add:

Variable Value
MICROSOFT_CLIENT_ID Your Azure AD Application ID
MICROSOFT_CLIENT_SECRET Your client secret from Azure
MICROSOFT_REDIRECT_URI https://YOUR-APP.up.railway.app/auth/microsoft/callback
MICROSOFT_TENANT common

Step 4: Update Azure AD Redirect URI

Add your Railway URL as a redirect URI in Azure Portal:

  1. Go to your app registration > Authentication
  2. Add redirect URI: https://YOUR-APP.up.railway.app/auth/microsoft/callback

Step 5: Update Omi App Store

Update your app URLs in the Omi App Store:

URL Type Value
App Home URL https://YOUR-APP.up.railway.app/
Setup Completed URL https://YOUR-APP.up.railway.app/setup/onenote
Auth URL https://YOUR-APP.up.railway.app/auth/microsoft
Chat Tools Manifest URL https://YOUR-APP.up.railway.app/.well-known/omi-tools.json

API Endpoints

Endpoint Method Description
/ GET Home page / App settings
/health GET Health check
/auth/microsoft GET Start OAuth flow
/auth/microsoft/callback GET OAuth callback
/setup/onenote GET Check setup status
/disconnect GET Disconnect account
/.well-known/omi-tools.json GET Chat tools manifest
/tools/create_note POST Create a note
/tools/search_notes POST Search notes
/tools/list_notebooks POST List notebooks
/tools/list_sections POST List sections
/tools/list_recent_notes POST List recent notes
/tools/get_note_content POST Get note content

Troubleshooting

"User not authenticated"

  • Complete the Microsoft OAuth flow by clicking "Connect with Microsoft" in app settings

"Could not find notebook"

  • Check spelling of the notebook name
  • The app uses fuzzy matching, but very different names won't match
  • Make sure the notebook exists in your OneNote

"Token expired"

  • The app automatically refreshes tokens
  • If issues persist, disconnect and reconnect your account

"AADSTS error during authentication"

  • Verify your Azure AD app registration settings
  • Ensure redirect URI matches exactly
  • Check that all required API permissions are granted

License

MIT License - feel free to modify and distribute.


Support

For issues or feature requests, please open an issue on GitHub or contact the Omi community.


Made with love for Omi

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •