Docs
n8n Migration

n8n to Lamatic Migration Tool

A production-ready Next.js application that converts n8n workflows to Lamatic format with intelligent node mapping, dependency analysis, and automated conversion.

πŸ’‘ Try it now: Visit migrate.lamatic.ai (opens in a new tab) to start migrating your n8n workflows

πŸ“¦ Open Source: Check out the GitHub repository (opens in a new tab) for source code and contributions

Overview

The n8n to Lamatic Migration Tool is a comprehensive solution for migrating your existing n8n automation workflows to the Lamatic platform. It provides intelligent node mapping, automatic dependency resolution, and real-time conversion progress tracking to make your migration seamless and efficient.

Key Benefits

  • Time Savings: Convert complex workflows in minutes instead of hours or days
  • Intelligent Mapping: Automatic conversion of 40+ n8n node types to Lamatic equivalents
  • Dependency Preservation: Maintains workflow connections and execution order
  • Production Ready: Generates fully functional Lamatic workflows ready for deployment
  • Comprehensive Reports: Detailed migration analytics and conversion statistics

Features

File Upload

  • Drag & Drop Interface: Simply drag your n8n JSON file onto the upload area
  • File Validation: Automatic validation of n8n workflow structure
  • Size Limits: Supports workflows up to 10MB

Intelligent Node Mapping

  • Deterministic Conversion: 40+ n8n node types automatically mapped to Lamatic equivalents
  • Parameter Transformation: Intelligent parameter and credential mapping
  • Type Preservation: Maintains node functionality and behavior

Dependency Analysis

  • Connection Mapping: Converts n8n connections to Lamatic dependency structure
  • Execution Order: Calculates proper node execution sequence
  • AI Connections: Handles special AI connection types (ai_tool, ai_memory, ai_languageModel)

Real-time Progress

  • Live Updates: Watch migration progress in real-time
  • Step Tracking: Detailed progress for each migration phase
  • Status Indicators: Clear visual feedback on conversion status

Migration Reports

  • Comprehensive Analytics: Node-by-node conversion details
  • Warnings & Errors: Detailed information about any issues encountered
  • Statistics: Conversion success rates and node mapping statistics

Error Handling

  • Graceful Failures: Detailed error messages with actionable guidance
  • Warning System: Non-blocking warnings for potential issues
  • Recovery Suggestions: Helpful tips for resolving migration issues

Supported n8n Nodes

The migration tool supports 40+ n8n node types across multiple categories:

Triggers (4)

  • βœ… Webhook Trigger (n8n-nodes-base.webhook)
  • βœ… Manual Trigger (n8n-nodes-base.manualTrigger)
  • βœ… Schedule Trigger (n8n-nodes-base.scheduleTrigger)
  • βœ… Chat Trigger (@n8n/n8n-nodes-langchain.chatTrigger)

AI & LangChain (6)

  • βœ… Google Gemini Chat Model (@n8n/n8n-nodes-langchain.lmChatGoogleGemini)
  • βœ… OpenAI Chat Model (@n8n/n8n-nodes-langchain.lmChatOpenAi)
  • βœ… Groq Chat Model (@n8n/n8n-nodes-langchain.lmChatGroq)
  • βœ… Window Buffer Memory (@n8n/n8n-nodes-langchain.memoryBufferWindow)
  • βœ… Memory Manager (@n8n/n8n-nodes-langchain.memoryManager)
  • βœ… LangChain Agent (@n8n/n8n-nodes-langchain.agent)

Database & Tools (3)

  • βœ… PostgreSQL Tool (n8n-nodes-base.postgresTool)
  • βœ… Supabase (n8n-nodes-base.supabase)
  • βœ… Airtable (n8n-nodes-base.airtable)

Integrations (9)

  • βœ… Slack (n8n-nodes-base.slack)
  • βœ… Gmail (n8n-nodes-base.gmail)
  • βœ… Google Sheets (n8n-nodes-base.googleSheets)
  • βœ… Google Drive (n8n-nodes-base.googleDrive)
  • βœ… Microsoft Teams (n8n-nodes-base.microsoftTeams)
  • βœ… Notion (n8n-nodes-base.notion)
  • βœ… HTTP Request (n8n-nodes-base.httpRequest)
  • βœ… Code Node (n8n-nodes-base.code)
  • βœ… Wikipedia Tool (@n8n/n8n-nodes-langchain.toolWikipedia)

Control Flow (3)

  • βœ… If Node (n8n-nodes-base.if)
  • βœ… Switch Node (n8n-nodes-base.switch)
  • βœ… Filter Node (n8n-nodes-base.filter)

Data Processing (5)

  • βœ… Set Data (n8n-nodes-base.set)
  • βœ… Merge (n8n-nodes-base.merge)
  • βœ… Aggregate (n8n-nodes-base.aggregate)
  • βœ… Limit (n8n-nodes-base.limit)
  • βœ… Execution Data (n8n-nodes-base.executionData)

Workflow Management (3)

  • βœ… Execute Workflow (n8n-nodes-base.executeWorkflow)
  • βœ… Execute Workflow Trigger (n8n-nodes-base.executeWorkflowTrigger)
  • βœ… Form Trigger (n8n-nodes-base.formTrigger)

File Operations (3)

  • βœ… Read/Write File (n8n-nodes-base.readWriteFile)
  • βœ… Compression (n8n-nodes-base.compression)
  • βœ… Edit Image (n8n-nodes-base.editImage)

Quick Start

Prerequisites

Using the Web Interface

  1. Upload n8n Workflow

  2. Processing

    • Watch real-time progress as the file is processed
    • See detailed migration steps and status
    • Review any warnings or errors
  3. Results

    • Review the migration report with node-by-node details
    • Check for any warnings or errors
    • Download the converted Lamatic workflow JSON
  4. Import to Lamatic

    • Open your Lamatic Studio project
    • Import the downloaded workflow JSON
    • Review and test the converted workflow

Local Installation

If you prefer to run the migration tool locally:

# Clone the repository
git clone https://github.com/Lamatic/migration-tools.git
cd migration-tools
 
# Install dependencies
npm install
 
# Start development server
npm run dev
 
# Open in browser
# http://localhost:3000

How It Works

The migration system follows a modular pipeline architecture:

File Upload β†’ Parser β†’ Mapper β†’ Dependency Builder β†’ Generator β†’ Output

Migration Pipeline

  1. Parser (lib/migration/parser.ts)

    • Extracts and validates n8n workflow structure from JSON
    • Handles node normalization and connection parsing
    • Validates workflow integrity
  2. Mapper (lib/migration/mapper.ts)

    • Converts n8n node types to Lamatic equivalents
    • Maps parameters and credentials intelligently
    • Supports 40+ node types with parameter transformation
  3. Dependency Builder (lib/migration/dependencies.ts)

    • Builds workflow dependency structure from n8n connections
    • Handles special AI connection types
    • Calculates proper execution order
  4. Generator (lib/migration/generator.ts)

    • Creates final Lamatic workflow JSON
    • Validates node references
    • Formats output with proper structure
  5. Orchestrator (actions/orchestrate.ts)

    • Coordinates the entire migration pipeline
    • Handles error recovery and progress tracking
    • Generates comprehensive migration reports

Configuration

Environment Variables

For local installations, create a .env.local file:

# Lamatic API Configuration (optional)
LAMATIC_API_KEY=your_lamatic_api_key
LAMATIC_ENDPOINT=https://api.lamatic.ai
LAMATIC_PROJECT_ID=migration-tool
 
# Migration Settings
MAX_FILE_SIZE=10485760  # 10MB in bytes
NODE_ENV=development

API Configuration (Optional)

If you want to automatically push migrated workflows to Lamatic:

  1. Get Lamatic Credentials

  2. Configure Settings

    • Add your API key to .env.local
    • Test the connection using the migration tool

Deployment

The migration tool is deployed at migrate.lamatic.ai (opens in a new tab) and is ready to use. If you want to deploy your own instance:

Deploy to Vercel

  1. Push to GitHub

    git add .
    git commit -m "Ready for deployment"
    git push origin main
  2. Import to Vercel

  3. Configure Environment Variables

    • Add all variables from env.example
    • Set NODE_ENV=production
    • Add your LAMATIC_API_KEY (if using)
  4. Deploy

    • Click "Deploy"
    • Your app will be live in minutes

Using Vercel CLI

# Install Vercel CLI
npm i -g vercel
 
# Deploy
vercel
 
# Set environment variables
vercel env add LAMATIC_API_KEY
vercel env add LAMATIC_ENDPOINT
 
# Deploy to production
vercel --prod

Other Platforms

This is a standard Next.js application and can be deployed to:

  • Vercel (Recommended) - Zero-config deployment
  • Netlify - Similar to Vercel
  • AWS Amplify - AWS hosting
  • Railway - Simple container deployment
  • Docker - Container-based deployment

Development

Project Structure

n8n-migration/
β”œβ”€β”€ app/                    # Next.js application routes
β”‚   β”œβ”€β”€ api/               # API endpoints
β”‚   β”‚   └── migrate/       # Migration API endpoint
β”‚   β”œβ”€β”€ layout.tsx         # Root layout
β”‚   └── page.tsx           # Main application page
β”œβ”€β”€ components/            # React components
β”‚   β”œβ”€β”€ theme-provider.tsx # Theme context provider
β”‚   └── theme-toggle.tsx   # Theme toggle component
β”œβ”€β”€ lib/                   # Core library code
β”‚   β”œβ”€β”€ migration/         # Migration engine
β”‚   β”‚   β”œβ”€β”€ parser.ts      # n8n workflow parser
β”‚   β”‚   β”œβ”€β”€ mapper.ts      # Node type mapper
β”‚   β”‚   β”œβ”€β”€ dependencies.ts # Dependency builder
β”‚   β”‚   β”œβ”€β”€ generator.ts   # Lamatic workflow generator
β”‚   β”‚   β”œβ”€β”€ types.ts       # TypeScript type definitions
β”‚   β”‚   β”œβ”€β”€ schemas.ts     # Lamatic node schemas
β”‚   β”‚   └── schemaValidator.ts # Schema validation
β”‚   └── lamatic-client.ts  # Lamatic API client
β”œβ”€β”€ actions/               # Server actions
β”‚   └── orchestrate.ts    # Main migration orchestration
β”œβ”€β”€ package.json          # Dependencies and scripts
β”œβ”€β”€ next.config.mjs        # Next.js configuration
β”œβ”€β”€ tsconfig.json          # TypeScript configuration
└── tailwind.config.js    # Tailwind CSS configuration

Adding New Node Mappings

To add support for additional n8n node types:

  1. Update mapping engine (lib/migration/mapper.ts)

    this.addMapping({
      n8nType: 'n8n-nodes-base.newNode',
      lamaticType: 'lamatic_equivalent',
      isSupported: true,
      parameterMappings: [
        { n8nParameter: 'param1', lamaticParameter: 'param1', required: true }
      ],
      credentialMappings: [
        { n8nCredential: 'cred1', lamaticCredential: 'cred1', requiresReauth: true }
      ],
      notes: 'Description of the mapping'
    });
  2. Add node creation logic in createLamaticNode() method

  3. Update schemas (lib/migration/schemas.ts) if needed

  4. Test with your own n8n workflow

Architecture

Each component is independently testable and handles specific responsibilities:

  • Parser: Validates and normalizes n8n structure
  • Mapper: Converts node types and parameters
  • Dependency Builder: Resolves connections and execution order
  • Generator: Creates final Lamatic JSON structure

Troubleshooting

Common Issues

"Invalid n8n workflow"

Solutions:

  • Ensure file is valid JSON
  • Check n8n workflow structure
  • Verify file isn't corrupted
  • Try exporting the workflow again from n8n

"File size exceeds limit"

Solutions:

  • Reduce file size (max 10MB)
  • Remove unnecessary nodes
  • Compress the JSON file
  • Split large workflows into smaller ones

"Migration failed"

Solutions:

  • Check migration report for details
  • Verify n8n workflow is valid
  • Try with simpler workflow first
  • Check browser console for detailed errors

"No trigger node found"

Solutions:

  • Ensure workflow contains a valid trigger node
  • Supported triggers: webhook, manual, schedule, chatTrigger
  • Verify trigger node is properly configured in n8n

Debug Mode

Enable debug logging for local development:

NODE_ENV=development npm run dev

Check browser console for detailed error messages and migration progress.

API Reference

Migration Pipeline

import { processMigration } from '@/actions/orchestrate';
 
const result = await processMigration(file);
// Returns: MigrationResult with success status, nodes, and workflow

Individual Components

// Parse n8n workflow
import { N8nParser } from '@/lib/migration/parser';
const parser = new N8nParser();
const workflow = parser.parseWorkflow(jsonContent);
 
// Map nodes to Lamatic
import { NodeMapper } from '@/lib/migration/mapper';
const mapper = new NodeMapper();
const result = mapper.mapNode(n8nNode, nodeId);
 
// Build dependencies
import { DependencyBuilder } from '@/lib/migration/dependencies';
const builder = new DependencyBuilder();
const deps = builder.buildDependencies(workflow, nodes);
 
// Generate Lamatic workflow
import { LamaticOutputGenerator } from '@/lib/migration/generator';
const generator = new LamaticOutputGenerator();
const lamaticWorkflow = generator.generateWorkflow(
  nodes, 
  workflow, 
  metadata, 
  connections
);

Best Practices

Before Migration

  1. Backup Your Workflows: Always keep a backup of your original n8n workflows
  2. Test with Simple Workflows: Start with simple workflows to understand the process
  3. Review Node Support: Check if all your nodes are supported before migrating
  4. Document Dependencies: Note any external dependencies or credentials needed

During Migration

  1. Review Warnings: Pay attention to migration warnings and address them
  2. Check Node Mappings: Verify that nodes are mapped correctly
  3. Validate Connections: Ensure workflow connections are preserved
  4. Test Incrementally: Migrate and test workflows one at a time

After Migration

  1. Test Thoroughly: Test all migrated workflows in Lamatic
  2. Verify Credentials: Re-authenticate any required credentials
  3. Check Data Flow: Verify data flows correctly through the workflow
  4. Update Documentation: Update any workflow documentation

Support

Getting Help

  1. Check Documentation

    • Code comments and type definitions
    • Component documentation in the repository
  2. Test Your Workflow

    • Upload your own n8n workflow JSON file
    • Verify the migration works correctly
  3. Report Issues

    • Open an issue on GitHub (opens in a new tab)
    • Include your workflow JSON (sanitized if needed)
    • Describe the issue and expected behavior

Resources


Happy Migrating! πŸš€

Was this page useful?

Questions? We're here to help

Subscribe to updates