PDF Generator API
DocumentsGenerate transactional PDF and HTML documents by merging JSON data into browser-editable templates with PDF Generator API, covering the full template lifecycle. Agents produce per-record documents that non-developers can restyle.
What This Integration Enables
PDF Generator API is the connector that treats a template as a versioned artifact rather than a file. It covers the whole lifecycle: create a template, open the drag-and-drop editor in a browser through a short-lived URL, list the saved versions with their checksums and authors, and promote one of them to production. It also does the ordinary work of merging JSON into a template and returning a PDF or HTML document, synchronously, in batch, or as a queued job with a callback. On top of that sit the utilities you eventually need in a real document pipeline: watermarking, encryption, size optimization, HTML and URL conversion, PDF to image rasterization, and reading and filling interactive form fields. Authentication is a short-lived signed token scoped to a workspace identifier your application controls, which is what makes the multi-tenant model work.
That workspace model is the reason to pick this connector over a simpler renderer. You can hold a set of organization default templates, copy one into a customer's workspace, and hand that customer the editor so they restyle their own documents without touching yours. For an agency or a services firm running documents on behalf of many clients, that is the difference between one template per client maintained by you and one workspace per client maintained by them. The trade is that design authority moves outward, and design authority over a transactional document is authority over what a customer reads. This connector gives FlowRunner agents the version and promotion actions needed to put a checkpoint exactly there.
Without FlowRunner
With FlowRunner
Use Case Scenarios
A client restyles their own invoice, and it still gets proofed
A client's billing manager opens their invoice template through Open Template Editor, which returns a short-lived URL that can be embedded directly in the client portal, and adjusts the layout. The agent notices a new saved version through List Template Versions, renders a sample with Generate Document against that specific version ID using a real recent invoice, and puts the current production output and the candidate output in front of the account owner. Nothing about the promotion is automatic. The client did the design work themselves, which is the point of the drag-and-drop editor, and the promotion still passes through a proof.
Onboarding a new client into an isolated workspace
A new account closes in Salesforce. The agent calls Create Workspace with an identifier it can reproduce for that client, then Copy Template to place the organization's default invoice, statement, and receipt designs into the new workspace. Get Workspace confirms the workspace exists before anything is copied into it. From that point the client's documents render from their own templates, and the organization defaults stay untouched no matter what the client edits.
Statement runs with delivery controls
A monthly statement run queues each document through Generate Document Asynchronously with a callback URL, because a long statement will outrun a synchronous request. The agent tracks completion with Get Async Job Status, which also distinguishes a failed render from a failed callback delivery. Statements that contain balances are passed through Encrypt PDF with a user password before they leave, and drafts that go out for internal review get a DRAFT stamp through Add PDF Watermark so an unapproved statement can never be mistaken for a final one. Delivery confirmations post to Slack, and Delete Stored Document clears the hosted copies once the retention window closes rather than waiting for automatic expiry.
Human-in-Loop Highlight
Promote Template Version is the operation this page is really about. Only one version can be in production at a time, promoting a new one replaces the previous production version, and every subsequent Generate Document call that does not name an explicit version ID renders against whatever is now in production. A single promotion therefore changes every invoice, statement, and contract that template produces from that moment forward, including the ones generated tonight by a scheduled job nobody is watching. So the agent will not promote on its own. It renders a sample against the candidate version, then asks the template owner directly: "Version 14 of the Invoice template was saved by Dana Reyes two hours ago. Here is the same invoice rendered against production version 12 and against version 14. The remit-to block moved and the tax line label changed. Promote 14 to production, or keep 12 and leave 14 available for explicit use?" That question names a person, a checksum, and a visible difference, and it is asked before the change takes effect rather than after a customer notices. This is what human-in-the-loop looks like when it is aimed at the right operation: not a review queue on every rendered document, but one decision at the point where a single call changes all of them. The same reflex applies to Delete Template and Delete Workspace, both of which are permanent and both of which take a client's documents with them.
Agent Capabilities
32 actionsTemplate Lifecycle
9- List Templates Returns a paginated list of templates available to the workspace, including templates shared across the organization, filterable by name, tags, and access type. Used to resolve a template ID before generating anything.
- Get Template Returns the complete configuration of a single template including its layout, pages, components, and data settings. Fetch this before an update, because updates replace the whole configuration rather than merging into it.
- Create Template Creates a template in the workspace resolved from the connection credentials. Supply a full definition to create a ready-made design, or supply only a name to create an empty template a person will finish in the editor.
- Update Template Replaces the configuration of an existing template. The supplied definition must be complete, so the safe pattern is to fetch with Get Template, modify the object, and send the whole thing back.
- Copy Template Copies a template into a workspace. This is the standard way to give an end user their own editable copy of an organization default rather than editing the shared original.
- Delete Template Permanently removes a template from the workspace. Only templates the workspace owns can be deleted, and the deletion cannot be undone, so ownership is worth verifying first.
- Get Template Data Fields Returns the structured set of data fields a template references. Used to discover which JSON keys the template expects before merging, or to build a sample payload for a proof render.
- Import Template From PDF Creates a template from an existing PDF supplied as a public URL or a base64 string. The imported document becomes an editable template, which is how a legacy form gets pulled into the pipeline without being rebuilt.
- Browse Template Library Returns publicly available templates from the vendor's library, each with a preview image and sample data. Used to offer ready-made designs as a starting point for a new workspace.
Editing and Versions
3- Open Template Editor Returns a unique short-lived URL that opens the drag-and-drop editor for a template, optionally preloaded with sample data so the preview renders with real values. The URL can be embedded, which is how an end user edits their own template inside your product.
- List Template Versions Returns saved versions of a template with each version's checksum, the user who saved it, and which version is currently promoted to production. This is the audit trail for template change.
- Promote Template Version Promotes a saved version to production so generation without an explicit version ID uses it. Only one version is in production at a time and promoting replaces the previous one, which makes this the highest-consequence action in the connector.
Document Generation
4- Generate Document Merges a single template with a JSON data set and returns the finished document as PDF or HTML, delivered as a base64 string, a hosted public URL, a viewer URL, or stored directly into FlowRunner file storage.
- Generate Documents In Batch Merges several templates with their own data sets in one request and returns a single combined document. Used for multi-part outputs such as an invoice followed by terms, or the same template repeated across a list of records.
- Generate Document Asynchronously Queues a generation job, returns a job ID immediately, and posts the finished document to a callback URL. Used for documents large enough to outrun a synchronous request.
- Get Async Job Status Returns the status of a queued generation job. The statuses distinguish a job still running, a finished document, and a failed callback delivery, which means a flow can tell a render failure apart from a delivery failure.
Document Storage
3- List Stored Documents Returns a paginated list of generated documents held in document storage, filterable by template and creation date, with each entry showing when its public URL expires.
- Get Stored Document Returns the public URL and metadata of a single stored document by its public ID.
- Delete Stored Document Permanently removes a document from storage ahead of its automatic expiry. Used to honour a retention rule once the document has reached its recipient.
Conversion
3- Convert HTML To PDF Renders an HTML string into a PDF with configurable paper size and orientation. Used for ad-hoc documents assembled inside a flow that do not justify a stored template.
- Convert URL To PDF Fetches a publicly reachable web page and renders it as a PDF. The page must load without authentication, because it is fetched server-side.
- Convert PDF To Image Rasterizes PDF pages into PNG or JPEG images at a chosen quality and resolution, optionally limited to a page range. Used to produce previews and thumbnails for review steps.
PDF Utilities
6- Add PDF Watermark Stamps a text watermark, an image watermark, or both onto every page, with control over position, rotation, colour, size, and opacity. Used for DRAFT stamps and branded overlays.
- Encrypt PDF Password protects an existing document. The owner password governs permission changes and the optional user password is required to open the file, which is the usual choice for anything emailed to a customer.
- Optimize PDF Recompresses a PDF to reduce its size. Used before emailing or archiving documents built with high-resolution imagery.
- Extract PDF Form Fields Reads the interactive form fields of a PDF and returns each field with its type, current value, lock state, and page placement. Run this before filling, to learn the exact field keys.
- Fill PDF Form Fields Populates the interactive form fields of an existing PDF with supplied values and returns the completed document. The keys must match those returned by the extraction step.
- Generate QR Code Creates a QR code image from text or a URL, optionally tinted and overlaid with a logo. Used to embed scannable payment or tracking links into a generated document.
Workspaces
4- List Workspaces Returns every workspace in the organization with its identifier and whether it is the master workspace. Templates are scoped per workspace, so this is the entry point for a multi-tenant setup.
- Get Workspace Returns a single workspace by identifier. Used to confirm a tenant workspace exists before copying templates into it.
- Create Workspace Creates a regular workspace under the organization using an identifier your application controls. Choose one you can reproduce for the same end user, because it is the value signed into the token that scopes template access.
- Delete Workspace Deletes a regular workspace together with the templates it owns. The organization's master workspace cannot be deleted, and the operation cannot be undone.
Frequently Asked Questions
What can FlowRunner do with PDF Generator API?
FlowRunner agents can run List Templates, Get Template, and Create Template in PDF Generator API, plus 29 more actions.
Does connecting PDF Generator API to FlowRunner require OAuth?
PDF Generator API uses a custom authentication method to connect to FlowRunner.
Can PDF Generator API trigger a FlowRunner workflow automatically?
PDF Generator API doesn't currently expose triggers in FlowRunner. It connects as an action step inside workflows started by another trigger.
Start building with PDF Generator API
$100 in credits. No card required. Connect in minutes.