Barcode Generation Script

Copy the script below by clicking the blue box. Once it says “Copied", paste it into your Run script step in Airtable.

let inputConfig = input.config();

// Get variables
let recordId = inputConfig.recordId;
let barcodeValue = encodeURIComponent(inputConfig.barcodeValue);

// Build barcode image URL
let barcodeImageUrl = https://bwipjs-api.metafloor.com/?bcid=code128&text=${barcodeValue}&includetext;

// Update the record to attach the image
let table = base.getTable("Products"); // <-- replace with your table name

await table.updateRecordAsync(recordId, {
"Barcode Image": [
{
url: barcodeImageUrl,
filename: ${barcodeValue}.png
}
]
});


Need help building a solution tailored for you?

If you want a system that matches your specific needs, reach out for a free consultation.