Help

Webhooks: setup and what Browsermatic sends

For the person setting up the app, and whoever builds the receiving end: an n8n workflow, a Zapier Zap, a Make scenario, or your own server.

Set it up in the app

  1. Ask whoever manages the receiving workflow for its production webhook address. Decide whether it needs the file or only the document's details. Documents and their names can contain customers' personal details; choose the destination with that in mind.
  2. Open Settings › Webhooks › Add webhook. Enter a name and the address. Leave Send the document itself on only when the receiver needs the file.
  3. If the receiver checks a secret header, open Advanced and enter the matching Header name and Header value. The receiver must refuse a missing or wrong value.
  4. Use Send a test and check the receiving workflow. This sends a made-up test document when file sending is on. It is a single request, outside History and automatic retries.
  5. Choose the destination in the document rule's Advanced › Also do. It works with a print rule or a save-only rule. Adding a webhook alone does not attach it to a rule.
  6. Catch a real document from your website and check its separate webhook card in History. Printing and sending run separately, so a server problem doesn't hold up a label.

The app sends a caught document, not a notice that it printed. A successful response says only that the receiving endpoint accepted it; check the email, file or other work at that end. One rule chooses one webhook.

The request

One POST per caught document, as multipart/form-data with a Content-Length (never chunked).

HeaderValue
X-Browsermatic-Eventdocument.captured, or test for Send a test
X-Browsermatic-DeliveryAn id for this delivery. The same on every retry of it
User-AgentBrowsermatic/<version>
Your own headerOnly if one is set on the webhook, for example X-Api-Key: …

Form fields. Every value is text.

FieldExampleNotes
eventdocument.captured
id8a3b599a-36e2-460e-a8a3-7a7b7b6e92d5The delivery id again
time2026-11-15T03:30:47.120ZWhen the document was caught, UTC
namebox-labels-12345.pdfThe file name the site gave it
sitehttps://shop.example.comThe site it came from. Never the full page address
typeapplication/pdf
size20480Bytes
pages20 when not known
width_mm, height_mm100, 150First page; 0 when not known
sha25662cca6…Of the file. Absent when not known
ruleFilename contains “box-contents”The rule that matched. Absent in a test
actionprint or saveWhat the rule does with the document besides sending it
printerPacking bench printerOnly when the rule prints
devicePacking bench tablet"Name of this device" in Settings › Webhooks, else the model
app_version0.9.0
data{"event":"document.captured",…}All of the above again as one JSON object, with the numbers as numbers
filethe documentA file part, with the document's name and type. Absent when the webhook has "Send the document itself" off

The request is sent when the rule matches, at the same moment the label goes to the printer. It does not say whether the label printed.

What to answer

Any 2xx means delivered. The app keeps the first 500 characters of the answer and shows them in History. It waits 60 seconds for an answer.

AnswerWhat the app does
2xxDelivered
No connection, timeout, 408, 429, 5xxTries again after 30 seconds, 2 minutes, 10 minutes, then hourly, for 24 hours
Any other 4xxStops at once and shows the status in History
3xxNot followed. Stops, and says the address has moved

A delivery can arrive twice: if the connection drops after your server has the document, the app cannot know, and sends it again. Use the delivery id to drop repeats. "Send again" in History is a new delivery with a new id.

Where the app will send

https:// to anywhere. Plain http:// only to an address on the local network (for example http://192.168.1.20:5678/…), for a server running in the building. A certificate that doesn't check out fails the delivery.

n8n

  1. Add a Webhook node. HTTP Method POST. Leave "Field Name for Binary Data" unset.
  2. Copy its Production URL into the app, and publish (activate) the workflow. The Test URL only works for one call after pressing "Listen for test event".
  3. The fields arrive as {{ $json.body.name }}, {{ $json.body.site }} and so on. The document is the binary property file. The headers are in $json.headers, in lower case.
  4. To require a secret: Authentication › Header Auth, with a header name and value of your choosing, and the same two in the app under the webhook's Advanced. n8n answers 403 when they do not match.
  5. To drop repeats: a Remove Duplicates node straight after the Webhook node, "Remove Items Processed in Previous Executions", on {{ $json.headers['x-browsermatic-delivery'] }}.

We have a starter n8n workflow (email-a-document.json — email support@browsermatic.app for a copy): import it, give the Send Email node an SMTP account and real addresses, and each document arrives as an email attachment. It names the binary attachment property file. Check that option against the version you run. The starter is inactive, uses authentication: none, and has no repeat filter. Before publishing, configure Header Auth, add a durable repeat check using the delivery id, and set real SMTP credentials and addresses. It is a starting point to adapt, not a finished workflow.

What the app shows for n8n's usual answers: 404 means the workflow is not published or the address is the test one; 403 means the header does not match; on n8n Cloud a workflow that answers "when last node finishes" and takes over 100 seconds fails with 524, so answer immediately.

Limits at the receiving end

The request includes fields and multipart overhead as well as the file. Test the largest actual document you expect to send. The app's 50 MB document limit is not a service limit.

ReceiverPublished limit or settingWhat to check
n8nThe general webhook limit is 16 MiB by default. Self-hosted form-data files have a separate default of 200 MiB, set by N8N_FORMDATA_FILE_SIZE_MAXHosting plan, installed version, proxy limits and your actual multipart upload. Limits vary between n8n Cloud and self-hosted setups, so test with a real file
Zapier Catch Hook10 MB for the whole request; Catch Raw Hook is 2 MBPrefer details only until file handling is verified on a live Zap
Make Custom webhook5 MB (5,242,880 bytes), including the whole requestPrefer details only; multipart files need a matching file collection in the data structure
Your own serverWhatever the server, proxy and storage allowParse multipart form-data, enforce authentication and limits, and return promptly

Sources: n8n endpoint settings, Zapier webhook triggers, Make Webhooks.

Secrets, repeats and where documents go

The optional header is a shared secret, not a signature of the request. HTTPS protects the connection; local HTTP does not encrypt the secret or file. The value stays in the app's own storage and is copied in a setup code. Treat that code as a secret too. Imported webhooks stay off until the person enables them.

Anyone who learns an unprotected webhook address can send it made-up requests. Require a secret at the receiver, replace an address or secret that leaks, and keep both out of support reports and screenshots.

Use X-Browsermatic-Delivery to record and reject repeats before sending an email or doing other work.

Browsermatic sends directly to the address you choose, not through a Browsermatic server. You decide where your customers' details go.

Test it

Use sample documents and your own receiving workflow.

  • Send a test: confirm the endpoint accepts it, the fields arrive, and the file arrives only when Send the document itself is on. Test details-only mode too.
  • A real document: choose the webhook on a rule, catch a document from the intended site, and check its name, origin, file, pages and final email or stored copy at the receiving end. Confirm the independent print outcome in History.
  • A wrong secret: change the app's header to a wrong value, then omit it. Both requests must be refused by the receiver, with no email or other downstream work. Restore it and test again.
  • Server off: stop your test receiver, catch another document and confirm printing continues while the webhook card waits and gives a retry time. Restore the server and confirm delivery.
  • A repeat: simulate a lost response after acceptance. The retry has the same delivery id; the receiving workflow must not email or file it twice. Send again deliberately has a new id.
  • Largest expected file: verify the whole request fits the service and proxy limits.
  • Failure handling: check a refused request and a moved address are visible in History. Do not put passwords or document contents in the receiver's error response: its first 500 characters can appear in History.

If something goes wrong later

The messages below are from the app. Names and hosts vary with your setup.

What the app says or what happensLikely causeDo this
No webhook card for the documentNo webhook on the matching rule, destination off, or an Ignore ruleCheck Settings › Webhooks and the rule's Advanced › Also do. Imported webhooks start off
"Waiting to send" with a retry timeNo connection, timeout, 408, 429 or 5xxRead the reason in History. Check the receiver, network and service limits. Automatic deliveries retry for up to 24 hours; Send a test does not
"the server refused the request (401)" or (403)Authentication did not passCheck the receiver's authentication and the app's header name and value, then Send a test and Send again
"the server does not know this address (404)"Wrong address or workflow offCheck the production address and publish the workflow. An n8n Test URL is temporary
"the server said the document is too large (413)"Receiver or proxy limitReduce the file, change the receiver's limit, or send details only; then Send again
"the address has moved"A 3xx redirectEnter the final address. The app does not follow redirects
A connection or certificate errorWrong host, receiver offline, or certificate not trustedCorrect the address, network or server certificate. There is no certificate-error bypass
"is no longer kept on the phone"The retained file was deletedThe app cannot resend that file. Check Downloads or obtain it from the site again
History says sent, but no email or stored fileReceiver accepted the request but its later work failedCheck the receiving service's execution log. A 2xx confirms acceptance, not the later work
The recipient got two copiesRetry or a manual Send again ran the workflow againDeduplicate by delivery id. Send again uses a new id and never prints again