Skip to main content

QR Decode

Reads and decodes QR code images to extract the encoded data. QR codes can contain various types of information including URLs, text, contact information, WiFi credentials, and structured data. Accepts PNG, JPG, or JPEG image files.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • QR Path - File path to the QR code image to decode. Must be a valid PNG, JPG, or JPEG file.

Output

  • result - The decoded content from the QR code image. This can be text, URLs, JSON, vCard data, or any other encoded information.

How It Works

The QR Decode node extracts data from QR code images by:

  1. Loading the QR code image from the specified path
  2. Validating the file format (PNG, JPG, or JPEG)
  3. Converting the image to a binary bitmap for processing
  4. Using the QR code decoding algorithm to read the data
  5. Extracting and returning the encoded content as text

Decoding Capabilities

The node can decode QR codes containing:

  • Plain Text - Any text content
  • URLs - Web links and deep links
  • Contact Information - vCard format data
  • WiFi Credentials - Network configuration strings
  • Email Addresses - mailto: links
  • Phone Numbers - tel: links
  • SMS Messages - smsto: links
  • Geolocation - GPS coordinates
  • Calendar Events - iCal format
  • JSON Data - Structured application data
  • Payment Information - Payment requests and cryptocurrency addresses

Practical Examples

Example 1: Decode Website URL

Extract URL from a QR code image:

  • QR Path: C:\scans\product_qr.png
  • Result: https://www.example.com/products/item-12345

Use case: Extract product URLs from scanned QR codes for automated web scraping or price checking.

Example 2: Extract Contact Information

Decode business card QR code:

  • QR Path: /tmp/business_card.jpg
  • Result:
BEGIN:VCARD
VERSION:3.0
FN:John Doe
ORG:Example Corp
TEL:+1-555-123-4567
EMAIL:john.doe@example.com
URL:https://www.example.com
END:VCARD

Use case: Automatically add contacts to CRM system by scanning business card QR codes.

Example 3: Read WiFi Credentials

Extract WiFi network information:

  • QR Path: /guest_wifi/qr_code.png
  • Result: WIFI:T:WPA;S:GuestNetwork;P:Welcome123;;

Use case: Parse WiFi credentials for automated network configuration or guest access logging.

Example 4: Decode Product Data

Extract structured product information:

  • QR Path: C:\warehouse\item_scan.png
  • Result: {"product_id":"12345","batch":"B2024001","expiry":"2025-12-31","warehouse":"A1"}

Use case: Process product QR codes in warehouse automation for inventory updates.

Example 5: Event Ticket Validation

Decode event ticket QR code:

  • QR Path: /events/scans/ticket_001.jpg
  • Result: {"event_id":"EVT-2024-001","attendee":"A12345","ticket_type":"VIP","seat":"A-15"}

Use case: Validate event tickets at entry points by scanning and checking against database.

Example 6: Extract Email Information

Decode email QR code:

  • QR Path: /support/contact_qr.png
  • Result: mailto:support@example.com?subject=Support Request&body=Hello, I need help with...

Use case: Extract email addresses and pre-filled content for automated email processing.

Example 7: Batch Processing QR Codes

Process multiple QR codes from a folder:

For each image in folder "C:\qr_scans\":
- QR Path: {{image.path}}
- Store result in data table
- Parse JSON if applicable
- Update database with decoded data

Use case: Bulk process scanned QR codes from events, inventory, or document management systems.

Example 8: Payment QR Code

Decode payment request QR code:

  • QR Path: /payments/invoice_qr.png
  • Result: bitcoin:1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?amount=0.001&label=Invoice123

Use case: Extract payment information for automated cryptocurrency transaction processing.

Tips for Effective Use

  • Image quality: Use clear, well-lit images for better decoding accuracy
  • Resolution: Ensure images are at least 200x200 pixels for reliable decoding
  • Focus: Use sharp, in-focus images without blur
  • Orientation: QR codes can be decoded from any orientation (rotation-independent)
  • Cropping: Crop images to focus on the QR code area for faster processing
  • Contrast: Ensure good contrast between QR code and background
  • Lighting: Use evenly lit images without glare or shadows
  • No distortion: Avoid warped, skewed, or perspective-distorted images
  • Multiple attempts: If decoding fails, try image preprocessing (brightness, contrast adjustment)
  • Error handling: Implement error handling for unreadable or damaged QR codes
  • Result parsing: Process decoded results based on content type (URL, JSON, vCard, etc.)

Common Errors and Solutions

Error: "QR path cannot be empty"

Solution: Provide a valid file path to the QR code image.

Error: "Invalid File Extension"

Solution: Ensure the image file has a .png, .jpg, or .jpeg extension.

Error: "OpenQR" - File not found

Solution:

  • Verify the file path is correct and the file exists
  • Check file permissions and access rights
  • Use absolute paths instead of relative paths
  • Ensure network paths are accessible if using UNC paths

Error: "DecodeFile" - Cannot decode image

Solution:

  • Verify the image format is valid
  • Check if the image is corrupted or incomplete
  • Ensure the image file is not empty
  • Try opening the image in an image viewer to verify it's readable

Error: "Bitmap" - Cannot create binary bitmap

Solution:

  • Check image quality and format
  • Ensure sufficient image resolution (minimum 100x100 pixels)
  • Verify the image contains a valid QR code
  • Try converting the image to PNG format

Error: "DecodeBarcode" - Cannot read QR code

Solution:

  • Verify the image contains a valid QR code
  • Check image quality and resolution
  • Ensure the QR code is not damaged, obscured, or partially visible
  • Improve image contrast and brightness
  • Remove background noise or artifacts
  • Try cropping the image closer to the QR code
  • Verify the QR code is not too small in the image

QR Code not detected

Solution:

  • Increase image resolution or quality
  • Ensure the entire QR code is visible in the image
  • Remove any overlays, watermarks, or obstructions
  • Improve image lighting and reduce glare
  • Straighten skewed or tilted QR codes
  • Try using the original QR code image instead of a photo
  • Check if the QR code has sufficient quiet zone (white border)

Partial or incorrect decoding

Solution:

  • Use higher resolution images
  • Ensure the QR code is not damaged or degraded
  • Check for image compression artifacts (use PNG instead of heavily compressed JPG)
  • Verify the entire QR code pattern is visible
  • Try rescanning or recapturing the QR code image
  • Use image enhancement tools before decoding

Decoding very small QR codes

Solution:

  • Capture images at higher resolution
  • Use digital zoom or macro photography for physical QR codes
  • Scale up the image before decoding (use image processing nodes)
  • Ensure minimum 150x150 pixel size for the QR code in the image

Result Processing Patterns

Parse JSON Data

// After decoding QR code with JSON content
let qrResult = $.result; // Decoded QR content
let data = JSON.parse(qrResult);
let productId = data.product_id;
let batch = data.batch;
// Use extracted data for further processing

Extract URL Components

// After decoding QR code with URL
let url = $.result; // e.g., "https://example.com/product/12345"
let productId = url.split('/').pop(); // Extract "12345"
// Use product ID for database lookup

Parse vCard Contact

// After decoding vCard QR code
let vcard = $.result;
// Extract email using regex
let emailMatch = vcard.match(/EMAIL:([^\r\n]+)/);
let email = emailMatch ? emailMatch[1] : null;
// Extract phone
let phoneMatch = vcard.match(/TEL:([^\r\n]+)/);
let phone = phoneMatch ? phoneMatch[1] : null;

Parse WiFi Credentials

// After decoding WiFi QR code
let wifi = $.result; // e.g., "WIFI:T:WPA;S:NetworkName;P:Password;;"
let ssidMatch = wifi.match(/S:([^;]+)/);
let passwordMatch = wifi.match(/P:([^;]+)/);
let networkName = ssidMatch ? ssidMatch[1] : null;
let password = passwordMatch ? passwordMatch[1] : null;

RPA Use Cases

  • Inventory management: Scan and process product QR codes for stock updates
  • Event check-in: Validate event tickets by decoding and verifying QR codes
  • Document tracking: Extract document IDs from QR codes on scanned forms
  • Payment processing: Read payment QR codes for transaction automation
  • Access control: Validate entry passes by decoding credential QR codes
  • Asset tracking: Read equipment QR codes for maintenance and location tracking
  • Customer service: Extract support ticket information from QR codes
  • Marketing analytics: Track QR code scans from promotional materials
  • Healthcare: Read patient wristband QR codes for medical record access
  • Shipping automation: Decode package tracking QR codes from labels
  • Food safety: Extract batch and expiry information from product QR codes
  • Authentication: Validate 2FA QR codes or authentication tokens
  • Contact management: Import contact details from business card QR codes
  • Survey collection: Extract survey response IDs from QR code submissions
  • Retail checkout: Read product QR codes for price lookup and inventory management

Best Practices

  • Image preprocessing: Use image enhancement nodes (crop, brightness, contrast) before decoding for better results
  • Error handling: Always implement error handling for unreadable QR codes
  • Result validation: Verify decoded content matches expected format or pattern
  • Type detection: Determine content type (URL, JSON, vCard, etc.) and process accordingly
  • Logging: Log both successful and failed decode attempts for troubleshooting
  • Batch processing: Use loops with error handling to process multiple QR code images
  • Data cleaning: Trim whitespace and validate decoded data before using it
  • Format verification: Check if decoded JSON is valid before parsing
  • URL validation: Verify decoded URLs are properly formatted before using them
  • Security: Validate and sanitize decoded content before executing or storing
  • Retry logic: Implement retry with image enhancement if first decode attempt fails
  • Performance: Process images in parallel when decoding multiple QR codes
  • Archiving: Keep copies of successfully decoded QR code images for audit trails
  • Monitoring: Track decode success rates and identify problematic QR code sources