PDF Print
Available from the first paid AutoFlow plan onward.
Use the PDF Print trigger when you want a flow to react every time Business Central produces a PDF for a specific report – for example, to stamp a watermark, attach company stationery, archive the file to a network share, or send a copy by email. The flow runs synchronously inside the print pipeline and can either let Business Central keep the original PDF or replace it with a modified version.
Typical examples include:
- Adding a "DRAFT" watermark to invoices that haven't been signed off.
- Overlaying company letterhead on every printed sales order.
- Mirroring a copy of each printed PDF to a SharePoint folder.
- Logging a record of every printed invoice in an external archive.
What happens when the flow runs
- A user prints, saves, downloads, previews or schedules a PDF report from Business Central. The flow fires for any of these intents (the configured report is the filter; the action that produced the PDF is exposed as the
Intentoutput so the flow can branch on it). - AutoFlow loads the configured report and, if its output is a PDF (Excel and Word exports are ignored), starts the flow.
- The flow runs to a Return PDF step. If it reaches one, the base64-encoded PDF from that step replaces the original document. If it finishes without one – or errors, or exceeds the configured Timeout – Business Central keeps the original PDF.
- Each invocation is logged as a standard AutoFlow execution. The full report payload (
ObjectPayload) is recorded so you can audit what was printed; the document bytes themselves are not stored to keep the log compact.
Trigger configuration
- Report ID – pick the report whose PDF outputs should fire this flow. One published flow per report; publishing a second flow for the same report fails fast.
- Timeout (sec) – how long the flow may run before Business Central falls back to the original PDF. Default 30 s. This is the user-perceived wait time on the print thread, so keep it as short as the flow allows.
Trigger outputs
The flow body has six outputs to work with:
| Output | Description |
|---|---|
ObjectPayload | The full report payload as JSON text (report id, layout, filter views, intent, run id, ...). Pass through a Parser step if you need a deeper field. |
DocumentStream | The original PDF, base64-encoded. Bind this to the Return PDF step's input if you want to pass the document through unchanged, or feed it to an HTTP Request step that transforms it. |
ReportId | The report's object id (e.g. 1306). |
DocumentType | The MIME type of the document. Currently always application/pdf for triggered runs. |
LayoutName | The selected report layout's name. |
Intent | What the user did – one of Print, Preview, Save, Download, Schedule. Useful if you only want to act on actual prints. |
Example flow
A watermarking flow for the Standard Sales Invoice report:
- When a PDF is printed – Report ID
1306. - HTTP Request –
POST{{TriggerOutputs.DocumentStream}}to your watermarking service. The response is the watermarked PDF, base64-encoded. - Return PDF – Document =
{{HttpResponse.body}}.
When a user prints the invoice, the printed PDF carries the watermark. If the watermarking service is slow, hits an error, or doesn't respond within Timeout, the original invoice prints unchanged – the user never sees a failure.
When the flow doesn't fire
- The report's output isn't a PDF (Excel, Word, or other formats).
- A different subscriber already produced a modified PDF and set
Success = true. AutoFlow respects that and exits. - The configured Report ID doesn't match the report that was just printed.
- The tenant's licence no longer includes the PDF Print trigger (gate is enforced both when you publish the flow and again at runtime in case the licence later changes).