npm.io
0.1.0 • Published 3 months ago

n8n-nodes-filechanger

Licence
MIT
Version
0.1.0
Deps
1
Size
13 kB
Vulns
0
Weekly
0

n8n-nodes-filechanger

An n8n community node for FileChanger. Convert documents, audio, and video from within your n8n workflows.

Operations

Operation Description
Convert a File POST a binary file to /api/convert (multipart). Returns the converted file as binary output.
List Formats GET /api/formats. Returns the supported input_formats and output_formats arrays.

Credential setup

  1. In n8n go to Credentials → New → FileChanger API.
  2. Fill in:
    • Base URL: https://filechanger.io (default). Override this for self-hosted or staging instances.
    • API Key: your FileChanger API key, sent as the X-Api-Key request header.
  3. Click Test. It calls GET {baseUrl}/api/formats and expects a 200 response.

Note: https://filechanger.io/api/* returns 404 until the FileChanger foundation service is deployed. Use a local or staging instance for credential testing until then.

Installing for local testing

Build the package first, then point n8n at this directory via the N8N_CUSTOM_EXTENSIONS env var:

# from this directory
npm install
npm run build

# launch n8n with this node loaded
N8N_CUSTOM_EXTENSIONS="$(pwd)" npx n8n

n8n picks up the n8n block in package.json and registers the node and credential automatically. The node appears under the FileChanger name in the node picker.

Manual end-to-end test

Requirements: a running FileChanger instance (local or staging) and an API key.

  1. Start n8n as above.
  2. Create a workflow:
    • Read Binary File node (or any node that produces a binary) → FileChanger (Convert a File).
    • Set Base URL in the credential to your running instance (e.g. http://localhost:8080).
    • Set From Format / To Format using the dynamic dropdowns (loaded from /api/formats).
    • Connect a Write Binary File node to save the output.
  3. Execute the workflow and verify the output file is the converted result.

Publishing to npm

Once the package is ready for general use, publish it so n8n users can install it via Settings → Community Nodes → Install (all inside nix develop):

  1. Run the local gates: npm run build && npm run lint (both must exit 0).
  2. Bump version in package.json if this is a new release.
  3. Publish:
npm login                  # one-time, needs an npmjs.com account
npm publish --access public

The package name n8n-nodes-filechanger is what users paste into the n8n community node installer. n8n discovers community nodes by the n8n-community-node-package keyword and the n8n block already present in package.json, so no registration step beyond the npm publish is needed. Optionally, submit the published package for n8n's verified community node badge so it also appears for n8n Cloud users.

Keywords