Inspiration

Building workflow automations in tools like n8n, Zapier, or Make requires understanding each platform's node ecosystem, connection formats, and configuration quirks. For someone who knows what they want automated but not how to wire it up, the learning curve is steep. We wanted to eliminate that gap entirely — let people describe business processes in plain English and get a working, deployed automation out the other end.

What it does

Morgo8 is a 6-step AI pipeline that converts natural language into deployed n8n workflows:

  1. Chat — User describes their automation in plain English (e.g., "When I get a new email with an attachment, save it to Google Drive and notify me on Slack")
  2. Extract — Gemini 2.0 Flash parses the description into structured requirements: trigger type, processing steps, variables, and data flow
  3. Discover — RAG-powered search over a curated knowledge base of n8n nodes finds the best matches using semantic similarity (ChromaDB + nomic-embed-text), then Gemini re-ranks results for relevance
  4. Generate — Gemini produces valid n8n workflow JSON with correct node configurations, connections (including n8n's double-nested array format), and type versions
  5. Preview — Interactive React Flow canvas lets users inspect the workflow visually, click nodes to see parameters, and request changes before deploying
  6. Execute — The workflow is deployed to a live n8n instance via REST API, activated, and can be triggered immediately with custom inputs

After deployment, workflows appear on a dashboard where users can manage, re-execute, or open them in the n8n editor.

How we built it

Backend (Python FastAPI):

  • Google Gemini 2.0 Flash for all AI tasks (extraction, re-ranking, generation) using response_mime_type="application/json" for structured outputs
  • ChromaDB as the vector database with nomic-embed-text embeddings for semantic node discovery
  • A curated knowledge base of 20 n8n node definitions with full parameter schemas, auth requirements, and example configurations
  • n8n REST API integration for workflow CRUD, activation, and webhook-based execution
  • Configuration analysis endpoint that cross-references deployed workflows against the node knowledge base to surface credential and input requirements

Frontend (React 19 + Vite 7 + TypeScript):

  • Zustand for state management driving the step-based pipeline and dashboard view routing
  • React Flow (@xyflow/react) for the interactive workflow canvas with custom node components, pan/zoom, and click-to-inspect
  • Framer Motion for staggered animations throughout the pipeline steps
  • Tailwind CSS 4 with a dark theme and purple accent palette
  • Real-time pipeline progression — each step auto-advances on success

Infrastructure:

  • n8n runs via Docker Compose as the workflow execution engine
  • All components run locally — no cloud dependencies beyond the Gemini API

Challenges we ran into

  • n8n's connection format uses a double-nested array structure ({ "Source": { "main": [[{...}]] } }) that isn't well-documented. Getting Gemini to consistently produce valid connection JSON required careful few-shot prompting with example workflows.
  • n8n type versions must match exactly or workflows get silently rejected — no error, just broken nodes. We had to manually verify each node's typeVersion against live n8n instances.
  • n8n v2.6+ removed the public execution API, so we had to pivot to a Webhook trigger + POST approach for programmatic execution.
  • nomic-embed-text requires asymmetric search prefixes ("search_query: " vs "search_document: ") for good retrieval quality — using the wrong prefix mode significantly degraded node discovery accuracy.
  • Gemini's JSON mode without response_mime_type="application/json" wraps output in markdown code blocks, which broke our pipeline parsing until we tracked it down.
  • Getting the AI to generate workflows that n8n actually accepts (valid parameters, correct credential references, proper node positioning) required iterative prompt engineering and a validation layer.

Accomplishments that we're proud of

  • End-to-end pipeline works with real APIs — no mocks, no hardcoded data. A plain English sentence becomes a deployed, executable workflow on a live n8n instance.
  • The RAG-powered node discovery accurately matches user intent to the right n8n nodes, even when the user doesn't know the exact node names.
  • Request changes flow — users can describe modifications in natural language at the preview step, and Gemini regenerates the workflow while preserving the parts that were correct.
  • Interactive canvas with React Flow replaced our initial SVG renderer, giving users a proper pan/zoom/click-to-inspect experience.
  • The entire app runs locally with just Docker + two API keys (Gemini + n8n), making it easy to demo and develop.

What we learned

  • LLMs are surprisingly good at generating valid automation configurations when given enough structural context (node schemas, example workflows, connection format specs). The key is constraining the output format tightly.
  • RAG with domain-specific embeddings outperforms raw LLM knowledge for tool/node selection — Gemini alone would hallucinate node names, but vector search over our curated knowledge base keeps it grounded.
  • n8n's API is powerful but has sharp edges (silent failures, undocumented format requirements) that required hands-on debugging against a live instance.
  • Building a multi-step AI pipeline where each step feeds the next requires careful error handling at every boundary — one bad extraction cascades through the entire flow.

What makes this different

Most AI automation tools fall into one of two camps: chatbots that describe what a workflow would look like, or no-code builders that still require you to manually drag, connect, and configure every node. Morgo8 sits in neither camp - it generates real, executable workflow JSON and deploys it to a real automation engine.

The distinction matters. We're not generating a diagram or a to-do list of steps. The output is a working n8n workflow with correct node parameters, valid connections, proper type versions, and a live webhook endpoint. You can open it in n8n's editor and see every node configured exactly as if a human built it.

The technical core is a grounded generation pipeline. Instead of asking an LLM to guess node names and parameters (which it gets wrong frequently), we use RAG over a curated knowledge base of n8n node schemas. The LLM selects from what actually exists rather than hallucinating. This is why the generated workflows actually run - the AI is constrained to real node definitions, real parameter types, and real connection formats.

The other piece is that n8n itself does the heavy lifting for execution. We're not reimplementing automation infrastructure - we're generating configurations for an engine that already handles retries, error handling, scheduling, and 400+ integrations. Morgo8 is the intelligence layer that bridges natural language to that engine.

What's next for Morgo8

  • Multi-turn refinement - conversational back-and-forth to iteratively improve workflows instead of single-shot generation
  • Credential management - programmatic OAuth flows so users don't need to manually configure credentials in n8n
  • Workflow templates - curated starting points for common automations (lead nurturing, content publishing, data sync)
  • Expanded node coverage - growing the knowledge base beyond 20 nodes to cover more of n8n's 400+ integrations
  • Execution monitoring - real-time logs and status tracking for deployed workflows directly in the Morgo8 dashboard
  • Self-healing workflows - the debugger agent already exists; next step is automatic retry with AI-generated fixes when executions fail

Built With

  • chromadb
  • docker
  • fastapi
  • framer-motion
  • google-gemini-2.0-flash
  • n8n
  • nomic-embed-text
  • python
  • react
  • react-flow
  • sentence-transformers
  • tailwind-css
  • typescript
  • vite
  • zustand
Share this project:

Updates

Submission history