omi
omi copied to clipboard
import from notion ($300)
/bounty $300
See parent task
💎 $300 bounty • omi
Steps to solve:
- Start working: Comment
/attempt #1894with your implementation plan - Submit work: Create a pull request including
/claim #1894in the PR body to claim the bounty - Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts
Thank you for contributing to BasedHardware/omi!
Add a bounty • Share on socials
| Attempt | Started (GMT+0) | Solution |
|---|---|---|
| 🟢 @krushnarout | Mar 20, 2025, 1:30:56 AM | WIP |
Added $300 bounty /bounty $300
/attempt #1894
Plan:
- Integrate Notion’s API to fetch pages/databases.
- Convert data to Omi-compatible format.
- Submit as a PR for review.
Options
/attempt #1894
Implementation plan: Setup: Create Notion Integration (Client ID/Secret, Redirect URI). Add Flutter packages (http/dio, flutter_appauth, flutter_secure_storage). Configure iOS: Modify Info.plist to register the custom URL scheme for the OAuth Redirect URI. This is a standard, necessary modification.
Authentication: Implement Notion OAuth 2.0 using flutter_appauth. This package is recommended as it leverages native iOS APIs (ASWebAuthenticationSession) for a smoother and more compliant user experience compared to manual webview handling. Securely store tokens using flutter_secure_storage (utilizes iOS Keychain).
Data Fetching & Selection: Create a service for Notion API calls (search, get content, query DB). Use standard http/dio requests. Build UI for selecting Notion content after successful authentication. Transformation & Import (iOS Focus): Define mapping logic (Notion JSON -> Omi models). Foreground Processing: Design the import process to run while the app is actively in the foreground. iOS is strict about background execution time. Clear User Feedback: Provide very clear, continuous progress indicators (e.g., "Fetching page X...", "Processing block Y/Z", "Saving item A/B...") so the user knows the app is working and doesn't switch away or kill it.
Error Handling & State: Implement robust error handling for network issues or API errors. Ensure partially imported data doesn't corrupt the Omi database. (Optional - If Large Imports): Consider chunking the import process (fetch some data, process/save, fetch next chunk) to avoid very long-running single operations, making the app feel more responsive and less likely to be killed by iOS if briefly backgrounded. Save transformed data to Omi's local storage.
UI Feedback & Finalization: Use clear visual cues (spinners, progress bars, snackbars/dialogs) for the import status, success, or failure. Update Omi app state to display imported data immediately upon completion. Test thoroughly on physical iOS devices.
Submit PR with /claim #1894.
@kodjima33 I am interested in working on this bounty but want to make sure I understand the request correctly.
Is the idea to create an import app like this which imports a particular thing from notion into a particular place in OMI? EG I could import a whole page as a conversation or I could also import it into memories.
To me, it seems like there are a variety of ways to import things from notion into omi and I'd love to get a better idea of what you are looking for here before getting too far on this bounty.
My personal thought is that starting with something simple like importing a page from notion into OMI as a conversation would be the MVP for this bounty and could be expanded to fulfill other functionality (eg extract specific fields from a notion db & enter each one as a memory etc in omi) as demand dictates.
Please let me know what you think. Thanks! Michael
/attempt #1894
Here is my proposal for the notion bounty:
Instead of the original [import from notion issue](), I will create an application that will work with the notion MCP server. This means the app will be capable of reading AND writing to a user’s notion account. This will be far more powerful and flexible than the initial import only suggestion.
The notion MCP server currently has access to 23 actions. For the MVP implantation of this app I will implement the following 8 actions:
create_page, archive_page, restore_page, search_pages, update_page_properties create_database, query_database, update_database
Here is my rough plan:
Step 1: Set Up the the Notion MCP Server
Step 2: Build the Orchestrator App
This will be a Node.js or Python server that will:
- Have a Webhook Endpoint that can receive a POST request from OMI containing transcribed conversation text.
- Integrate an LLM SDK that supports "Tool Calling"
- Define the Tools the LLM can request.
Step 3: Implement the Core "Agent" Logic
This is a multi-step conversation to fulfill a single user request.
Here’s how it would work w/ the request: "add face lotion to my shopping list and add the following stores: target, walgreens, walmart"
- Initial Request: the app receives the conversation text from the webhook. It sends this text to the LLM along with the definitions of the tools it has (
find_notion_database,add_item_to_database, etc). - LLM Plans, Part 1 (Find): The LLM determines it cannot add the item without knowing the database's ID and structure. It will return a JSON object requesting to use a tool.
- LLM -> App: "Please run the
find_notion_databasetool with the argumentquery: 'shopping list'."
- LLM -> App: "Please run the
- App Executes & Reports Back:
- the app parses this request and calls the internal
find_notion_databasefunction. - This function makes an API call to the running Notion MCP server to perform the search.
- The MCP returns the database details, including its properties (schema).
- The app then sends this result (the ID and schema) back to the LLM as the output of the tool call.
- the app parses this request and calls the internal
- LLM Plans, Part 2 (Act): The LLM now has the context it was missing. It sees the database ID and knows it has properties like "Item Name" (a title) and "Stores" (a multi-select). It forms a new, complete plan.
- LLM -> App: "Please run the
add_item_to_databasetool withdatabase_id: 'd1b2c3a4-...'and a detaileddataobject that maps 'face lotion' to the 'Item Name' field and['target', 'walgreens', 'walmart']to the 'Stores' field."
- LLM -> App: "Please run the
- App Executes the Final Plan:
- The app parses this final request and calls the
add_item_to_databasefunction. - This function makes the final API call to the Notion MCP server with the specific ID and data object, which then creates the ‘face lotion’ page w/ relevant details in the shopping list database.
- The app parses this final request and calls the
@kodjima33 I would like to work on this issue can you please assign this issue to me ? Thanks!