Turn an n8n URL into a real file.

Import three connected nodes, add one Bearer credential, and capture a public webpage as binary PNG or PDF data. The workflow keeps Chromium outside n8n and keeps the Latchshot key outside the exported JSON.

n8n 2.30.7 verified · Community catalog accepted · Binary file output

Import a workflow that ends in a file.

The starter is deliberately small: a manual trigger, typed capture inputs, and one HTTP Request node. It has no community-node dependency and no embedded credential.

Latchshot n8n starter n8n-website-screenshot.json · 4 nodes · 3,877 bytes
Download v1.0.1

SHA-256 b1b0b7a5af9f5349dac692589f4cf22f7ea2e67054e24a8b88c574331c52d03f

The public MIT repository contains the same workflow, a dependency-free validator, and passing CI for both main and immutable tag v1.0.1. The production-hosted copy remains byte-for-byte identical.

Accepted community copy

A maintainer merged the checksum-verified workflow into the third-party Awesome n8n Templates catalog. That is a community distribution path, not an official n8n Marketplace listing or evidence of adoption.

  1. In the n8n workflow editor, choose Import from File and select the downloaded JSON.
  2. Open Capture public page. Under Generic Credential Type → Bearer Auth, create or select the Latchshot credential described below.
  3. Open Set capture input and replace https://example.com with one public page you are authorized to capture.
  4. Run the workflow. Open the final node's binary output and download capture, or connect a file-capable destination node.

Let n8n own the secret.

Create an n8n Bearer Auth credential and paste only the token beginning with ls_live_. n8n constructs the complete Authorization: Bearer … header at execution time.

HTTP Request settingValueWhy it matters
AuthenticationGeneric Credential TypeUses n8n's credential store instead of a node field
Generic Auth TypeBearer AuthMatches Latchshot's HTTPS Bearer contract
Tokenls_live_…Paste only the token; do not add the word Bearer
Credential sharingOnly required projectsLimits which workflows can invoke the renderer
The download contains no credential object.

Importing it cannot create or overwrite a secret. The first execution stops with Credentials not found until a Bearer credential is selected intentionally.

Keep the request typed and bounded.

The Edit Fields node gives the HTTP expression numbers and booleans rather than ambiguous strings. The starter sends this object to the production renderer:

Capture public page · JSON body expressionHTTP Request 4.4
={{ {
  url: $json.url,
  kind: 'screenshot',
  format: 'png',
  width: $json.width,
  height: $json.height,
  fullPage: $json.fullPage,
  delayMs: $json.delayMs
} }}
InputStarterProduction bound
urlhttps://example.comPublic HTTP(S), port 80 or 443, no URL credentials
width1440320–2560 CSS pixels
height900240–1440 CSS pixels
fullPagefalseBoolean; document height remains safety-limited
delayMs2500–3000 milliseconds after page readiness

The HTTP node uses a 45-second client timeout around Latchshot's shorter bounded render deadline. Its response format is File, and Put Output in Field is capture.

Route the binary field, not base64 text.

A successful execution adds binary.capture to the n8n item. The field has the response MIME type, file extension, generated filename, and byte count. Select capture wherever a downstream node asks for its input binary field.

  • Store it in an object-storage or drive node for report history.
  • Attach it through an email or chat node for a bounded notification workflow.
  • Pass it to a document, image, or vision step that explicitly accepts binary input.
  • Keep execution-data retention appropriate for the pages being captured; n8n can retain binary execution artifacts according to instance settings.

The production verification returned an actual 17,883-byte, 1440 × 900 PNG in binary.capture. It did not return a temporary download URL or inflate the JSON item with base64.

Change the same node for PDF.

Keep Response Format → File. Replace the HTTP body expression with the PDF contract and rename the binary field to document if that makes the downstream mapping clearer.

PDF body expressionA4 portrait
={{ {
  url: $json.url,
  kind: 'pdf',
  format: 'pdf',
  paper: 'A4',
  landscape: false,
  delayMs: $json.delayMs
} }}

paper accepts A4, Letter, or Legal. PDF renders use print layout and ignore screenshot viewport output dimensions. Use the URL-to-PDF guide for print CSS and pagination details.

Retry transport failures, not bad inputs.

Use n8n's error output or a dedicated recovery branch. Keep attempts bounded so a failing batch cannot fill the render queue.

ResponseMeaningWorkflow action
400Invalid option or blocked targetFix or reject the item; do not retry unchanged
401Missing, revoked, or invalid keyStop and repair the credential
429Minute rate or monthly successful-render limitRead the reset headers; delay or stop the batch
503Bounded queue unavailableRetry at most twice with increasing delay
504Page exceeded the render deadlineRetry once only if the target is known to be transient

For larger batches, make a separate authenticated GET /v1/usage request before the loop. Only successful renders consume quota; failed direct requests do not.

Keep private pages with a local browser.

Latchshot is for public-page artifacts. It rejects private, loopback, link-local, special-use, mixed public/private DNS, credential-bearing, and non-web-port destinations before and during navigation.

  • No cookies, login sessions, arbitrary headers, custom scripts, clicks, or form workflows.
  • No CAPTCHA solving, residential proxies, anti-bot bypass, or private-network access.
  • The target page can observe a browser visit from Latchshot infrastructure.
  • The n8n instance retains workflow inputs, credentials, and execution artifacts according to its own configuration.

Use a browser inside the n8n network when the workflow requires authenticated or internal pages. Use Latchshot when the input is a public URL and the desired output is a bounded screenshot or PDF.

Verified against the current stable image.

The starter was imported into n8n 2.30.7 from the official image digest sha256:23a26975c21aa6f7113286668b35e2831ec898d3a7fbfa1ac8ff16f1bdf88c37. With no credential, execution stopped at the HTTP node with Credentials not found. With a disposable Bearer credential, the same workflow completed successfully and produced a valid 17,883-byte PNG at 1440 × 900 in binary.capture.

Repository runs 29699977334 and 29699981297 pass the exact node, connection, credential-handoff, binary-output, and secret-absence checks. The release asset is 3,877 bytes and GitHub reports the same SHA-256 shown above.

The disposable key was revoked after that one render. This verifies import, expression evaluation, Bearer authentication, binary-file handling, and the production endpoint. The separate community-catalog merge verifies third-party acceptance, not an external install, customer adoption, or an official n8n Marketplace listing.

Start with 100 successful renders each month.

The Free plan renews every UTC calendar month and needs no card. Launch is $19 for 2,500 successful renders, Build is $49 for 12,000, and Scale is $149 for 50,000. Automatic overages are disabled.

Start with one fixed URL, inspect the binary result, then connect dynamic input and a destination. Do not turn on a schedule until the single-item path is correct.

Import the first file-producing run.

Download the secret-free workflow, select a Bearer credential, and verify one public URL before adding storage or a schedule.

Open release