Create PDF From URL
apitemplate.create_pdf_from_url
ActionBusiness appsconnection required
Calls the APITemplate.io API with the connection's credentials.
Load a public web page in a browser and render it as a PDF.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- APITemplate.io
- Secret shape
- the API key, or {"api_key": "…"}
- Config it needs
- base_url
- Resolved by
- config.connection_id, else node.connection_id
Configuration
7 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
url The page APITemplate.io should load and print to PDF. | string | Yes | — | url format | https://example.com/report |
settings PDF print settings such as paper_size, orientation, margins and custom_header. | object | No | — | — | {"margin_top":"40","orientation":"1","paper_size":"A4"} |
export_type How the result comes back: 'json' stores the file on APITemplate's CDN and returns a download_url, 'file' returns the document itself and stores nothing. | string | No | json | one of "json", "file" | — |
output_format What to render the template as. Leave blank for APITemplate's default, a PDF. | string | No | — | one of "pdf", "html", "png", "jpeg" | — |
filename Name for the generated file, ending in the right extension. Defaults to a UUID. | string | No | — | — | invoice-89326.pdf |
expiration Minutes before APITemplate deletes the file from its CDN. 0 keeps it permanently. | number | No | — | 0–10080 | — |
meta Your own reference for this render; it comes back on apitemplate.list_objects. | string | No | — | — | inv-iwj343jospig |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"export_type": "json",
"filename": "invoice-89326.pdf",
"meta": "inv-iwj343jospig",
"settings": {
"margin_top": "40",
"orientation": "1",
"paper_size": "A4"
},
"url": "https://example.com/report"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
status APITemplate's own verdict for the render: 'success'. | string | — |
download_url URL of the generated file on APITemplate's CDN; empty when export_type is 'file'. | string | — |
template_id The template that was rendered. | string | — |
total_pages How many pages the generated PDF has. | number | — |
transaction_ref APITemplate's reference for this render; pass it to apitemplate.delete_object. | string | — |
post_actions Results of any configured Post Actions, such as an upload to your own S3 bucket. | array | — |
file_content The file, base64-encoded. | string | — |
content_encoding | string | base64 |
filename | string | app-main.zip |
content_type | string | application/zip |
size Raw size in bytes (before base64). | number | — |
{
"content_encoding": "base64",
"content_type": "application/zip",
"download_url": "",
"file_content": "",
"filename": "app-main.zip",
"post_actions": [],
"size": 0,
"status": "",
"template_id": "",
"total_pages": 0,
"transaction_ref": ""
}Notes
- Every render spends one of the account's API credits; apitemplate.account_information reports how many are left.
- With export_type 'json' the file is stored on APITemplate's CDN and the node emits a download_url; with 'file' nothing is stored and the node emits the file itself.
- APITemplate loads the URL from its own servers, so a page behind a login or a firewall will not render; its outbound IPs are listed in the API reference.
See Create PDF From URL run in a workflow.
In a technical demo we add the APITemplate.io connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.