enhancementgood first issueintegrationnew-featurenew-integration
Metriche repository
- Star
- (1930 stelle)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
Description
Add Apple Notes integration to sync notes, folders, attachments, and note-taking activity into CORE.
Reference Implementations
Existing Integrations (use as templates)
integrations/notion/- Similar note-taking/document systemintegrations/google-docs/- Document management integrationintegrations/slack/- For reference
Required Files Structure
integrations/apple-notes/
├── src/
│ ├── index.ts # Main entry, auth spec
│ ├── schedule.ts # Sync logic
│ ├── utils.ts # Apple Notes access utilities
│ ├── account-create.ts # Auth setup
│ └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md
Apple Notes API Integration
Authentication Setup
- Important: Apple Notes does not have an official public REST API
- Access methods vary by platform:
- macOS: JXA (JavaScript for Automation) / AppleScript via
osascript - iOS/macOS: SiriKit Intents (INCreateNoteIntent, INSearchForNotebookItemsIntent)
- iCloud: CloudKit private database access (requires Apple Developer account)
- Local Database: Direct SQLite database access (~/Library/Group Containers/group.com.apple.notes/)
- macOS: JXA (JavaScript for Automation) / AppleScript via
Available Access Methods
- SiriKit Lists & Notes Domain
INCreateNoteIntent- Create new notesINSearchForNotebookItemsIntent- Search for notesINAddTasksToNotebookIntent- Add checklist items
- JXA/AppleScript (macOS only)
Application('Notes')- Access Notes.app.notes()- List all notes.notes.byName()- Find note by name.folders()- List folders.make({new: 'note', ...})- Create a note
- CloudKit (iCloud)
- Access notes stored in iCloud via CloudKit JS or native CloudKit framework
- Requires Apple Developer Program membership
- Web Share API
- Share content to Notes from web applications via the native Share interface
Events to Track
- Note Activity - Notes created, modified, deleted
- Folder Management - Folders created, notes moved between folders
- Attachments - Images, files, or drawings added to notes
- Checklist Activity - Checklist items added, completed, or unchecked
- Sharing - Notes shared or collaboration started
Implementation Tasks
- Set up basic integration structure following
integrations/github/src/index.tspattern - Research and implement the most viable authentication/access method in
account-create.ts - Create API utilities in
utils.ts(likely using JXA/AppleScript or CloudKit) - Implement sync logic in
schedule.tsfor notes and folders - Convert note events to CORE activity format
- Add error handling and platform-specific fallbacks
- Create integration documentation
- Add to
integrations/README.md
Technical Notes
- No official REST API exists - This is the biggest challenge for this integration
- On macOS, the most reliable method is JXA (JavaScript for Automation) which can access Notes.app programmatically
- The local SQLite database is at
~/Library/Group Containers/group.com.apple.notes/NoteStore.sqlitebut direct access is fragile and may break with OS updates - SiriKit intents are limited to iOS/iPadOS apps and Shortcuts
- Community projects like
mcp-apple-notes(GitHub: RafalWilinski/mcp-apple-notes) demonstrate RAG over Apple Notes using MCP - The
Apple Notes Liberatorproject extracts Notes.app data and saves as JSON - Consider a hybrid approach: JXA for macOS + CloudKit for cross-platform sync
Resources
- Apple SiriKit Lists & Notes Documentation
- Apple Developer Forums - Notes API Discussion
- mcp-apple-notes (MCP Server)
- Apple Notes Liberator
Labels
enhancement, integration, new-feature