{"id":31904653,"url":"https://github.com/devopsvanilla/n8n-templates","last_synced_at":"2025-10-29T16:20:49.918Z","repository":{"id":316944377,"uuid":"1065226161","full_name":"devopsvanilla/n8n-templates","owner":"devopsvanilla","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-27T17:59:07.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-27T19:34:05.544Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devopsvanilla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-27T09:54:08.000Z","updated_at":"2025-09-27T17:59:09.000Z","dependencies_parsed_at":"2025-09-27T19:34:09.875Z","dependency_job_id":null,"html_url":"https://github.com/devopsvanilla/n8n-templates","commit_stats":null,"previous_names":["devopsvanilla/n8n-templates"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/devopsvanilla/n8n-templates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsvanilla%2Fn8n-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsvanilla%2Fn8n-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsvanilla%2Fn8n-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsvanilla%2Fn8n-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devopsvanilla","download_url":"https://codeload.github.com/devopsvanilla/n8n-templates/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsvanilla%2Fn8n-templates/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015370,"owners_count":26085687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-13T13:56:51.974Z","updated_at":"2025-10-13T13:56:55.700Z","avatar_url":"https://github.com/devopsvanilla.png","language":"Shell","readme":"\n# n8n-templates\n\nThis document defines the rules, practices and standards that all n8n templates\nin this repository must follow to ensure quality, consistency and ease of\nmaintenance.\n\n⏳ Estimated reading time: 8 min\n\n## 📋 Table of Contents\n\n1. [File Structure](#️-file-structure)\n2. [Workflow JSON](#-workflow-json)\n3. [Documentation](#-documentation)\n4. [Development Best Practices](#️-development-best-practices)\n5. [Security](#-security)\n6. [Testing and Validation](#-testing-and-validation)\n7. [Validation Prompt](#-validation-prompt)\n\n## 🗂️ File Structure\n\n### Required Structure\n\nEach template must follow the standard directory structure:\n\n```text\ntemplate-name/\n├── README.md                 # Main documentation (required)\n├── workflow.json            # n8n workflow file (required)\n├── assets/                  # Screenshots and diagrams (optional)\n│   ├── screenshot.png\n│   └── diagram.svg\n├── db/                     # Database scripts (if applicable)\n│   ├── init.sql\n│   └── init_db.sh\n├── .env.example            # Environment variables example (recommended)\n└── docker-compose.yml      # Docker configuration (if applicable)\n```\n\n### Naming Convention\n\n- **Directories**: Use kebab-case (ex: `intercom-teams-integration`)\n- **Files**: Use snake_case for scripts (ex: `init_db.sh`) and kebab-case for\n  others (ex: `workflow.json`)\n\n## 📄 Workflow JSON\n\n### n8n Compliance\n\nThe `workflow.json` file must strictly follow the\n[official n8n guidelines](https://n8n.notion.site/Template-submission-guidelines-9959894476734da3b402c90b124b1f77):\n\n#### 1. Valid JSON Structure\n\n```json\n{\n  \"name\": \"Descriptive Template Name\",\n  \"nodes\": [\n    {\n      \"parameters\": {},\n      \"id\": \"unique-node-id\",\n      \"name\": \"Node Name\",\n      \"type\": \"n8n-nodes-base.nodeType\",\n      \"typeVersion\": 1,\n      \"position\": [0, 0]\n    }\n  ],\n  \"connections\": {},\n  \"pinData\": {},\n  \"settings\": {\n    \"executionOrder\": \"v1\"\n  },\n  \"staticData\": null,\n  \"tags\": [],\n  \"triggerCount\": 1,\n  \"updatedAt\": \"2025-09-28T12:00:00.000Z\",\n  \"versionId\": \"1\"\n}\n```\n\n#### 2. Node Requirements\n\n- **Unique IDs**: Each node must have a unique ID in the format\n  `name-function-number` (ex: `teams-trigger-1`)\n- **Native Nodes**: Use exclusively\n  [native n8n nodes](https://docs.n8n.io/integrations/builtin/)\n- **Updated Versions**: Always use the latest node versions:\n  - `n8n-nodes-base.code` (v2)\n  - `n8n-nodes-base.httpRequest` (v4.2+)\n  - `n8n-nodes-base.postgres` (v2.4+)\n\n#### 3. Error Handling\n\nImplement robust error handling:\n\n```json\n{\n  \"onError\": \"continueErrorOutput\",\n  \"parameters\": {\n    \"options\": {\n      \"timeout\": 15000,\n      \"retry\": {\n        \"enabled\": true,\n        \"maxTries\": 3\n      }\n    }\n  }\n}\n```\n\n#### 4. Environment Variables\n\n- **Never** hardcode credentials or tokens\n- Use environment variables: `={{$env.VARIABLE_NAME}}`\n- Document all variables in README.md\n\n### Visual Positioning\n\n- Organize nodes logically on canvas\n- Use consistent position coordinates\n- Maintain adequate spacing between nodes (minimum 200px)\n\n## 📚 Documentation\n\n### Required README.md\n\nEach template must include a complete README.md with the sections:\n\n#### Minimum Structure\n\n```markdown\n# Template Name\n\nClear and concise description of what the template does.\n\n## What this template does\n\nDetailed explanation of functionality.\n\n## Resources and processes diagram\n\nMermaid diagram showing data flow.\n\n## Structure\n\nList of files and their functions.\n\n## Placeholders you must fill\n\nComplete list of required environment variables.\n\n## Credentials and permissions\n\nDetailed API configuration instructions.\n\n## Compatibility\n\nSupported n8n versions and dependencies.\n\n## Import workflow into n8n\n\nDetailed import steps.\n\n## Usage examples\n\nPractical use cases with examples.\n\n## Test Payload Examples\n\nExpected input and output payloads.\n\n## Error Handling and Robustness\n\nError scenario documentation.\n\n## Troubleshooting\n\nCommon FAQ and troubleshooting.\n\n## Best practices\n\nSecurity and usage recommendations.\n\n## License\n\nApplicable license specification.\n```\n\n#### Required Links\n\nAll templates must include links to:\n\n- [Official n8n Documentation](https://docs.n8n.io/)\n- [n8n Template Submission Guidelines](https://n8n.notion.site/Template-submission-guidelines-9959894476734da3b402c90b124b1f77)\n- Used APIs and services\n- Dependencies documentation\n\n### Mermaid Diagrams\n\nUse [Mermaid](https://mermaid.js.org/) to create flow diagrams:\n\n```mermaid\nflowchart TD\n    A[Trigger] --\u003e B{Condition}\n    B --\u003e|Yes| C[Action]\n    B --\u003e|No| D[End]\n```\n\n### Markdownlint\n\nThe README.md file must be validated with markdownlint to ensure compliance\nwith documentation quality standards:\n\n```bash\n# Install markdownlint (if needed)\nnpm install -g markdownlint-cli\n\n# Validate file using repository configuration\nmarkdownlint README.md\n```\n\n**Configuration**: The repository includes `.markdownlint.json` with rules\noptimized for technical templates (line limit: 120 characters,\nallows `\u003cimg\u003e` tags).\n\n## 🛠️ Development Best Practices\n\n### Environment Configuration\n\n- Use `.env.example` file with all necessary variables\n- Document the purpose of each variable\n- Never commit real `.env` files\n\n### Data Sanitization\n\n```javascript\n// Example of sanitization in Code nodes\nconst sanitizedValue = String(input)\n  .replace(/[\\\\x00-\\\\x1f\\\\x7f-\\\\x9f]/g, '')  // Remove control characters\n  .replace(/'/g, \"''\")                        // SQL escape\n  .substring(0, 100);                         // Size limit\n```\n\n### Timeouts and Retry Logic\n\nConfigure appropriate timeouts for all HTTP requests:\n\n```json\n{\n  \"options\": {\n    \"timeout\": 15000,\n    \"retry\": {\n      \"enabled\": true,\n      \"maxTries\": 3\n    }\n  }\n}\n```\n\n## 🔒 Security\n\n### Webhook Validation\n\nImplement HMAC validation when applicable:\n\n```javascript\n// HMAC signature validation\nconst crypto = require('crypto');\nconst signature = headers['x-hub-signature-256'];\nconst secret = $env.WEBHOOK_SECRET;\nconst payload = JSON.stringify($json);\nconst expectedSignature = 'sha256=' + crypto\n  .createHmac('sha256', secret)\n  .update(payload)\n  .digest('hex');\n\nif (signature !== expectedSignature) {\n  throw new Error('Invalid webhook signature');\n}\n```\n\n### Principle of Least Privilege\n\n- Configure minimum necessary API permissions\n- Use tokens with limited scope\n- Document required permissions in README\n\n### Sensitive Data\n\n- Never log sensitive data\n- Use masking in logs when necessary\n- Implement credential rotation when possible\n\n## 🧪 Testing and Validation\n\n### JSON Validation\n\nAlways validate JSON syntax before commit:\n\n```bash\ncat workflow.json | jq . \u003e /dev/null \u0026\u0026 \\\n  echo \"Valid JSON\" || echo \"Invalid JSON\"\n```\n\n### Integration Testing\n\n- Test with real (masked) data\n- Validate error scenarios\n- Document test cases in README\n\n### Quality Checklist\n\n- [ ] Valid JSON\n- [ ] Unique IDs on all nodes\n- [ ] Error handling implemented\n- [ ] Environment variables documented\n- [ ] Complete README\n- [ ] Updated diagrams\n- [ ] Functional examples\n\n## 📝 Validation Prompt\n\n### Context\n\nThis prompt should be used to validate n8n templates following the guidelines from\n[agents.md](https://agents.md/) for high-quality prompt structure.\n\n### Role and Objective\n\n```markdown\nYou are an n8n automation expert responsible for template validation.\nYour goal is to ensure that n8n templates meet the quality, security and\nusability standards defined in this repository.\n```\n\n### Specific Instructions\n\n```markdown\n## Task\nAnalyze the provided n8n template and validate if it meets ALL requirements of\nthe official n8n guidelines and this repository.\n\n## Required Analysis\n\n### 1. File Structure\n- [ ] Verify directory follows standard structure\n- [ ] Validate file and directory naming\n- [ ] Confirm presence of required files (README.md, workflow.json)\n\n### 2. Workflow JSON\n- [ ] Validate JSON syntax with `jq`\n- [ ] Verify all nodes have unique IDs\n- [ ] Confirm exclusive use of native n8n nodes\n- [ ] Validate node versions (use latest versions)\n- [ ] Verify error handling implementation\n  (`onError: \"continueErrorOutput\"`)\n- [ ] Confirm use of environment variables (={{$env.VAR}})\n- [ ] Validate timeout and retry configurations\n- [ ] Verify logical node positioning\n- [ ] Confirm complete connection mapping\n\n### 3. Documentation\n- [ ] README.md follows required minimum structure\n- [ ] All required sections are present\n- [ ] Environment variables documented with examples\n- [ ] Functional links to external resources\n- [ ] Mermaid diagrams present and updated\n- [ ] Complete payload examples\n- [ ] Troubleshooting documented\n- [ ] README.md validated with markdownlint (no errors)\n\n### 4. Security\n- [ ] No hardcoded credentials in code\n- [ ] Data sanitization implementation\n- [ ] Webhook validation (HMAC when applicable)\n- [ ] Timeouts configured appropriately\n- [ ] Minimum permissions documented\n\n### 5. Best Practices\n- [ ] .env.example file present\n- [ ] JavaScript code comments when necessary\n- [ ] Robust error scenario handling\n- [ ] Structured logs for debugging\n- [ ] Optimized and readable JavaScript code\n\n## Response Format\n\nFor each category, provide:\n\n1. **Status**: ✅ Compliant / ⚠️ Partially compliant / ❌ Non-compliant\n2. **Details**: Specific list of validated items\n3. **Issues found**: Detailed description of non-conformities\n4. **Recommendations**: Specific corrections needed\n5. **Priority**: High/Medium/Low for each issue\n\n### Output Example\n\n#### Workflow JSON: ⚠️ Partially compliant\n- ✅ Valid JSON syntax\n- ❌ Node \"teams-trigger\" without unique ID\n- ✅ Error handling implemented\n- **Recommendation**: Add unique ID \"teams-trigger-1\" to Microsoft Teams\n  Trigger node\n- **Priority**: High\n\n## Approval Criteria\n\nThe template will be approved only when:\n- All categories are ✅ Compliant\n- No High priority issues pending\n- Valid JSON importable in n8n\n- README.md passes markdownlint validation without errors\n- Complete and functional documentation\n```\n\n### Input Parameters\n\n```markdown\n## Required Information\n\nProvide the following files/information:\n\n1. **workflow.json**: Complete file content\n2. **README.md**: Complete documentation content\n3. **Directory structure**: List of present files\n4. **Additional files**: .env.example, scripts, etc.\n5. **Context**: Brief description of what the template does\n\n## Automated Validation\n\nExecute these commands before analysis:\n\n```bash\n# Validate JSON\ncat workflow.json | jq . \u003e /dev/null\n\n# Check structure\nls -la template-directory/\n\n# Validate README.md with markdownlint (required)\nmarkdownlint README.md\n\n# Check for formatting errors\necho \"README.md must pass markdownlint validation without errors\"\n```\n\n### Quality Criteria\n\n```markdown\n## Quality Levels\n\n### ⭐ Basic (Minimum for approval)\n- Valid and importable JSON\n- README with required sections\n- README.md validated with markdownlint (0 errors)\n- Environment variables documented\n- Basic error handling\n\n### ⭐⭐ Intermediate \n- Updated Mermaid diagrams\n- Complete payload examples\n- Data sanitization implemented\n- Troubleshooting documented\n\n### ⭐⭐⭐ Advanced\n- Webhook HMAC validation\n- Structured logs for debugging\n- Fallbacks and error recovery\n- Automated tests\n\n### ⭐⭐⭐⭐ Excellent\n- Optimized and commented code\n- Rich documentation with use cases\n- Security pattern implementation\n- Support for different environments\n\n## Technical References\n\n- [Official n8n Guidelines](https://n8n.notion.site/Template-submission-guidelines-9959894476734da3b402c90b124b1f77)\n- [n8n Documentation](https://docs.n8n.io/)\n- [n8n Native Nodes](https://docs.n8n.io/integrations/builtin/)\n- [agents.md](https://agents.md/) for prompt structure\n- [Mermaid.js](https://mermaid.js.org/) for diagrams\n\n## 📄 License\n\nAll templates must include a clear license. By default, use\n[MIT License](https://opensource.org/licenses/MIT) unless specified otherwise.\n\n## 🔗 References\n\n- [n8n Documentation](https://docs.n8n.io/)\n- [Template Submission Guidelines](https://n8n.notion.site/Template-submission-guidelines-9959894476734da3b402c90b124b1f77)\n- [n8n Builtin Nodes](https://docs.n8n.io/integrations/builtin/)\n- [Mermaid Diagrams](https://mermaid.js.org/)\n- [agents.md](https://agents.md/)\n- [JSON Schema Validation](https://json-schema.org/)\n\n---\n\n*This document was created following [agents.md](https://agents.md/) guidelines\nfor maximum compatibility with AI code agents.*\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevopsvanilla%2Fn8n-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevopsvanilla%2Fn8n-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevopsvanilla%2Fn8n-templates/lists"}