qrcode-barcode-scanner

n8n community node that reads QR codes and barcodes in binary images, locally, with the QR Code & Barcode Scanner engine

Package Information

Released: this month
Downloads: 0 weekly / 0 monthly
Latest Version: 0.1.2
Author: SuperNovae Studio

Documentation

QR Code & Barcode Scanner for n8n: the n8n logo, the node and its settings, and a QR code and a barcode being read

QR Code & Barcode Scanner · n8n community node 0.1.2

Ask AI

ChatGPT
Claude
Gemini
Grok
Perplexity
Copilot
DeepSeek
Meta AI
Qwen

Choose an AI assistant to explain this destination using its public sources. Gemini opens gemini.google.com. Gemini, Copilot, DeepSeek, Meta AI and Qwen require pasting the prompt below; the other links include it in their URL. Sign-in or a manual paste may still be required. Check the answer against the documentation.

Copy the plain-text prompt

Use the code block's copy control, or select its complete text, then paste it into your assistant.

Help me understand QR Code & Barcode Scanner · n8n community node 0.1.2 (integrations/n8n/README.md) for QR Code & Barcode Scanner, the open-source scanner. Source documentation; publication is not implied. Provided README context (verify against the sources): This n8n community node reads the QR codes and barcodes in the images of a workflow and returns each code as data. It runs the open-source scanner engine on your own n8n server, in a worker thread, with no API key, no credential and no network call. It is published on npm as @qrcode-ai-com/n8n-nodes-qrcode-barcode-scanner, and a self-hosted n8n installs it by that name. It is not a verified community node, so n8n Cloud cannot install it. Read the public documentation below. Explain what this destination does, its documented installation or access steps, a minimal example if supported, prerequisites, limitations and license. Distinguish published packages from working source and preparation. Cite your sources; if a page is unavailable or a fact cannot be checked, say so. Do not invent installation commands, benchmark results or comparisons. Answer in my language. Public sources: https://github.com/qrcode-ai-com/qrcode-barcode-scanner-rust/blob/main/integrations/n8n/README.md https://qrcode-ai.com/en-US/qr-code-scanner https://qrcode-ai.com/en-US/barcode-scanner https://qrcode-ai.com/en-US/qr-code-scanner/integrations/n8n https://qrcode-ai.com/en-US/barcode-scanner/integrations/n8n https://qrcode-ai.com/en-US/qr-code-generator https://qrcode-ai.com/en-US/barcode-generator

This n8n community node reads the QR codes and barcodes in the images of a workflow and returns each code as data. It runs the open-source scanner engine on your own n8n server, in a worker thread, with no API key, no credential and no network call. It is published on npm as @qrcode-ai-com/n8n-nodes-qrcode-barcode-scanner, and a self-hosted n8n installs it by that name. It is not a verified community node, so n8n Cloud cannot install it.

You can try the same engine in a browser first. The QR code scanner reads a QR code image, and the barcode scanner reads a barcode label. The QR code scanner guide for n8n and the barcode scanner guide for n8n explain this node for each kind of code. To call the engine from your own code instead, read the QR code scanner SDK guide and the barcode scanner SDK guide.

To make test images, use the QR code generator for a QR code and the barcode generator for a barcode. Keep the text you encoded next to the image, then compare it with what the node returns, leading zeroes included.

Before you install

The node needs a self-hosted n8n. n8n Cloud only installs verified community nodes, and this node cannot be verified: it depends on the scanner engine package and runs it in a worker thread, two things the verification rules exclude. The engine is WebAssembly, so the package needs no native build and no compiler on the n8n host.

The package needs Node.js 22 or later; n8n 2.48 itself requires Node.js 24. Community nodes must be enabled, which is the default on a self-hosted n8n.

Install

In n8n, open Settings, then Community nodes, and select Install. Enter the package name @qrcode-ai-com/n8n-nodes-qrcode-barcode-scanner, confirm that you accept the risk of an unverified node, and install. The node then appears in the nodes panel as QR Code & Barcode Scanner.

Without the settings page, for example in a container started with community nodes managed by hand, install the package in the n8n nodes folder and restart n8n:

mkdir -p ~/.n8n/nodes
cd ~/.n8n/nodes
npm install @qrcode-ai-com/n8n-nodes-qrcode-barcode-scanner

To remove it, uninstall it from the same settings page, or run npm uninstall @qrcode-ai-com/n8n-nodes-qrcode-barcode-scanner in that folder and restart n8n.

Use

Put the node after any step that outputs a binary image: Read/Write Files from Disk, HTTP Request with the response as a file, a form upload or an email attachment. It reads PNG, JPEG, WebP and GIF files.

  • Input Binary Field names the binary field that holds the image. The default is data.
  • Profile is Fast by default: it decodes every code and gives a reduced QR score, within an 800 ms budget. Frame decodes without scoring, within the 80 ms budget of a camera frame, and Full gives the full QR score, within 4000 ms. Up to 0.1.1 the default was Frame (why it changed).
  • Output is One Item per Image by default. One Item per Code returns one item for each decoded code instead, and nothing for an image without a code.
  • Options adds Budget (Ms), which replaces the profile's time budget (0 removes it; it is not a hard timeout), and Include Report, which keeps or drops the full engine report.

A ready workflow that checks label images against an expected value is in template/.

What it returns

With the default settings, an image that holds a QR code and a Code 128 barcode gives this item (the full report is left out here):

{
  "texts": ["https://qrc-ai.com/76xMa", "STOCK-4827"],
  "codes": [
    {
      "symbology": "qr_code",
      "text": "https://qrc-ai.com/76xMa",
      "raw": "aHR0cHM6Ly9xcmMtYWkuY29tLzc2eE1h",
      "charset": "utf8",
      "payload": { "kind": "url", "url": "https://qrc-ai.com/76xMa" }
    },
    {
      "symbology": "code128",
      "text": "STOCK-4827",
      "raw": "U1RPQ0stNDgyNw==",
      "charset": "utf8",
      "payload": { "kind": "text" }
    }
  ],
  "count": 2,
  "profile": "fast",
  "engine": "0.12.0",
  "image": { "fileName": "mixed-code128-qr.png", "mimeType": "image/png", "field": "data" }
}

raw holds the exact bytes of each code in base64. With Include Report on, report holds the engine report unchanged: positions, scores, hints, trace and versions. The frame profile leaves report.score null, because it does not score. The image stays on the item, so a later step can still use it.

An image without a code is a normal result: texts is empty and count is 0. A corrupt file, an unknown format or an image over the limits stops the node with an error such as Scanner error QRS-001. With On Error set to continue, the item carries error instead, a message that ends with the code in brackets (such as [QRS-001]), and the next items are still scanned.

Limits

Each image can have at most 8 MiB, 4096 pixels per side and 16 million pixels in all. The budget goes from 0 to 60,000 milliseconds. The node never opens a decoded link: treat every decoded text as untrusted data before a later step acts on it. Scans of one n8n process run one after the other in one worker thread, so the editor and the other workflows stay responsive during a long scan.

Upgrading

From 0.1.1

Version 0.1.2 changes the default of Profile from Frame to Fast. A node that names its profile is unchanged. A node left on the default now runs Fast: it can reach the enhance stage that Frame skips, returns a reduced QR score where the engine measured one instead of report.score null, and uses the fast profile's 800 ms default budget instead of 80 ms. The Frame budget is sized for one camera frame among many: on a busy machine, the deadline can stop the scan of an image before its full-resolution stage, and a barcode only that stage reads is then missing from a report marked trace.budget_exhausted: true. The engine 0.12.0, the fields, the output and the limits do not change. To keep the former behavior, open the node and choose Frame.

Build and test from source

The node source is nodes/QrcodeBarcodeScanner. Its scan core, scanCore.ts, is generated from the shared core of the three JavaScript automation hosts; edit the source there and run node integrations/automation-js-core/sync.mjs.

cd integrations/n8n
npm ci
npm run build
npm run lint
npm test
npm pack

npm run lint runs n8n's own linter with its self-hosted rules. The tests drive the built node through n8n's execution interface with the mixed fixture in the three profiles and with the default one, an empty image, a corrupt image, several items and the template. They do not start n8n itself: run the installed package once in a real self-hosted n8n before a release.

How it works

Scan inside your application, in Rust, Node.js, browser WASM or Python, in three steps: install and initialize, pass an image or a camera frame, read the result.

The node follows the same three steps. It installs the engine with the package, passes each binary image to it, and turns the report into n8n items.

The codes in one report

A QR code and Code 128 decoded from the same image, each outlined where the engine measured it

The picture is a recorded scan of the image used in the example above. Both codes come back in the same report, each with its format, its exact text and the place where the engine measured it.

What it reads

The code families the engine reads: QR codes, matrix and stacked codes such as Data Matrix, retail barcodes such as EAN-13, and other linear barcodes such as Code 128

  • QR: QR Code, Micro QR, rectangular Micro QR (rMQR)
  • Matrix and stacked: Data Matrix, Aztec, PDF417, MaxiCode
  • Retail: EAN-13, EAN-8, UPC-A, UPC-E
  • Other linear: Code 128, Code 39, Code 93, Codabar, ITF, GS1 DataBar, GS1 DataBar Expanded, Telepen

The engine's supported formats section states the known limits.

The same engine in other runtimes

One engine in the language you write: Rust on crates.io, Node.js and the browser on npm, Python on PyPI, Go, PHP, and the qrscan command line

The same engine also runs as a Node-RED node and an Activepieces piece. The Rust, Node.js, browser and Python packages hold the engine, and every route is listed in the scanner repository.

Licensing

The node's own source is MIT, in LICENSE. The package installs the published engine, @qrcode-ai-com/qrcode-barcode-scanner-wasm 0.12.0, as a separate npm dependency. That engine is MIT too, and two of its reader parts keep their Apache-2.0 notice: the engine package ships LICENSE, LICENSE-APACHE-2.0 and THIRD-PARTY.md. The node copies no engine code into its own package. Version 0.1.0 of the node installs engine 0.11.0, which keeps its AGPL-3.0-or-later license. Read the engine's packaged license before you distribute an n8n installation that includes it.

Maintained by Thibaut Mélen & Nicolas Cella for QR Code AI, a product of SuperNovae Studio.

Source license

Project-authored scanner code and documentation in this checkout are available under the MIT License. You may use, modify and redistribute this source in open-source or proprietary applications, including commercial products, while preserving the copyright and permission notice. Thibaut Mélen & Nicolas Cella develop QR Code AI at SuperNovae Studio.

Retained third-party code, dependencies, artwork and test data keep their own licenses and notices. The licensing guide explains these component boundaries; the project license does not assign a license to an unrelated platform or service.

Published archives retain the license shipped with their version. A pinned engine, adapter or bundle may therefore have different terms from this working source. Read its packaged license and the license history before reuse. The source change does not replace an archive or publish a new version.

Discussion