Universal Inbox — Capture Anything
One place for all raw information. Learn every capture mode, how AI extraction works, and how to get 95%+ accuracy — beginner to advanced.
What is Universal Inbox?
Beginner: Why Inbox?
UI: /w/[workspace]/inbox — textarea + 5 capture buttons. API: POST /api/inbox. Every item becomes inbox_items row with workspace_id, content, type, created_at.
Keywords: inbox_items, ingestion pipeline, entity extraction, provenance.
Capture Modes — Every Input Type
Plain Text / Chat Message
Paste any message, brief, or note. Most accurate mode.
Example inputs that work well:
- "Need 3 reels for GB Banquet by Friday. Use new logo from Drive."
- "Client XYZ wants pricing section updated by Thursday. See pricing.pdf"
- "Tanniaqua product launch — need LinkedIn post with new photo, due Friday"
- "Remind me to call Sarah about GB invoice tomorrow 10am"Behind: direct to Inbox Agent → entity extraction.
Extraction Pipeline (Step-by-Step)
Ingestion
Route: app/api/inbox/route.ts
- Validate with Zod: { content: string, source_type?: string }
- Check workspace tenancy via lib/auth/dal
- Create inbox_items + job in Redis (ioredis)AI Extraction (Inbox Agent)
Prompt includes: role “Extract client, project, tasks, requirements, deadline, people, links, priority from this content”. Returns JSON validated by Zod.
Output: {
client: "GB Banquet",
project: "Social Media",
tasks: [{ title: "Event highlights reel", requirements: ["Use latest logo"], estimatedMinutes: 90 }],
deadline: "2025-12-06", // parsed via date-fns
people: ["Sarah"],
priority: "high",
confidence: 0.92
}Provider: ANTHROPIC_API_KEY etc., fallback heuristic = regex for dates/people. Evidence saved intask_extractions.
Proposal & Confirmation
Result shown in Review modal. Safe auto-actions (create task) wait for Confirm; sensitive (send email) require explicit approval.
AI Extraction — What Gets Extracted
| Field | How Detected | Example |
|---|---|---|
| client | LLM NER + existing clients table match | “for GB Banquet” → GB Banquet |
| project | Keyword + client context | “Social Media” → Social Media — GB |
| tasks[] | Sentence segmentation + action verbs | “Make 3 reels” → 3 tasks |
| deadline | date-fns parse + relative (“Friday” → 2025-12-06) | “before Saturday” |
| priority | Heuristic: due <3d, words “urgent”, client importance | high / medium / low |
| people | NER for names/emails | “Sarah” → people[0] |
| requirements | Checklist items, “use logo”, “add music” | Checklist generation |
Review & Create Modal
Review Screen Shows
- Detected Client/Project (editable dropdown)
- Tasks list with title, description, checklist, estimated minutes (90)
- Deadline with calendar picker (AI suggestion shown, you can override)
- Assets: Drive search results (if connected)
- Confidence badge (e.g., 92% — low if ambiguous)
Click Create & Organize
Creates:
- clients (if new)
- projects (if new)
- tasks[] with { workspace_id, project_id, client_id, title, due_date, priority, source_type: "inbox", source_id, ai_confidence }
- task_checklist_items
- job to index for searchDatabase & Storage
Tables:
- inbox_items: id, workspace_id, content, type, created_at
- task_extractions: id, inbox_item_id, extracted_json, confidence, model
- tasks: as above + next_action AI, priority_score
Storage:
- STORAGE_DIR/.storage/<workspace>/inbox/<id>.png
- Pluggable adapter: lib/storage (local → R2)
Queue:
- Redis key: queue:extract → worker picks → job_runs logs