Cortana: WhatsApp Command Center for a Notion Workspace
What I Built
Cortana is a WhatsApp-to-Notion command center. You text a message from your phone, and Cortana:
- Classifies the intent into one of 6 life domains (Blueprint)
- Searches the matching knowledge in my Notion workspace
- Replies back in WhatsApp with the domain + relevant pages
The 6 Blueprint domains:
- Personal β identity, contacts, legal, finance, assets
- Health β medical, fitness, medications, providers
- Projects β code, hackathons, creative work
- Work β employers, applications, consulting
- Growth β learning, writing, AI exploration
- Systems β archives, exports, logs, normalization
How It Works
flowchart LR
A[WhatsApp message] --> B[Twilio webhook]
B --> C[Cloudflare Worker adapter]
C --> D[Notion Worker: classifyAndRespond]
D --> E[Notion API search]
E --> F[Formatted WhatsApp reply]
Request flow:
- WhatsApp message arrives in Twilio
- Twilio calls my Cloudflare Worker webhook
- The adapter forwards into a Notion Worker tool (classifyAndRespond)
- The tool classifies the message into a Blueprint domain and runs a Notion workspace search
- The results are formatted and returned to Twilio
- Twilio replies back to WhatsApp
The Stack
- Notion Workers (alpha) β worker tool runtime
- Cloudflare Workers β Twilio webhook adapter
- Twilio WhatsApp API β message ingestion and reply
- Notion API (@notionhq/client) β workspace search
- TypeScript β end-to-end
How I Used Notion MCP
Notion is the system of record for this project:
- My workspace is organized into the Blueprint taxonomy (Personal, Health, Projects, Work, Growth, Systems)
- Cortana uses that structure to classify and retrieve the right information instead of doing a generic search
- Notion AI was used to structure planning artifacts and build documentation during development
Demo
- A WhatsApp question
- The returned domain classification
- A few matched Notion pages
The Build Story (key blocker + fix)
I hit a repeated deploy failure while using the Notion Workers CLI:
error: Failed to create worker: unauthorized
hint: run ntn login to authenticate
Login succeeded, but deploy kept failing. Root cause: a macOS Keychain issue where the CLI stored tokens but couldnβt reliably read them during deploy.
Fix:
export NOTION_API_TOKEN=$(security find-generic-password -s "notion-cli" -a "WORKSPACE_ID" -w)
export NOTION_WORKSPACE_ID=WORKSPACE_ID
ntn workers deploy
After that: Notion Worker deployed, Cloudflare adapter deployed, Twilio wired up, and messages round-tripped end-to-end.
Whatβs Next
- Domain-filtered search (restrict search to a specific Blueprint domain)
- triageBacklog (inbox triage and prioritization)
- dispatchBlueprint (create new pages/rows directly into the right domain)
- Multi-turn context (track conversation threads)
- Move off Twilio sandbox to a real WhatsApp number
Links
- GitHub: https://github.com/zainkhan1994/cortana-notion-mcp
- Cloudflare adapter: https://cortana-twilio-adapter.cortana-khanstruct.workers.dev
- Builder: Zain Khan (Khanstruct)



Top comments (0)