PDF4me icon

PDF4me

Comprehensive PDF and document processing: generate barcodes, convert files, extract data, manipulate images, and automate workflows with the PDF4ME API

Actions80

Overview

This node reads barcodes from image files. It supports multiple input methods for providing the image: binary data from a previous node, a base64-encoded string, or a URL pointing to the image file. The node processes the image asynchronously by default and extracts barcode information embedded in the image.

Common scenarios where this node is useful include:

  • Automating inventory management by scanning product barcodes from images.
  • Extracting tracking numbers or QR codes from shipping labels.
  • Processing scanned documents or photos containing barcodes for data extraction.

Practical example:

  • You receive images of packages via an HTTP request or file upload. Using this node, you can extract the barcode data automatically to update your shipment tracking system without manual entry.

Properties

Name Meaning
Input Data Type Choose how to provide the image file to read barcodes from:
- Binary Data
- Base64 String
- URL
Input Binary Field Name of the binary property that contains the image file (used when Input Data Type is Binary Data)
Base64 Image Content Base64 encoded image content (used when Input Data Type is Base64 String)
Image URL URL to the image file to read barcodes from (used when Input Data Type is URL)
Output File Name Name for the output JSON file containing the barcode data
Image Type Type of the image:
- JPG
- PNG
Async Enable asynchronous processing (true/false)

Output

The node outputs JSON data representing the barcode(s) detected in the provided image. This JSON typically includes details such as barcode type, value, and possibly position or other metadata depending on the underlying barcode reading implementation.

If the node supports outputting a file, it names the output JSON file according to the "Output File Name" property.

No binary data output is indicated for this operation.

Dependencies

  • Requires access to an external barcode reading service or library integrated within the node's implementation.
  • May require an API key or authentication token configured in n8n credentials to access the barcode reading service.
  • Network access is needed if using image URLs or external services.

Troubleshooting

  • Common issues:

    • Providing an incorrect binary property name will cause the node to fail to find the image data.
    • Invalid base64 strings or inaccessible URLs will result in errors during image retrieval.
    • Unsupported image types or corrupted images may lead to failure in barcode detection.
  • Error messages and resolutions:

    • "Image data not found" — Verify the binary property name or input data source.
    • "Failed to fetch image from URL" — Check the URL accessibility and correctness.
    • "Invalid base64 content" — Ensure the base64 string is properly encoded.
    • "No barcodes detected" — Confirm the image contains readable barcodes and is of supported format.

Links and References

Discussion