Skip to content

AdamBear/n8n-workflow-builder-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

n8n Workflow Builder Skill for OpenClaw

A powerful OpenClaw skill for programmatically building and managing n8n workflows.

🚀 Quick Install

Ask any OpenClaw agent:

"Install n8n-workflow-builder-skill following the guide at: https://github.com/AdamBear/n8n-workflow-builder-skill"

The agent will handle the complete installation automatically.

📋 What It Does

  • 🔍 Search Nodes - Find available n8n nodes by keyword
  • 🔧 Manage Workflows - Create, update, list, delete, execute workflows
  • Validate Configs - Test node configurations before deployment
  • 📦 Deploy Templates - Search and deploy n8n community templates
  • 🎯 Full CLI - Command-line access for all n8n operations

🔑 Requirements

  • n8n instance running (local or remote)
  • n8n API key
  • Node.js 18+
  • OpenClaw with skill support

📖 Quick Start

1. Get n8n API Key

  1. Open n8n UI → http://localhost:5678
  2. Go to Settings → API
  3. Click Create API Key
  4. Copy the key

2. Use via OpenClaw Agent

User: Search for webhook nodes
Agent: [Searches and finds n8n-nodes-base.webhook]

User: Create a workflow that receives a webhook and sends to Slack
Agent: [Builds and deploys the complete workflow]

3. Direct CLI Usage

cd /root/.openclaw/skills/n8n-workflow-builder/scripts

# Set environment
export N8N_API_URL=http://localhost:5678
export N8N_API_KEY=your-api-key

# List workflows
npx tsx main.ts --action list

# Search nodes
npx tsx main.ts --action search --query "slack"

# Get node details
npx tsx main.ts --action get-node --node-type "n8n-nodes-base.slack"

# Create workflow
npx tsx main.ts --action create --file workflow.json

📚 Documentation

🔧 Manual Installation

If automatic installation fails, follow these steps:

# 1. Clone this repository
git clone https://github.com/AdamBear/n8n-workflow-builder-skill.git \
  /root/.openclaw/skills/n8n-workflow-builder

# 2. Install dependencies
cd /root/.openclaw/skills/n8n-workflow-builder/scripts
npm install

# 3. Configure n8n API
cat > .env.n8n << 'EOF'
N8N_API_URL=http://localhost:5678
N8N_API_KEY=your-api-key-here
EOF

# 4. Verify installation
./verify-install.sh

📁 Directory Structure

n8n-workflow-builder-skill/
├── README.md                      # This file
├── SKILL.md                       # OpenClaw skill definition
├── QUICK_REF.md                   # Quick reference card
├── INSTALLATION_LOG.md            # Installation record
├── scripts/
│   ├── main.ts                    # CLI entry point
│   ├── n8n-client.ts              # n8n API client
│   ├── node-search.ts             # Node search functionality
│   ├── workflow-manager.ts        # Workflow CRUD operations
│   ├── workflow-validator.ts      # Config validation
│   ├── package.json               # Dependencies
│   ├── .env.n8n                   # n8n API config (create this)
│   ├── verify-install.sh          # Installation verification
│   └── node_modules/              # npm dependencies (installed)
└── references/
    ├── installation-guide.md      # Detailed installation steps
    ├── node-config.md             # Node configuration examples
    ├── workflow-patterns.md       # Common workflow patterns
    └── expression-syntax.md       # n8n expression reference

🎯 Use Cases

Example 1: Webhook → Slack Notification

# Search for nodes
npx tsx main.ts --action search --query "webhook"
npx tsx main.ts --action search --query "slack"

# Validate configurations
npx tsx main.ts --action get-node --node-type "n8n-nodes-base.webhook"
npx tsx main.ts --action get-node --node-type "n8n-nodes-base.slack"

# Create workflow definition
cat > workflow.json << 'EOF'
{
  "name": "Webhook to Slack",
  "nodes": [
   ...
  ]
}
EOF

# Deploy workflow
npx tsx main.ts --action create --file workflow.json

Example 2: Scheduled Email Reports

# Search for schedule and email nodes
npx tsx main.ts --action search --query "schedule"
npx tsx main.ts --action search --query "email"

# Get details and validate
npx tsx main.ts --action get-node --node-type "n8n-nodes-base.schedule"
npx tsx main.ts --action get-node --node-type "n8n-nodes-base.emailSend"

🔐 Security Notes

  • .env.n8n contains sensitive API key - never commit to Git
  • Add .env.n8n to .gitignore
  • Use read-only API keys when possible
  • Rotate API keys regularly

🐛 Troubleshooting

"Cannot find module 'tsx'"

cd /root/.openclaw/skills/n8n-workflow-builder/scripts
npm install

"Cannot connect to n8n"

  • Check n8n is running: curl http://localhost:5678/healthz
  • Verify N8N_API_URL in .env.n8n
  • Confirm API key is valid (regenerate if needed)
  • Check firewall rules between OpenClaw and n8n

"npm install fails"

  • Ensure Node.js 18+ is installed
  • Try with --force: npm install --force
  • Clear cache: npm cache clean --force

🤝 Contributing

Contributions welcome! Please:

  1. Fork this repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

📄 License

MIT License - feel free to use in your projects.

🔗 Links

💬 Support

  • Open an issue on GitHub
  • Check the documentation files
  • Visit n8n community forums

Made with ❤️ for OpenClaw users

Install this skill and start automating n8n workflows like a pro!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors