AI-powered workflow builder node for n8n using Claude API
npm install n8n-nodes-ai-workflow-buildern8n-nodes-ai-workflow-builder
bash
npm install n8n-nodes-ai-workflow-builder
`
Prerequisites
- n8n version 0.187.0 or higher
- Claude API key from Anthropic
Quick Start
$3
1. Get your API key from Anthropic Console
2. In n8n: Credentials > New > Claude API
3. Enter your API key
4. Choose model: Claude Sonnet 4.5 (recommended)
$3
1. Create a new workflow
2. Add Manual Trigger node
3. Add AI Workflow Builder node
4. Configure and execute!
Operations
$3
Create a brand new workflow from a natural language description.
Example:
`
Create a workflow that sends me a Slack message every morning at 9 AM
with the weather forecast for London
`
Output:
- Complete n8n workflow JSON
- Step-by-step import instructions
- Validation results (auto-fixed if needed)
- Token usage and cost breakdown
$3
Native-like iterative refinement - The closest experience to n8n's built-in AI builder!
How it works:
1. Generate initial workflow (or start with existing one)
2. Switch to "Chat Refinement" mode
3. Paste previous workflow JSON
4. Send refinement message: "Add error handling"
5. Get updated workflow
6. Continue refining iteratively!
Example flow:
`
1st message: "Create a Slack notification workflow"
2nd message: "Add error retry logic"
3rd message: "Make it run every hour"
4th message: "Add logging to a database"
`
Each iteration remembers context and builds on previous changes!
$3
One-time modification of an existing workflow.
Example:
`
Add error handling to all HTTP Request nodes and send
notifications to Slack on failure
`
$3
Get a detailed explanation of what a workflow does.
Great for:
- Understanding complex workflows
- Documentation
- Onboarding team members
- Identifying issues or improvements
Comparison to Native n8n AI Builder
| Feature | Native Builder | This Community Node |
|---------|---------------|---------------------|
| Chat Interface | Built-in modal | ✅ Chat Refinement mode |
| Iterative Refinement | Real-time canvas | ✅ Via conversation history |
| Workflow Validation | Automatic | ✅ With auto-fix |
| Context Awareness | Full n8n knowledge | ✅ Intelligent context (relevant nodes only) |
| Direct Canvas Creation | Yes | ❌ Manual import (community node limitation) |
| Cost Optimization | N/A | ✅ 85% savings with prompt caching |
| Export Options | Automatic | ✅ JSON + downloadable file |
| Conversation History | Built-in | ✅ Manual copy/paste |
Advanced Features
$3
Automatically checks for:
- Missing trigger nodes
- Invalid node positions
- Missing connections
- Required workflow fields
- Proper node structure
Auto-fix mode (enabled by default):
- Adds missing workflow name
- Fixes invalid positions
- Creates connections object
- Ensures all required fields
$3
Choose how to receive your workflow:
1. Workflow JSON: Copy and import manually
2. Export File: Base64 downloadable file
3. Both: Get both formats
$3
Instead of sending all 400+ n8n nodes to Claude:
1. Extracts keywords from your description
2. Finds 3-10 most relevant keywords
3. Retrieves only relevant nodes (10-15 max)
4. Includes similar workflow examples
5. Result: Better quality, lower cost!
Example:
- Your request: "Create a Slack notification workflow"
- Keywords extracted: ["slack", "notification", "trigger", "message"]
- Nodes included: Slack, Webhook, Schedule Trigger, Manual Trigger, Code
- Example shown: "Webhook to Slack" pattern
$3
Massive cost savings through Anthropic's prompt caching:
| Request | Input Tokens | Cached | Cost |
|---------|--------------|--------|------|
| First | ~3,300 | 0 | $0.012-$0.015 |
| Second | ~100-200 | ~3,200 | $0.002-$0.003 |
| Third+ | ~100-200 | ~3,200 | $0.002-$0.003 |
| Savings | | | ~85% |
Cache duration: 5 minutes
Usage Examples
$3
`
Step 1 - Generate:
"Create a workflow that sends Slack notifications"
Step 2 - Refine (Chat mode):
Previous Workflow: [paste from step 1]
Message: "Add error handling with retries"
Step 3 - Refine again:
Previous Workflow: [paste from step 2]
Conversation History: [paste from step 2]
Message: "Make it run every hour"
Step 4 - Final refinement:
Previous Workflow: [paste from step 3]
Conversation History: [paste from step 3]
Message: "Add logging to PostgreSQL"
Result: Fully refined workflow with all features!
`
$3
Description:
`
Create a workflow that runs daily at 8 AM, fetches data from
our PostgreSQL database, generates a summary report, and emails
it to the team at team@company.com
`
Generated:
- Schedule Trigger (8 AM daily)
- PostgreSQL query node
- Code node (data formatting)
- Gmail send node
Validation: ✅ All checks passed
Cost: $0.0128 (first request)
Time: ~5 seconds
$3
Description:
`
Build a workflow that listens for new Intercom messages,
uses AI to categorize them, and routes urgent issues to
PagerDuty while others go to a Slack channel
`
Generated:
- Webhook trigger
- AI Agent (LangChain) for classification
- IF node for routing
- PagerDuty + Slack nodes
Refinement via Chat:
`
"Add a cooldown to prevent spam triggering PagerDuty"
`
Cost: $0.0024 (cached)
$3
Description:
`
Monitor Twitter for mentions of @ourcompany, analyze sentiment
with AI, and post positive ones to our #social-media Slack channel
``