Give your AI agent n8n superpowers with 537 node schemas, 7,700+ templates, and TypeScript workflow definitions. Works with Claude Code, Cursor, VS Code, and OpenClaw. MIT license.
TO
TokRepo精选 · Community
Quick Use
Use it first, then decide how deep to go
This block should tell both the user and the agent what to copy, install, and apply first.
**For Claude Code:**
```
/plugin marketplace add EtienneLescot/n8n-as-code
/plugin install n8n-as-code@n8nac-marketplace
```
**For VS Code / Cursor:**
Install "n8n-as-code" from the VS Code Marketplace, then open the n8n view and configure your instance connection.
**For Terminal / CI:**
```bash
npx --yes n8nac init
```
**For OpenClaw:**
```
openclaw plugins install @n8n-as-code/n8nac
openclaw n8nac:setup
```
---
Intro
n8n-as-code transforms AI coding agents into n8n workflow automation experts by embedding a complete knowledge base — 537 official node schemas, 10,209 properties, 7,702 community templates, and 1,243 documentation pages — directly into your development tools. With 630+ GitHub stars and MIT license, it enables AI agents to create, validate, and deploy n8n workflows without external API calls or hallucination. Your AI agent doesn't just read about n8n — it knows n8n with zero latency.
Best for: developers using AI agents to build and manage n8n workflow automations. Works with: Claude Code, Cursor, VS Code, OpenClaw, CLI/CI pipelines. Setup time: under 2 minutes.
---
## n8n-as-code — Complete Feature Guide
### Knowledge Base Stats
| Metric | Count |
|--------|-------|
| Official n8n nodes | 537 |
| Node properties | 10,209 (100% coverage) |
| Community templates | 7,702 |
| Documentation pages | 1,243 (93% coverage) |
| AI/LangChain nodes | 104 |
### Core Capabilities
#### Schema-Aware Workflow Creation
AI agents can create valid n8n workflows because they have access to complete node schemas. The agent knows every node, every property, every valid option — no guessing, no hallucination.
#### TypeScript Workflow Definitions
Write n8n workflows in TypeScript instead of JSON. Bidirectional conversion between JSON and TypeScript keeps workflows version-control friendly.
```typescript
// Example: TypeScript workflow definition
import { Workflow } from 'n8nac';
export default new Workflow({
name: 'Email Classification',
nodes: [
Gmail.trigger({ pollTimes: '*/5 * * * *' }),
OpenAI.classify({ model: 'gpt-4o', categories: ['urgent', 'info', 'spam'] }),
Switch.route({ field: 'category' }),
Slack.send({ channel: '#urgent', message: '{{ $json.subject }}' }),
],
});
```
#### GitOps Sync Engine
3-way merge conflict detection between local TypeScript, remote n8n JSON, and version history. Push and pull workflows like code.
#### Template Discovery
Search 7,700+ community templates with ~5ms FlexSearch lookup:
```
n8nac search "slack notification when github issue created"
```
#### Full Development Loop
Agents can:
1. Search templates for inspiration
2. Create workflows in TypeScript
3. Validate against node schemas
4. Detect missing credentials
5. Provision credentials (asking users only for secrets)
6. Deploy to n8n instance
7. Activate and monitor execution
### Supported Platforms
| Platform | Install Method |
|----------|---------------|
| Claude Code | Plugin marketplace |
| VS Code / Cursor | VS Code Marketplace extension |
| OpenClaw | openclaw plugins install |
| Terminal / CI | npx n8nac init |
### FAQ
**Q: What is n8n-as-code?**
A: A toolkit that gives AI coding agents complete knowledge of n8n's 537 nodes and 7,700+ templates, enabling them to create, validate, and deploy n8n workflows without hallucination or external API calls.
**Q: Is n8n-as-code free?**
A: Yes, MIT license. You need a running n8n instance (self-hosted free, or n8n Cloud) for deployment.
**Q: Does it work with Claude Code?**
A: Yes. Install via `/plugin marketplace add EtienneLescot/n8n-as-code` and the agent gains full n8n knowledge.
---
🙏
Source & Thanks
> Created by [Etienne Lescot](https://github.com/EtienneLescot). Licensed under MIT.
>
> [n8n-as-code](https://github.com/EtienneLescot/n8n-as-code) — ⭐ 630+
Thank you to Etienne Lescot for building the definitive bridge between AI agents and n8n automation.
Discussion
Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.