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:
- Add PDF4me node to workflow
- Select "Read Barcode From Image" action
- Configure input parameters (see below)

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.
| Parameter | Type | Description | Example |
|---|---|---|---|
| Input Data Type | String | Yes | PDF4me image input format selection Choose the format of your source image data input. PDF4me supports multiple input types with different field requirements |
| 1) Binary Data | Yes (One Required) | 1) Binary Data - Use "Input Binary Field" to reference image file from previous node | |
| 2) Base64 String | Yes (One Required) | 2) Base64 String - Use "Base64 Image Content" field for encoded image data | |
| 3) URL | Yes (One Required) | 3) URL - Use "Image URL" field to provide a public/open permission URL to the image file to process | |
| Input Binary Field | Binary | Yes (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 Content | String | Yes (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 URL | String | Yes (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 Name | String | Yes | PDF4me 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 Type | String | Yes | PDF4me image format specification - Specify the expected image format for accurate barcode recognition. This helps PDF4me optimize the analysis process for the specific image type |
| JPG | Yes (One Required) | JPEG Format - Joint Photographic Experts Group format with lossy compression, ideal for photographs and complex images | |
| PNG | Yes (One Required) | PNG Format - Portable Network Graphics format with lossless compression, ideal for graphics with transparency and sharp edges | |
| GIF | Yes (One Required) | GIF Format - Graphics Interchange Format with animation support and limited color palette | |
| BMP | Yes (One Required) | BMP Format - Bitmap image format with uncompressed pixel data | |
| Async | Boolean | No | PDF4me 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 Name | String | Yes | PDF4me 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
| Parameter | Type | Description | Example |
|---|---|---|---|
| success | Boolean | PDF4me 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 workflows | true |
| message | String | PDF4me barcode reading status message - Human-readable status message providing details about the barcode reading process result. Includes success confirmation or error details for troubleshooting | Barcode data extracted successfully |
| fileName | String | PDF4me 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 processes | read_barcode_from_image.json |
| mimeType | String | PDF4me 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 applications | application/json |
| fileSize | Number | PDF4me 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 monitoring | 78 |
| imageType | String | PDF4me 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
- Table
- Schema
- Binary
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"
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| success | true |
| message | Barcode data extracted successfully |
| fileName | read_barcode_from_image.json |
| mimeType | application/json |
| fileSize | 78 |
| imageType | PNG |
Schema View
The data structure and types of the response:
1 item
success: ☑ true
message: AB Barcode data extracted successfully
fileName: AB read_barcode_from_image.json
mimeType: AB application/json
fileSize: # 78
imageType: AB PNG
Type Indicators:
AB= String#= Number☑= Boolean
Binary Data View
The actual barcode data file and information:
data
─────────────────────────────
File Name: read_barcode_from_image.json
File Extension: json
Mime Type: application/json
File Size: 78 bytes
Image Type: PNG
Binary Data Access:
- n8n Binary Object:
$binary.data.data - Base64 Content: Available for direct use
- File Operations: Ready for download, email, or storage
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