Enterprise Extensions
Relevant source files
The following files were used as context for generating this wiki page:
- packages/cli/src/modules/sso-saml/saml.service.ee.ts
- packages/cli/src/modules/sso-oidc/oidc.service.ee.ts
- packages/cli/src/modules/source-control.ee/source-control.service.ee.ts
- packages/@n8n/ai-workflow-builder.ee/src/code-builder/prompts/index.ts
- packages/@n8n/ai-workflow-builder.ee/src/prompts/agents/discovery.prompt.ts
- packages/@n8n/ai-workflow-builder.ee/src/subgraphs/test/integration/techniques.json
Enterprise Extensions (EE) encompass high-level features and modules designed for large-scale deployments, advanced security, and AI-assisted productivity. These extensions provide advanced authentication methods, source control management, and a unified AI Workflow Builder that automates the generation of executable JavaScript code for n8n workflows.
AI Workflow Builder
The AI Workflow Builder is an expert system that generates complete, executable JavaScript code using the n8n Workflow SDK. It processes user requests through a multi-step pipeline to transform natural language into a functional graph of nodes.
Workflow Generation Process
The builder follows a mandatory seven-step process to ensure technical accuracy and valid configurations.
This diagram shows the sequential logic the AI builder uses to generate and verify workflow code.
- Analyze: Extracts requirements and identifies relevant technique categories such as chatbots, notifications, or data transformation.
- Search & Review: Calls
get_suggested_nodesandsearch_nodesto identify integration-specific nodes or utility nodes like Filter, IF, or Merge. - Design: Maps node connections (linear, branching, or parallel) and traces item counts to determine if
executeOnce: trueis necessary. - Type Definitions: Fetches exact parameter structures using
get_node_typesto avoid guessing version or property names. - Create/Edit: Generates or modifies the
/workflow.jsfile usingexpr()for expressions andnewCredential()for authentication. - Validate: Checks the generated code for syntax or logic errors via
validate_workflow. - Finalize: Completes the process once validation passes.
Sources: packages/@n8n/ai-workflow-builder.ee/src/code-builder/prompts/index.ts:251-404
Workflow Technique Categories
The system classifies requests into specific techniques to ground node selection and design patterns.
| Technique | Description |
|---|---|
| Chatbot | Receiving chat messages and replying (built-in, Telegram, Slack). |
| Notification | Sending alerts via email, chat, or SMS when events occur. |
| Scheduling | Running actions at specific times or intervals. |
| Data Extraction | Pulling specific information from structured or unstructured inputs. |
| Document Processing | Taking action on content within files (PDFs, Word, Images). |
| Scraping & Research | Collecting live information from external sources. |
Sources: packages/@n8n/ai-workflow-builder.ee/src/code-builder/prompts/index.ts:260-271, packages/@n8n/ai-workflow-builder.ee/src/subgraphs/test/integration/techniques.json
Multi-Agent Systems
Enterprise extensions support complex AI architectures, specifically multi-agent systems where a "supervisor" agent invokes sub-agents to perform specialized tasks.
Agent-to-Agent Architecture
The architecture relies on the @n8n/n8n-nodes-langchain.agentTool, which functions as an embedded AI Agent that the main agent calls through an ai_tool connection.
The diagram illustrates the hierarchical relationship between a primary agent and its specialized sub-agents.
- Node Selection: A system requires 1 AI Agent + N AgentTools + (N+1) Chat Models.
- Vector Store Integration: Uses
retrieve-as-toolmode to allow the Agent to perform on-demand RAG (Retrieval-Augmented Generation). - Structured Output: Uses
Structured Output Parsernodes to ensure AI output feeds correctly into databases orSwitchrouting.
Sources: packages/@n8n/ai-workflow-builder.ee/src/prompts/agents/discovery.prompt.ts:60-75, packages/@n8n/ai-workflow-builder.ee/src/prompts/agents/discovery.prompt.ts:182-192
Authentication and Security (EE)
Enterprise editions extend the core authentication framework to support organizational identity providers and source control.
Single Sign-On (SSO)
The saml.service.ee.ts and oidc.service.ee.ts modules provide enterprise-grade authentication.
- SAML Service: Manages the exchange of XML-based identity data between the service provider and identity providers (IdP).
- OIDC Service: Handles OpenID Connect flows, managing token exchanges and user profile synchronization.
Source Control
The source-control.service.ee.ts module manages the synchronization of workflows and credentials with external Git repositories. It enables versioning, environment promotion, and collaborative development within the enterprise environment.
Sources: packages/cli/src/modules/sso-saml/saml.service.ee.ts, packages/cli/src/modules/sso-oidc/oidc.service.ee.ts, packages/cli/src/modules/source-control.ee/source-control.service.ee.ts
Discovery and Logic Resolution
The Enterprise Discovery Agent identifies nodes and connection-changing parameters (parameters that modify node inputs/outputs) to ensure the AI builder creates functional graphs.
Connection-Changing Parameters
Specific parameters are flagged as "connection-changing" because they alter the visual or logical wiring of a node:
- Vector Store: The
modeparameter (insert vs. retrieve vs. retrieve-as-tool) determines connection types. - AI Agent: The
hasOutputParsertoggle adds or removes an output connection. - Merge: The
numberInputsfield dynamically changes the number of incoming connection slots.
Deictic Resolution
The system resolves ambiguous references (e.g., "this node", "the broken one") using a 5-tier priority system:
- Conversation Context: Established history.
- Selected Nodes: Nodes currently highlighted in the UI.
- Positional References: "Previous", "Next", "Upstream", or "Downstream" based on graph connections.
- Explicit Name Mentions: Direct references to node labels (e.g., "the Webhook").
- Workflow Fallback: Defaulting to the entire workflow if no specific node is identified.
Sources: packages/@n8n/ai-workflow-builder.ee/src/prompts/agents/discovery.prompt.ts:161-172, packages/@n8n/ai-workflow-builder.ee/src/prompts/shared/deictic-resolution.ts:16-45
Conclusion
Enterprise Extensions move n8n from a standard automation tool into a platform capable of handling complex organizational requirements. By integrating advanced SSO, source control, and an AI-driven workflow building engine, these extensions allow teams to scale their automation efforts while maintaining technical accuracy and security standards.