generating-n8n-workflows
Generates n8n workflow JSON files from user prompts for download and import. Use when user wants to create n8n automation, mentions workflow generation, or needs a .json file for n8n import.
Best use case
generating-n8n-workflows is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Generates n8n workflow JSON files from user prompts for download and import. Use when user wants to create n8n automation, mentions workflow generation, or needs a .json file for n8n import.
Teams using generating-n8n-workflows should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/generating-n8n-workflows/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How generating-n8n-workflows Compares
| Feature / Agent | generating-n8n-workflows | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Generates n8n workflow JSON files from user prompts for download and import. Use when user wants to create n8n automation, mentions workflow generation, or needs a .json file for n8n import.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# n8n Workflow Generator
Generates clean, minimal n8n workflow JSON files based on user requirements.
## When to use this skill
- User wants to create an n8n workflow
- User provides a prompt describing automation needs
- User needs a downloadable .json file for n8n import
- User mentions specific integrations (Slack, Email, HTTP, etc.)
## Workflow
- [ ] Parse user prompt for workflow requirements
- [ ] Identify trigger type and action nodes needed
- [ ] Generate minimal workflow JSON (no extra nodes)
- [ ] Validate JSON structure against n8n schema
- [ ] Provide download-ready .json file
## Instructions
### Step 1: Parse User Prompt
Extract from the user's description:
- **Trigger**: What starts the workflow? (webhook, schedule, manual, trigger-node)
- **Actions**: What should happen? (send email, HTTP request, database operation)
- **Integrations**: Which services? (Slack, Gmail, PostgreSQL, etc.)
- **Data flow**: How does data move between nodes?
### Step 2: Node Selection Rules
**CRITICAL: Generate ONLY necessary nodes. No extras.**
| User Needs | Minimal Nodes |
|------------|---------------|
| "Send Slack message daily" | Schedule Trigger → Slack |
| "HTTP webhook to save data" | Webhook → HTTP Request |
| "Email on form submit" | Webhook → Send Email |
| "Database backup weekly" | Schedule → Postgres → FTP |
**Forbidden extras:**
- No debug nodes
- No unnecessary Set nodes
- No extra HTTP requests
- No duplicate triggers
- No unused credentials placeholders
### Step 3: Generate Workflow JSON
Required structure:
```json
{
"name": "Workflow Name",
"nodes": [
{
"id": "uuid",
"name": "Trigger",
"type": "n8n-nodes-base.webhook",
"position": [250, 300],
"parameters": {}
},
{
"id": "uuid",
"name": "Action",
"type": "n8n-nodes-base.slack",
"position": [450, 300],
"parameters": {}
}
],
"connections": {
"Trigger": {
"main": [[{"node": "Action", "type": "main", "index": 0}]]
}
}
}
```
### Step 4: Position Guidelines
- Start trigger at `[250, 300]`
- Each subsequent node: `+200` on X axis
- Keep Y at `300` for simple flows
- Use `[250, 200]` and `[250, 400]` for branches
### Step 5: Common Node Templates
**Webhook Trigger:**
```json
{
"id": "{{uuid}}",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [250, 300],
"webhookId": "{{random-id}}",
"parameters": {
"httpMethod": "POST",
"path": "{{unique-path}}",
"responseMode": "responseNode"
}
}
```
**HTTP Request:**
```json
{
"id": "{{uuid}}",
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [450, 300],
"parameters": {
"method": "GET",
"url": "",
"sendBody": false
}
}
```
**Slack:**
```json
{
"id": "{{uuid}}",
"name": "Slack",
"type": "n8n-nodes-base.slack",
"typeVersion": 2,
"position": [450, 300],
"parameters": {
"operation": "post",
"channel": "",
"text": ""
}
}
```
**Send Email:**
```json
{
"id": "{{uuid}}",
"name": "Send Email",
"type": "n8n-nodes-base.emailSend",
"typeVersion": 2,
"position": [450, 300],
"parameters": {
"toEmail": "",
"subject": "",
"text": ""
}
}
```
**Schedule Trigger:**
```json
{
"id": "{{uuid}}",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.1,
"position": [250, 300],
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"hoursInterval": 1
}
]
}
}
}
```
**Code Node:**
```json
{
"id": "{{uuid}}",
"name": "Code",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [450, 300],
"parameters": {
"jsCode": "// Add your code here\nreturn items;"
}
}
```
### Step 6: Connection Rules
Format connections array:
```json
{
"connections": {
"SourceNodeName": {
"main": [
[
{
"node": "TargetNodeName",
"type": "main",
"index": 0
}
]
]
}
}
}
```
For multiple outputs, increment the inner array index.
## Scripts
Generate workflow using the helper:
```bash
python .agent/skills/generating-n8n-workflows/scripts/n8n_generator.py \
--prompt "Send Slack message when webhook received" \
--output workflow.json
```
## Examples
### Example 1: Simple Webhook to Slack
**User Prompt:** "When I send a webhook, post to Slack"
**Generated Nodes:** 2 (Webhook → Slack)
See: [examples/webhook-slack-example.json](examples/webhook-slack-example.json)
### Example 2: Daily Email Report
**User Prompt:** "Send daily email at 9 AM"
**Generated Nodes:** 2 (Schedule → Email)
See: [examples/schedule-email-example.json](examples/schedule-email-example.json)
### Example 3: HTTP API Call
**User Prompt:** "Call an API every hour and save response"
**Generated Nodes:** 2 (Schedule → HTTP Request)
See: [examples/schedule-http-example.json](examples/schedule-http-example.json)
## Validation Checklist
Before returning JSON:
- [ ] Only necessary nodes included
- [ ] All nodes have unique UUIDs
- [ ] All nodes have unique names
- [ ] Connections reference existing node names
- [ ] Positions are reasonable (no overlaps)
- [ ] JSON is valid (no trailing commas)
- [ ] No credential values hardcoded
- [ ] Workflow name is descriptive
## Resources
- [scripts/n8n_generator.py](scripts/n8n_generator.py) - Workflow generator script
- [examples/](examples/) - Sample workflow JSON files
- [Node Type Reference](https://docs.n8n.io/integrations/builtin/)Related Skills
airflow-workflows
Apache Airflow DAG design, operators, and scheduling best practices.
adaptive-workflows
Self-learning workflow system that tracks what works best for your use cases. Records experiment results, suggests optimizations, creates custom templates, and builds a personal knowledge base. Use to learn from experience and optimize your LLM workflows over time.
workflows-expert
Activate when requests involve workflow execution, CI/CD pipelines, git automation, or multi-step task orchestration. This skill provides workflows-mcp MCP server integration with tag-based workflow discovery, DAG-based execution, and variable syntax expertise. Trigger on phrases like "run workflow", "execute workflow", "orchestrate tasks", "automate CI/CD", or "workflow information".
interactor-workflows
Build state-machine based automation with human-in-the-loop support through Interactor. Use when implementing approval flows, multi-step processes, automated pipelines, or any workflow requiring user input at specific stages.
integration-workflows
Cross-MCP workflows that coordinate multiple systems (Linear, GitHub, n8n, Slack) for end-to-end automation. Captures patterns that span tool boundaries.
git-pr-workflows-pr-enhance
You are a PR optimization expert specializing in creating high-quality pull requests that facilitate efficient code reviews. Generate comprehensive PR descriptions, automate review processes, and ensu
git-pr-workflows-onboard
You are an **expert onboarding specialist and knowledge transfer architect** with deep experience in remote-first organizations, technical team integration, and accelerated learning methodologies. You
git-pr-workflows-git-workflow
Orchestrate a comprehensive git workflow from code review through PR creation, leveraging specialized agents for quality assurance, testing, and deployment readiness. This workflow implements modern g
git-advanced-workflows
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.
bio-workflows-atacseq-pipeline
End-to-end ATAC-seq workflow from FASTQ files to differential accessibility and TF footprinting. Covers alignment, peak calling with MACS3, QC metrics, and optional TOBIAS footprinting. Use when running end-to-end ATAC-seq analysis from FASTQ to differential accessibility.
affinity-mcp-workflows
Use when working with Affinity CRM via MCP tools - find entities, manage workflows, log interactions, prepare briefings, find warm intros. Also use when user mentions "pipeline", "deals", "relationship strength", or wants to prepare for meetings.
generating-typescript-types-from-apis
Generates TypeScript interfaces from API responses or OpenAPI schemas. Use when the user asks about typing API responses, creating interfaces from JSON, parsing Swagger/OpenAPI, or keeping types in sync with backend.