M/N Malek El Najjarproject details

PROJECT / 02 · AI AUTOMATION / BUSINESS OPERATIONS

AutoFlow

Lead intake, AI scoring,
and follow-up notifications.

AutoFlow stores incoming leads, uses n8n and OpenAI to score them, and sends Discord and email notifications. The dashboard shows each lead’s details and processing history.

ROLEFull-stack · automation · integration · hardening
STACKNext.js · React · Neon Postgres · Prisma · n8n
AIOpenAI structured output
01Leadsubmitted
02Postgrespersisted
03n8norchestrates
04OpenAIanalyzes
05Scoringstructured JSON
06ADiscordhot lead
06BEmailevery lead
07Dashboardactivity log
AUTOMATIONFLOWONLINE
POSTGRES = SYSTEM OF RECORDPACKET ROUTE / LIVE MODEL
WHY I BUILT IT

Keeping lead details
and follow-ups together.

Each lead is saved before processing starts. n8n requests an AI analysis, writes the validated fields back to the app, and sends notifications. The activity log makes it easier to check what happened if a step fails.

DEMO / WHAT YOU CAN SEE

READ-ONLY DEMO · SAMPLE LEADS

Explore a scored lead
and its activity history.

01Persist first.

The lead enters durable application state before automation starts doing work.

02n8n orchestrates.

The workflow validates input, calls the AI stage, and coordinates authenticated write-back.

03AI returns structured fields.

Score, temperature, urgency, category, summary, and recommendation are explicit outputs.

04Side effects stay retry-safe.

Discord and email paths are designed so a workflow retry does not duplicate notifications.

Explore the demo workspace →
VIDEO / WALKTHROUGH

END-TO-END PRODUCT DEMO · 3:18

Watch a lead
move through AutoFlow.

In the video, I submit a test lead through the owner workflow and show its AI analysis and activity history. The public demo lets you browse sample records without submitting leads or sending notifications.

SYSTEM / ARCHITECTURE

INTAKE → PERSIST → ORCHESTRATE → ANALYZE → WRITE-BACK → NOTIFY

How a lead moves
through the system.

01Lead intakepublic request
02PostgreSQLpersist first
03n8nworkflow state
04OpenAIstrict JSON result
05Internal APIsecret-auth write
06NotificationsDiscord + email
ENGINEERING / DECISIONS
01 / STATE

PostgreSQL is the system of record.

The dashboard and workflow share durable lead state instead of relying on transient automation-node memory.

02 / OUTPUT

AI output is checked against a schema.

Lead score, temperature, urgency, category, summary, and recommendation are validated structured fields.

03 / SECURITY

n8n writes through a dedicated internal API.

Machine-to-machine updates use separate secret authentication rather than the general user mutation surface.

04 / RETRIES

Notification side effects are idempotent.

Workflow retries cannot silently duplicate outbound alerts or emails.

DEMO / BOUNDARY
PUBLIC DEMO

The public demo uses sample records.

The demo uses synthetic records and has no path to the production database or notification side effects.

READ ONLY

The public demo is read-only.

The demo repository exposes reads only; mutation attempts do not alter the synthetic workspace.

MALEK EL BADAWI EL NAJJAR

Open the dashboard
and explore a sample lead.