This repository is a monorepo for custom n8n nodes, including the Markitdown node and any future nodes you add. It is designed for easy development, testing, versioning, and publishing of individual nodes.
- Copy the template:
- Duplicate
nodes/NodeTemplate
tonodes/YourNodeName
.
- Duplicate
- Rename files and update references:
- Replace all
NodeTemplate
references with your node's name. - Update
package.json
with your node's details.
- Replace all
- Implement your node logic:
- Edit
YourNodeName.node.ts
andYourNodeName.node.json
.
- Edit
- (Optional) Add tests:
- Place tests in a
test/
subfolder inside your node directory.
- Place tests in a
- Install all dependencies (root and subnodes):
This will install all dependencies for the monorepo and for each subnode automatically.
pnpm install
- Build all nodes:
pnpm build
- Test all nodes:
pnpm test
- Test a single node:
pnpm --filter ./nodes/YourNodeName... test
Note: After running
pnpm build
, all built nodes are automatically copied to your local n8n custom directory (~/.n8n/custom/nodes/
) for local development.
- The Dockerfile expects all built node outputs in
dist/nodes/YourNodeName/
. This is handled by thepnpm build
step. - After building, you can build your Docker image as usual:
docker build -t n8n-subnodes .
- Run the Docker container:
docker run -it --rm \ -p 5678:5678 \ -e N8N_COMMUNITY_PACKAGES_ENABLED=true \ n8n-subnodes
- (Optional) For live development, mount your local
dist/nodes
:docker run -it --rm \ -p 5678:5678 \ -e N8N_COMMUNITY_PACKAGES_ENABLED=true \ -v $PWD/dist/nodes:/home/node/.n8n/custom/nodes \ n8n-subnodes
- Publish a node to npm:
cd nodes/YourNodeName npm publish --access public
- Release workflow:
- The repo includes GitHub Actions for CI, npm publishing, and Docker image publishing.
- Update the matrix in
.github/workflows/publish-npm-nodes.yml
to add new nodes to npm publishing.
For details on using the Markitdown node, see nodes/Markitdown/README.md
.
Need guidance on leveraging AI agents or n8n for your business? Our AI Agents workshop will equip you with the knowledge and tools necessary to implement successful and valuable agentic workflows.