EMAIL OPERATIONS

Email orders turned into a reviewable operations app.

Bellus needed to detect real orders inside varied emails and attachments, extract usable fields, inspect AI output, and send structured results toward the operational workflow.

Email intakeAttachment parsingGemini extractionOrder dashboardGoogle Sheets handoff
01 TriggerInbox webhook

Email and attachments enter n8n.

02 ParsePayload clean-up

Message body, files, and metadata are prepared.

03 AI stepOrder detection

Gemini extracts candidate order fields.

04 ReviewDashboard

Operators inspect raw payloads and AI output.

05 HandoffSheet sync

Approved data moves to Google Sheets.

THE WORKFLOW

From inbox payload to structured order candidate.

The system receives emails through a n8n webhook, parses content and attachments, classifies whether the email is an order, extracts order header fields and line items, stores the payload and analysis, and gives operators a dashboard for inspection.

SYSTEMS

Connected stack

  • n8n webhook
  • React dashboard and Express backend
  • WebSocket status updates
  • PostgreSQL with Drizzle ORM
  • Google Gemini for order detection and extraction
  • PDF and image attachment handling
  • Google Sheets via Apps Script endpoint
BUSINESS PROBLEM

Incoming orders were inconsistent and hard to verify.

Orders arrived as emails and attachments in different formats. The team needed to know what AI could extract, where it was uncertain, and whether the output could be trusted before downstream use.

DELIVERY

A working intake app, not just an automation scenario.

The implementation included authentication, role-based access, session management, order/not-order classification, attachment handling, line-item extraction, order status tracking, payload inspection, dashboard statistics, and admin operations.

GOVERNANCE

AI output stays inspectable.

Operators can inspect raw payloads, extracted fields, confidence signals, processing state, failed records, and uncertain orders. Model updates, token limits, and retry behavior were part of the operating considerations.

OUTCOME

A controlled path from email to order data.

The result is an operational workspace for email-order intake, with clearer visibility than raw JSON in a sheet and a safer path for moving extracted data toward internal systems.

NEXT STEP

Need to turn inbox work into structured operations?

Start with the inputs, extraction fields, review rules, and handoff target. Then build the workflow around that.

Scope an AI workflow