Browserless icon

Browserless

Interact with Browserless API

Actions5

Overview

The node interacts with the Browserless API to render web pages as PDFs. It takes a target URL and various browser and rendering options, then generates a PDF representation of the page at that URL. This is useful for automating the creation of PDF documents from web content, such as generating reports, invoices, or snapshots of dynamic web pages.

Common scenarios include:

  • Archiving web pages in PDF format.
  • Creating printable versions of online content.
  • Automating report generation from dashboards or analytics pages.
  • Capturing styled content for offline viewing or sharing.

Example: Given a URL of an invoice page, the node can produce a PDF file of that invoice with custom browser settings like viewport size or authentication headers.

Properties

Name Meaning
URL The web address of the page to render into a PDF.
Image Options (Shown for screenshots and PDFs) Settings related to image capture, including clipping region (x, y, width, height), encoding type (Base64 or binary), full page capture toggle, background omission, quality, and image type (jpeg/png).
Browser Options Controls browser behavior such as blocking ads, running headless, ignoring HTTPS errors, stealth mode to avoid bot detection, user data directory for session persistence, tracking ID, keep-alive duration, and command-line flags.
Additional Options Extra HTTP headers, scripts, styles, authentication credentials, cookies, navigation options (timeout, wait conditions), request rejection patterns/types, request interceptors, user agent string, JavaScript enablement, and viewport configuration (device scale, touch support, dimensions, orientation, mobile emulation).

Output

  • The node outputs the rendered PDF as binary data under the binary.data field.
  • The json output is empty ({}) since the main content is binary.
  • This binary data can be used downstream in workflows to save as a file, send via email, or upload to storage.

Dependencies

  • Requires access to the Browserless API service endpoint.
  • Needs an API key credential configured in n8n for authentication with Browserless.
  • No other external dependencies are indicated.

Troubleshooting

  • Common issues:

    • Invalid or unreachable URL: The node may fail if the URL is incorrect or the server is down.
    • Authentication failures: If HTTP basic auth or API keys are misconfigured, requests will be rejected.
    • Timeout or slow loading pages: Adjusting the "Goto Options" timeout or waitUntil parameters may help.
    • Resource blocking or interception misconfiguration could prevent page elements from loading correctly.
  • Error messages:

    • Network errors or timeouts typically indicate connectivity or server issues.
    • Authentication errors suggest invalid credentials or missing permissions.
    • Parsing or rendering errors might occur if injected scripts/styles are malformed.
  • Resolutions:

    • Verify URLs and network accessibility.
    • Double-check authentication details.
    • Increase timeouts or adjust wait conditions.
    • Review additional options for correctness.

Links and References

Discussion