How to auto-print a PDF from Zapier
Zap a PDF to a local printer with Webhooks by Zapier or a Code step. There is no PrintBase Zapier app; the step is an HTTP POST.
For People connecting a Zap to a printer without writing a full backend
Overview
Zapier can POST JSON. PrintBase does not publish a Zapier app, so the step is Webhooks by Zapier or a short Code step. The Zap holds the API key as a secret. The printer still needs the agent on a computer in the building.
The body is the print-jobs JSON: printer_code, content_type pdf, and either content (base64) or content_url. Many Zaps already have a file URL. Use content_url only when that URL is publicly fetchable by the agent. Zapier file objects that require Zapier's auth should be downloaded in a Code step and sent as base64.
Set Idempotency-Key to the Zap's input id so a Zap replay does not print twice. A person clicking reprint in your process should change the key.
Integration steps
- 01
Catch the file in the Zap
Email, form, Shopify, or a drive file. Identify the PDF bytes or URL.
- 02
Store the API key in Zapier
Use a secret field. Do not put the key in a visible action log if you can avoid passing it through a task history you share.
- 03
POST /v1/print-jobs
Custom request, Bearer header, JSON body, Idempotency-Key header.
- 04
Branch on status code
2xx returns a job id. 4xx is a bad payload. Do not treat a Zap success filter on the wrong field as printed paper.
- 05
Optional: GET the job
A later step can poll the job id. Paid PrintBase plans can also webhook your URL when the job completes.
curl
# Webhooks by Zapier custom request for a public PDF URL
curl -X POST 'https://api.printbase.cloud/v1/print-jobs' \
-H "Authorization: Bearer $PRINTBASE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{
"printer_code": '"$PRINTER_CODE"',
"content_type": "pdf",
"content_url": "https://example.com/files/ticket.pdf",
"copies": 1
}'
Details for this setup
PDF path for a PDF arriving in a Zap
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.
No native Zapier app
You will not find a PrintBase trigger or action to install. The HTTP step is the integration. The same is true of Make.
Questions
Can the Zap print ZPL?
Yes. content_type raw and base64 ZPL. The sample above is the PDF form.
The file URL works in my browser but not on the printer.
Your browser has cookies. The agent does not. Send base64. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.
Zapier replayed the task.
Same Idempotency-Key and same body returns the original job. If Zapier changes the body, you get HTTP 409.
Is the free plan enough to test a Zap?
100 jobs a month on one computer, no card. Enough to prove the path.
Free plan: 100 jobs a month on one computer, no card.