Skip to main content

Read Barcode From Image using n8n action

PDF4me Read Barcode From Image detects and decodes barcodes from image files through n8n automation workflows. Process images via n8n triggers, binary data, base64 strings, or public URLs to automatically scan for 100+ barcode types (QR Code, Code 128, Data Matrix, EAN-13, etc.), extract barcode content, detect multiple barcodes per image, and output structured data with barcode values and types. This solution is ideal for inventory management, product scanning, asset tracking, shipping workflows, mobile barcode scanning, and automated barcode recognition that require accurate multi-format detection with reliable data extraction and seamless integration.

Setup

Add the PDF4me "Read Barcode From Image" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.

Prerequisites:

  • PDF4me API credentials
  • n8n workflow access

Configuration:

  1. Add PDF4me node to workflow
  2. Select "Read Barcode From Image" action
  3. Configure input parameters (see below)
Read Barcode From Image

Parameters

Complete list of parameters for the Read Barcode From Image action. Configure these parameters to control barcode reading from images.

Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.

ParameterTypeDescriptionExample
Input Data TypeStringYesPDF4me image input format selection
Choose the format of your source image data input.
PDF4me supports multiple input types with different field requirements
1) Binary DataYes (One Required)1) Binary Data - Use "Input Binary Field" to reference image file from previous node
2) Base64 StringYes (One Required)2) Base64 String - Use "Base64 Image Content" field for encoded image data
3) URLYes (One Required)3) URL - Use "Image URL" field to provide a public/open permission URL to the image file to process
Input Binary FieldBinaryYes (If Binary Data)PDF4me binary image file input - Reference source image file (.jpg, .png, .gif, .bmp) from previous n8n node or file upload. PDF4me processes binary image files with automatic format detection and validation. Required when Input Data Type is "Binary Data"
Base64 Image ContentStringYes (If Base64 String)PDF4me base64 encoded image input - Provide source image data (.jpg, .png, .gif, .bmp) as base64 encoded string for secure transmission. PDF4me automatically decodes and processes the image content. Required when Input Data Type is "Base64 String"
Image URLStringYes (If URL)PDF4me public image URL input - Provide a public/open permission URL to the source image file (.jpg, .png, .gif, .bmp) to be processed for barcode reading. PDF4me downloads and processes the file from the provided URL. Required when Input Data Type is "URL"
Output File NameStringYesPDF4me output filename configuration - Specify the name for the generated barcode data file with proper extension (.json, .txt). This is an input parameter that configures what the output file will be named. PDF4me ensures unique naming and validates file format compliance
Image TypeStringYesPDF4me image format specification - Specify the expected image format for accurate barcode recognition. This helps PDF4me optimize the analysis process for the specific image type
JPGYes (One Required)JPEG Format - Joint Photographic Experts Group format with lossy compression, ideal for photographs and complex images
PNGYes (One Required)PNG Format - Portable Network Graphics format with lossless compression, ideal for graphics with transparency and sharp edges
GIFYes (One Required)GIF Format - Graphics Interchange Format with animation support and limited color palette
BMPYes (One Required)BMP Format - Bitmap image format with uncompressed pixel data
AsyncBooleanNoPDF4me asynchronous processing - Enable asynchronous processing for large images or when processing time is not critical. When enabled, the operation runs in the background and returns immediately
Binary Data Output NameStringYesPDF4me output variable configuration - Define the variable name for accessing the generated barcode data in your n8n workflow. This data can be used as input data in subsequent actions within your workflow

Output

Output Parameters

ParameterTypeDescriptionExample
successBooleanPDF4me barcode reading status indicator - Boolean flag indicating the success or failure of the barcode reading process. PDF4me returns true for successful operations and false for any errors, enabling robust error handling in automated workflowstrue
messageStringPDF4me barcode reading status message - Human-readable status message providing details about the barcode reading process result. Includes success confirmation or error details for troubleshootingBarcode data extracted successfully
fileNameStringPDF4me generated barcode data filename - The complete filename of the successfully generated barcode data file with proper extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processesread_barcode_from_image.json
mimeTypeStringPDF4me output MIME type - MIME type of the generated barcode data file (e.g., "application/json", "text/plain"). Useful for content type validation and proper file handling in web applicationsapplication/json
fileSizeNumberPDF4me barcode data file size in bytes - The exact size of the generated barcode data file in bytes, provided by PDF4me for storage planning and file transfer monitoring78
imageTypeStringPDF4me source image format - The format of the source image that was processed for barcode reading (e.g., "PNG", "JPEG", "GIF", "BMP")PNG

N8N Action Response

The PDF4me Read Barcode From Image API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:

JSON Response Format

The raw JSON response from the API:

[
{
"success": true,
"message": "Barcode data extracted successfully",
"fileName": "read_barcode_from_image.json",
"mimeType": "application/json",
"fileSize": 78,
"imageType": "PNG"
}
]

Use Cases

Retail and E-commerce Inventory Management

  • Automate product identification and inventory tracking using barcode scanning
  • Process product images to extract UPC/EAN codes for automated stock management
  • Integrate barcode data with e-commerce platforms for seamless product cataloging

Asset Tracking and Logistics

  • Track equipment and assets using barcode identification systems
  • Process shipping labels and package barcodes for automated logistics workflows
  • Monitor inventory movement and asset location through barcode scanning

Quality Control and Compliance

  • Verify product authenticity and compliance using barcode validation
  • Process manufacturing labels and quality control tags for automated inspection
  • Track batch numbers and serial numbers for regulatory compliance reporting

Get Help