How to auto-print Airtable PDFs and labels
Print a PDF or label from an Airtable automation by calling your script or a webhook. No PrintBase Airtable app is included.
For Operations teams who keep jobs in Airtable and print from a record
Overview
Airtable automations can run a script or call a webhook when a record enters a view, for example when Status becomes Ready to print. PrintBase is not an Airtable extension. The script or your webhook endpoint performs the print.
Generate the label PDF in the script, or have your server generate it from the record fields. Send content_type pdf, or raw ZPL if you built ZPL. The printer_code can live in the record if each row names a station, as long as the API key does not.
Idempotency-Key should be the record id plus the print revision. Editing the address and printing again is a new revision, not a retry.
Integration steps
- 01
Trigger on a view, not on every edit
Print when a checkbox or status flips, or you will print on every keystroke sync.
- 02
Keep the API key in the script secret or your server
A shared base is readable by collaborators. Do not put the key in a formula field.
- 03
Build PDF or ZPL from the fields
Address lines, barcode value, copies. Match content_type to that payload.
- 04
POST the job
Include printer_code. If the base has many sites, store the code on the site record.
- 05
Write the job id back to the record
A field your team can read when the printer was offline. Use POST /v1/print-jobs with Authorization: Bearer and the printer_code from GET /v1/printers.
Node.js
// Endpoint an Airtable automation webhook can call
const res = await fetch('https://api.printbase.cloud/v1/print-jobs', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PRINTBASE_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': `airtable:${recordId}:${revision}`,
},
body: JSON.stringify({
printer_code: Number(process.env.PRINTER_CODE),
content_type: 'pdf',
content: pdf.toString('base64'),
copies: 1,
}),
});
if (!res.ok) throw new Error(`PrintBase ${res.status}: ${await res.text()}`);
const job = await res.json();
// { id: "job_abc", status: "queued" }
Details for this setup
PDF path for an Airtable label
Use content_type pdf and exactly one of content (standard base64) or content_url (an http or https URL the agent can download). A private file must be fetched by your server and sent as base64, or exposed as a short-lived URL. On Windows the agent asks a PDF app to print to the named queue; if none is registered, the failure text names Adobe Reader or SumatraPDF as examples. macOS and Linux use lp.
Scripting fetch is server-side in automations
An automation script can call HTTPS. A formula cannot. Do not try to print from a button field that only opens a URL without a backend.
Questions
Is there an Airtable app?
No. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.
Can each record choose a printer?
Yes. Send the printer_code you stored for that site. Invalid codes fail the request.
The PDF barcode will not scan.
Thermal printers do better with raw ZPL or TSPL than with a tiny PDF barcode. Send raw if you can generate the printer language.
Collaborators can see secrets?
Put the key in the automation secret or outside Airtable. Assume base data is visible to editors.
Free plan: 100 jobs a month on one computer, no card.