Chapter 12
SPFx Mail Room
AI-powered document classification in SharePoint
Generic app for multiple use cases, deploy once per site or department.
SharePoint
Teams
Azure AI Foundry
nemoura.com
YOUSSEF EL GARMIT
Chapter 1
Problem & opportunity
  • Manual classification is slow — no AI assistance, documents pile up.
  • No single place — workflow scattered across email, folders, lists.
  • Information gaps — users often need to search or ask for missing details before they can correctly classify documents.
  • Repeated setup per department — each team rebuilds the same solution.
nemoura.com
YOUSSEF EL GARMIT
Chapter 2
Categories we target
Best use of SharePoint in AI agents
  • SharePoint as surface and context
  • Agents meet content where work happens
  • Permissions-aware access
Most innovative SPFx experience
  • Reusable framework, multi-surface
  • Plug-and-play deployment
  • No extra infrastructure
Best mobile experience
  • Real Teams mobile render
  • Touch-first UX
  • Full agent capability on mobile
nemoura.com
YOUSSEF EL GARMIT
Chapter 3
Solution at a glance
One Mail Room app: autoprovisioned lists and libraries, theme-aware SPFx web part on SharePoint (and Teams if configured). One deployment, many sites or departments.
Documents
Incoming Library
AI (Logic App + Agent)
Mail Room
User validation
nemoura.com
YOUSSEF EL GARMIT
Chapter 4
From manual to AI-assisted
Before/after comparison with business metrics
Manual classification
  • 3-5 documents/hour
  • High error rate
  • Repeated setup per department
  • Scattered workflow
AI-assisted with Mail Room
  • 50+ documents/hour
  • 95%+ accuracy
  • One deployment
  • Centralized validation

Decision-makers need to see financials impact, not just features. This justifies the solution to C-suite and budget holders.
nemoura.com
YOUSSEF EL GARMIT
Chapter 5
Solution — SPFx Mail Room
Generic document classification is handled by the following lists, all autoprovisioned on deploy:
Client list
Project list
Mail Room list
Incoming Documents library
Theme-aware SPFx web part (SharePoint pages; Teams if configured). One app, many deployments.
nemoura.com
YOUSSEF EL GARMIT
Chapter 6
Live Experience
Live experience — one app, three surfaces
SharePoint Web
Teams Desktop / Mobile
Same agent endpoint. Same behavior. Different surfaces.
nemoura.com
YOUSSEF EL GARMIT
Chapter 7
How it works — end-to-end
  1. Documents enter via SPFx UI, Power Automate (mailbox), or Scanner/MFD → Incoming Documents library.
  1. Logic App runs on new item → sends content to Azure AI Foundry agent; agent uses Azure Search (clients + projects) and returns best match + alternatives.
  1. Logic App creates/updates the Mail Room item with AI prefill.
  1. User opens Mail Room in SPFx → sees AI suggestions → confirms or overrides → completes validation and deadlines.
One library, one AI pipeline, many entry points.
nemoura.com
YOUSSEF EL GARMIT
Chapter 8
Architecture: How the Magic Happens
nemoura.com
YOUSSEF EL GARMIT
Chapter 9
Multiple ways to add incoming documents
SPFx UI
Users add documents manually or in batch from the app.
Power Automate
Flow watches a mailbox and uploads new attachments to the Incoming Documents library, which triggers the AI process automatically.
Scanner / MFD
Scans (e.g. received mail) are sent to the library and auto-start the same pipeline; strong "wow" in demos.
One library, one AI pipeline, many entry points.
nemoura.com
YOUSSEF EL GARMIT
Chapter 10
SPFx experience — tabs and workflow
The Mail Room web part provides a rich user interface with multiple tabs and workflows.
  • Tabs: My Tasks, My Project, My Team, Group Tasks, All Documents, Need Attention, History, and Deadline Calendar.
  • Classification: Identify subject, client (with suggestions), project, document type, tags, and dates.
  • Deadlines: Review task summary and set optional deadlines.
  • Validation: Project leads review and finalize metadata before classifying documents into the library.
Users can always override AI suggestions for client or project assignments.
nemoura.com
YOUSSEF EL GARMIT
Chapter 11
Generic Use Cases
One App, Three Worlds
Generic Terminology Enables Infinite Reuse
Mail Room - Marketing

Key Mapping:
  • Client → Brand / Company
  • Project → Campaign
  • Document → Marketing Asset
Mail Room - Legal

Key Mapping:
  • Client → Client Party
  • Project → Case Matter
  • Document → Legal Brief
Mail Room - Real Estate

Key Mapping:
  • Client → Property Owner
  • Project → Lease Matter
  • Document → Lease/Deed
The Mail Room adapts to any industry by mapping 'Client' and 'Project' to domain-specific terms. Deploy once. Use everywhere. One codebase. Infinite possibilities.
nemoura.com
YOUSSEF EL GARMIT
Chapter 12
Built on a strong template
The Mail Room is built on a production-ready template with enterprise-grade features.
  • Autoprovisioning of lists and libraries on deploy
  • environment-aware build (dev/qual/prod)
  • theme variants
  • live update for real-time collaboration
  • robust data model and enterprise UI patterns.
nemoura.com
YOUSSEF EL GARMIT
Chapter 11
Demonstration
Example use case : Mail Room scenarios for Marketing and Legal departments
nemoura.com
YOUSSEF EL GARMIT
Chapter 13
Generic Mail Room: AI suggests, human validates — one app, many deployments.
Takeaways
  • Generic and reusable across departments
  • AI suggests, human validates
  • Multiple entry points (app, email, scanner)
  • Optional CRM/DB sync for current reference data
  • Multi-surface support (SharePoint + Teams)
  • Group workflow (verification to validation)
  • Deadline/reminders and mailbox sync
  • SPFx + Azure architecture
  • Production-ready
nemoura.com
YOUSSEF EL GARMIT
Made with