folder-management

Custom n8n node for creating and deleting folders on the worker host

Package Information

Downloads: 2 weekly / 19 monthly
Latest Version: 0.1.2
Author: CyberLaboratory

Documentation

n8n-folder-management

Community n8n node package that adds a Worker Folder node for safe folder creation and deletion on a worker host filesystem.

Package

  • Name: n8n-nodes-folder-management
  • Node: Worker Folder (workerFolder)
  • Source entrypoint: nodes/WorkerFolder/WorkerFolder.node.ts
  • Build output: dist/nodes/WorkerFolder/WorkerFolder.node.js

Install

npm install n8n-nodes-folder-management

Development

npm ci
npm run lint
npm run build

Useful commands:

  • npm run dev to run the local n8n node development workflow
  • npm run build:watch for TypeScript watch mode
  • npm run release for tag-based local release preparation

Worker Folder behavior and safety

  • Operations: Create and Delete
  • Folder Path can be absolute or relative to WORKER_FOLDERS_BASE_PATH (default /workspace)
  • Blocks path traversal and any resolved path outside the allowed base path
  • Rejects symlink targets and symlink escapes
  • Rejects deleting the base path root
  • Rejects create/delete against non-directory filesystem targets
  • Supports continue-on-fail item output with structured error fields

CI and publish automation

  • .github/workflows/ci.yml runs lint and build on pull requests and main pushes
  • .github/workflows/publish.yml runs on main pushes and manual dispatch
  • Publish workflow:
    • Installs dependencies, lints, and builds
    • Auto-bumps patch version
    • Publishes only if that version does not already exist on npm
    • Uses npm provenance (--provenance) with GitHub OIDC support
    • Falls back to NPM_TOKEN if configured
    • Commits version bumps (package.json and package-lock.json) back to main

Required repository configuration

  1. Configure npm trusted publishing (recommended) for this repository, or add NPM_TOKEN secret.
  2. Keep workflow permissions enabled for contents: write and id-token: write.
  3. Ensure GitHub Actions can push to main (branch protection allowance).

Discussion