Label Server & Hotfolder Automation Tutorial
Configure Label Server and hotfolders for file-driven label production with validation, queue visibility, retry, archive folders and operator-safe automation.
Purpose
Label Server is the automation layer around Label Studio Creator. It receives files or API requests, validates the job, creates queue entries, and routes the work to print/export/RIP workflows while keeping logs and archives.
Hotfolders are the simplest automation entry point: an ERP, e-commerce system, WMS or operator drops a CSV/JSON/XML job file into a watched folder. The server processes it without manual design work.
1. Choose the automation entry point
| Entry point | Use when | Typical source |
|---|---|---|
| Hotfolder CSV | Simple batch jobs with tabular records. | ERP export, e-commerce orders, spreadsheet. |
| Hotfolder JSON | Structured job tickets with template, printer, quantity and variables. | Web shop, WMS, custom integration. |
| REST API | Real-time integration with another application. | ERP/WMS/web platform. |
| Webhook | External system sends an event when an order is ready. | Shopify/WooCommerce middleware, MES. |
| Manual queue import | Operator wants automation validation without unattended watching. | Local production station. |
2. Prepare the workspace folders
A robust hotfolder is more than an input directory. Every job needs a clear destination depending on outcome.
input/: new jobs waiting to be picked up.processing/: temporary location while a job is being parsed.done/: completed job files and output references.error/: failed jobs with diagnostic report.logs/: operational logs and audit records.archive/: retained job snapshot for reprint and traceability.
3. Define a job ticket
A hotfolder file should describe the job explicitly. Avoid relying on folder name conventions alone.
| Field | Example | Required? |
|---|---|---|
| template | labels/product_60x40.lsc | Yes |
| records | orders/order_1042.csv or embedded JSON records | Yes for variable data |
| printerProfile | oki_pro1050_clear_pp, epson_cw_matte | Yes |
| outputRoute | queue, print, pdf, rip-package | Yes |
| quantity | 250 | Yes |
| proofId | PF-2026-0042 | Required when proof lock is enabled |
4. Validate before printing or exporting
Automation should run the same checks a careful operator would run manually. Failed jobs should go to error/ with a readable report.
| Gate | Blocks when |
|---|---|
| Template exists | Missing template, wrong version, not approved. |
| Data fields | Required values missing, malformed date, duplicate serial, invalid quantity. |
| Barcode / QR | Invalid GS1 AI, bad check digit, too small quiet zone. |
| Proof approval | No approved BAT, refused proof, stale proof ID. |
| Inventory | Media stock below required quantity plus setup waste. |
| Printer route | Unknown printer/media profile, unavailable queue, RIP bridge offline. |
5. Decide queue mode versus direct mode
For new integrations, send all hotfolder jobs to the production queue first. Once the process is proven, selected templates can be allowed to print/export automatically.
- Queue mode: creates job ticket, waits for operator release.
- Hold after preflight: useful for proof-sensitive or expensive media jobs.
- Direct export: safe for repeatable PDF/RIP package generation.
- Direct print: reserve for fully validated stable jobs.
6. Monitor logs, retry and archive
| Operator action | Use when | Expected result |
|---|---|---|
| Retry | Temporary printer, RIP, file lock or network error. | Same job ticket re-runs with same snapshot. |
| Cancel | Wrong order, invalid customer data, duplicate job. | Job is marked cancelled and archived for audit. |
| Reprint | Damaged labels, missing quantity, repeat of accepted job. | Reprint uses archived job data, not retyped input. |
| Move to error | Validation failed and cannot be fixed automatically. | Original job and error report are retained. |
7. Common errors and fixes
| Symptom | Likely cause | Recommended fix |
|---|---|---|
| Job stays in input folder | Server not running, wrong folder path or permissions. | Check server status, watched path and OS permissions. |
| Job moves to error immediately | Malformed CSV/JSON or missing required field. | Open error report, fix schema and resubmit a new file. |
| Job prints with wrong template | Template mapping not explicit or stale SKU mapping. | Require template ID in job ticket and validate version. |
| Duplicate labels printed | File copied twice or retry created a new job instead of retrying same job. | Use job IDs and idempotency checks. |
| Error file has no useful information | Logging too shallow. | Log template, record, validation step, printer route and exception. |
| Direct print wastes media | Automation enabled before physical validation. | Return to queue/hold mode and require sample approval. |