Choose where you’d like to start

QR and Barcode Attributes

Note: This document is applicable only to Zoho Creator.

Overview

QR code and Barcode attributes allow you to retrieve either the encoded data or the barcode image, enabling further processing or integration with external systems.

Attributes

AttributesReturn TypeReturns
input.barcode 
(or) 
input.QR_code
TEXTThe data in the barcode/QR code is associated with the specified record.
input.barcode.file 
(or) 
input.QR_code.file
FILE OBJECTThe barcode Image associated with the specified record. If there is no data, null value will be returned.
 

The input.barcode.file or input.QR_code.file attribute can be used in the following events 

On Success

  • When a record is created
  • When a record is edited
  • When a record is created or edited
  • When a record is deleted

Other Execution Contexts

  • On a scheduled date
  • During the approval process
  • During the payment process
  • Blueprint
  • Report workflows

Example 1: Send QR and Barcode images as email attachments 

In the following example, Barcode images are sent as email attachments using the sendmail task.

Event organizers email barcoded tickets to attendees, allowing quick and seamless check-in by scanning the barcode at the entrance.

// Retrieve the QR code image from input  
qr_code_image = input.QR_Code.file;  
// Define email details  
email_subject = "Ticket for Night Concert";  
email_message = "Hi Amy, your ticket to the most spectacular concert of the year is confirmed!\n" +  
                "Please scan the attached QR code at the entry and carry a valid ID for verification.\n" +  
 "Thank you for joining us—we can’t wait to see you there for an unforgettable experience!"; 
 
// Send the email with the QR code attachment  
sendmail  
[  
    from : zoho.adminuserid  
    to : zoho.adminuserid  
    subject : email_subject  
    message : email_message  
    attachments : file : qr_code_image  
];  

Example 2: Send barcode images to other services using invoke URL 

The following example pushes the QR or Barcode images to the services you're trying to integrate with using invokeURL() task.
Automatically push patient test reports with barcode identifiers to diagnostic systems, enabling seamless retrieval, tracking, and processing of medical records.

// Step 1: Prepare patient report metadata
test_report = Map();
test_report.put("patient_name", "John Doe");
test_report.put("report_id", "TR-12345");
test_report.put("barcode_image_url", "https://example.com/barcode/TR-12345.png");
// Step 2: Format the request with essential report metadata
request_payload = Map();
request_payload.put("patient_name", test_report.get("patient_name"));
request_payload.put("report_id", test_report.get("report_id"));
request_payload.put("barcode_file",input.barcode.file);
// Step 3: Push the report to the diagnostic system along with the barcode identifier
response = invokeUrl
[
    url: "https://api.diagnosticservice.com/v1/reports"
    type: POST
    body: request_payload
    connection: "diagnostic_api_connection"
];
// Step 4: Log the response for audit and debugging
info response;

Related links 

Get Started Now

Execute