n8n
AI Architecture
Sign in to run a focused analysis on specific parts of this codebase.
Sign inTrigger
External service sends HTTP request to n8n webhook URL
Webhook Reception
Receive webhook request
Express middleware receives incoming HTTP request to webhook endpoint and extracts path, method, headers, and body.
Webhook Validation
Lookup webhook registration
Query database to find workflow associated with webhook path and validate it exists and is active.
Workflow Loading
Load workflow definition
Retrieve complete workflow definition including all nodes, connections, credentials, and settings from database.
Execution Creation
Create execution record
Insert new execution entry in database with pending status, workflow ID, trigger data, and timestamp.
Workflow Execution Initialization
Initialize WorkflowExecute
Create WorkflowExecute instance with workflow definition, execution mode, and initial trigger data.
Node Execution Loop
Execute workflow nodes
Traverse workflow graph executing nodes in order, passing data between nodes, handling branching, and managing node credentials.
Code Node Execution (if present)
Send code to task runner
Send JavaScript or Python code to isolated task runner container via HTTP for sandboxed execution.
Execute code in sandbox
Task runner executes code in isolated environment with timeout and resource limits, returns results.
Binary Data Handling (if present)
Store binary data
Save binary files to filesystem or S3 bucket and store reference in execution data.
Execution Completion
Update execution status
Update execution record in database with success/error status, output data, duration, and error details if failed.
Event Publishing
Publish execution events
Emit execution completion events to event bus for audit logging, webhooks, and UI updates.
Response
Send webhook response
Return HTTP response to original webhook caller with execution results or acknowledgment.
Analyzed 2/17/2026, 3:12:32 PM
- D
feat(core): Add ESLint rule to validate AI node SDK fields in package.json (#25759)
Dawid Myslak · 1mo ago
- S
fix: Increase character limit for providerId (#25748)
Stephen Wright · 1mo ago
- I
feat: Add connection state to secret stores response (no-changelog) (#25884)
Irénée · 1mo ago
- A
fix(editor): Update secrets provider connection name validation (#25868)
Ali Elkhateeb · 1mo ago
- T
fix(core): Forward activationMode in multi-main webhook/trigger setup (#25855)
Tomi Turtiainen · 1mo ago
Sign in to analyze your own repositories.
Sign in