Skip to main content
The n8n Visual Workflow Editor converts PraisonAI YAML workflows to n8n format, enabling visual editing and execution through n8n’s drag-and-drop interface.

Quick Start

1

Export to n8n

# Export PraisonAI workflow to n8n format
praisonai agents.yaml --n8n

# This creates agents_n8n.json and opens n8n in browser
2

Visual Editing

# Open n8n workflow directly in browser for editing
praisonai n8n preview agents.yaml

# With custom n8n URL
praisonai n8n preview agents.yaml --n8n-url https://n8n.yourcompany.com
3

Import Back

# Import modified n8n workflow back to YAML
praisonai n8n import workflow.json --output updated_agents.yaml

# Or sync changes from n8n
praisonai n8n pull workflow-id agents.yaml

How It Works

The converter transforms PraisonAI concepts into n8n components:
PraisonAI Elementn8n ComponentPurpose
WorkflowWorkflow ContainerOverall workflow structure
AgentsHTTP Request NodesIndividual agent execution
Sequential StepsNode ConnectionsFlow between agents
Parallel TasksFan-out ConnectionsConcurrent agent execution
Conditional LogicSwitch NodesDecision-based routing

CLI Commands

Export Commands

# Export to JSON file
praisonai n8n export agents.yaml

# Custom output file
praisonai n8n export agents.yaml --output my-workflow.json

# Include API server configuration
praisonai n8n export agents.yaml --api-url https://api.mycompany.com

Import Commands

# Convert n8n JSON back to YAML
praisonai n8n import workflow.json

# Custom output location
praisonai n8n import workflow.json --output converted_agents.yaml

# Preserve original structure
praisonai n8n import workflow.json --preserve-structure

Workflow Mapping Patterns

Agent to Node Conversion

PraisonAI YAML:
name: Research Pipeline
agents:
  researcher:
    name: Researcher
    instructions: Research the given topic
    tools: [tavily_search]
  writer:
    name: Writer
    instructions: Write content based on research
steps:
  - agent: researcher
  - agent: writer
Generated n8n Workflow:
  • Webhook Trigger → HTTP Request (Researcher) → HTTP Request (Writer)
  • Each HTTP node calls /agents/{agent_id}/invoke
  • Output of one agent becomes input to the next
PraisonAI YAML:
name: Multi-Source Analysis
agents:
  web_researcher: {name: Web Researcher}
  academic_researcher: {name: Academic Researcher}
  market_researcher: {name: Market Researcher}
parallel:
  - agent: web_researcher
  - agent: academic_researcher
  - agent: market_researcher
Generated n8n Workflow:
  • Webhook Trigger → Fan-out to 3 parallel HTTP Request nodes
  • All agents execute simultaneously
  • Results can be merged with a Set node
PraisonAI YAML:
name: Smart Content Pipeline
agents:
  classifier: {name: Content Classifier}
  blog_writer: {name: Blog Writer}
  social_writer: {name: Social Media Writer}
route:
  - condition: "content_type == 'blog'"
    agent: blog_writer
  - condition: "content_type == 'social'"
    agent: social_writer
Generated n8n Workflow:
  • Webhook → Classifier → Switch Node → Appropriate Writer
  • Switch node routes based on classifier output

Advanced Pattern Mappings

PraisonAI:
name: Iterative Improvement
agents:
  reviewer: {name: Content Reviewer}
  improver: {name: Content Improver}
loop:
  - agent: reviewer
  - agent: improver
  condition: "quality_score < 8"
  max_iterations: 5
n8n Mapping:
  • Uses SplitInBatches node for iteration
  • IF node checks quality score condition
  • Loop back connection for iterations

Visual Editor Features

Drag & Drop Interface

Visually connect and arrange agent nodes using n8n’s intuitive interface

Real-time Testing

Execute individual nodes or entire workflows to test functionality

Data Inspection

View input/output data at each step for debugging and optimization

Version Control

Track changes and maintain different versions of your workflows

Visual Editing Benefits

  • Visual Flow: See workflow logic as connected boxes
  • Easy Modifications: Change connections without editing YAML
  • Immediate Feedback: Test changes instantly in the editor
  • Documentation: Visual diagrams serve as living documentation
  • Step-by-Step Execution: Run workflows node by node
  • Data Inspection: See exact data passed between agents
  • Error Visualization: Identify failure points visually
  • Performance Monitoring: View execution times for optimization
  • Conditional Branches: Add complex IF/ELSE logic visually
  • Data Transformation: Use Set nodes to modify data between agents
  • Error Handling: Create error paths and retry logic
  • External Integrations: Connect to 400+ n8n integrations

Configuration Options

Environment Variables

VariableDescriptionExample
N8N_URLn8n instance URLhttps://n8n.yourcompany.com
N8N_API_KEYAPI key for auto-importn8n_api_1234567890
PRAISONAI_API_URLPraisonAI API endpointhttps://api.yourcompany.com

Command-Line Options

# Export options
praisonai n8n export agents.yaml \
  --output custom_name.json \
  --api-url https://api.example.com \
  --include-metadata \
  --format pretty

# Import options
praisonai n8n import workflow.json \
  --output agents.yaml \
  --preserve-structure \
  --include-comments \
  --validate-agents

# Preview options
praisonai n8n preview agents.yaml \
  --n8n-url https://n8n.example.com \
  --auto-import \
  --activate-workflow \
  --open-browser

Best Practices

Design workflows for visual editing:
  • Clear Naming: Use descriptive names for agents and workflows
  • Logical Flow: Organize agents in left-to-right execution order
  • Error Paths: Plan error handling routes in advance
  • Documentation: Include descriptions for complex logic
Manage workflow versions effectively:
# Export before major changes
praisonai n8n export agents.yaml --output backup_v1.json

# Track changes with git
git add agents.yaml agents_n8n.json
git commit -m "feat: add error handling to research pipeline"

# Sync with n8n regularly
praisonai n8n sync agents.yaml workflow-id-123
Enable team collaboration:
  • Shared n8n Instance: Use centralized n8n server for team access
  • API Key Management: Use service accounts for automation
  • Change Documentation: Document modifications in n8n workflow descriptions
  • Regular Syncing: Sync changes back to YAML for version control
Optimize visual workflows:
  • Parallel Execution: Use fan-out patterns for independent agents
  • Caching: Add Set nodes to cache intermediate results
  • Timeouts: Configure appropriate timeouts for long-running agents
  • Error Recovery: Implement retry logic for unreliable operations

n8n Integration Overview

Complete guide to n8n integration architecture and setup

n8n Tools Reference

API reference for n8n workflow tools and functions

CLI n8n Commands

Complete CLI reference for n8n workflow management

n8n API Integration

HTTP endpoints for n8n to invoke PraisonAI agents