Actions5
PDF → Render
AI-generatedOverview
The node "Browserless" enables interaction with the Browserless API, which provides browser automation capabilities such as rendering web pages, capturing screenshots, scraping content, executing custom JavaScript functions, and generating PDFs from URLs. This node is useful for automating tasks that require headless browser operations like web scraping, visual testing, PDF generation of web pages, or running scripts in a browser context.
For the PDF Render operation specifically, the node takes a target URL and generates a PDF representation of the webpage at that URL. This is beneficial when you want to programmatically create printable or archivable versions of web content, such as invoices, reports, or articles.
Practical examples:
- Automatically generate a PDF report from a dashboard URL.
- Capture a snapshot of a webpage for offline viewing or archival.
- Convert dynamic web content into a static PDF document for sharing.
Properties
| Name | Meaning |
|---|---|
| URL | The target URL of the webpage to render as a PDF. This is a required string input where you specify the full address of the page to convert. |
| Image Options | (Not applicable for PDF Render operation directly but available for screenshot resource) Options related to image capture such as clipping area, encoding type (Base64 or binary), full page capture, background omission, quality, and image format. |
| Browser Options | Configuration options for the browser session including: whether to block ads, run headless, ignore HTTPS errors, enable stealth mode to avoid bot detection, user data directory path for session persistence, tracking ID, keep-alive duration, and command-line flags for Chromium. |
| Additional Options | Various advanced settings including: HTTP headers to add to requests, scripts or styles to inject into the page, HTTP basic authentication credentials, cookies to set, navigation options like timeout and wait conditions, request interception patterns, user agent string, JavaScript enablement toggle, viewport configuration (screen size, device scale factor, mobile emulation). |
Note: For the PDF Render operation, the main relevant properties are URL, Browser Options, and Additional Options. Image Options are primarily for screenshot operations.
Output
- The output contains a binary field named
datawhich holds the generated PDF file content. - The JSON output is empty (
{}) because the primary output is binary PDF data. - This binary data can be used downstream in workflows to save the PDF file, send it via email, or upload it to storage.
Dependencies
- Requires access to the Browserless API service endpoint (
https://chrome.rowserless.io). - Requires an API key credential for authenticating with the Browserless API.
- No other external dependencies are indicated.
- The node expects proper network connectivity to the target URL and the Browserless API.
Troubleshooting
Common issues:
- Invalid or unreachable URL: The node will fail if the URL is incorrect or the server is down.
- Authentication failure: If the API key credential is missing or invalid, the request to Browserless API will fail.
- Timeout or slow loading pages: If the page takes too long to load, the operation might time out unless configured otherwise in the "Goto Options".
- HTTPS errors: Pages with invalid SSL certificates may cause failures unless "Ignore HTTPS Errors" is enabled.
Error messages:
- Network errors or timeouts usually indicate connectivity issues or misconfigured timeout settings.
- Permission or authentication errors indicate problems with the API key credential.
- Rendering errors may occur if the page uses unsupported features or requires complex interactions not handled by default.
Resolutions:
- Verify the URL is correct and accessible.
- Ensure the API key credential is properly configured and valid.
- Adjust browser options such as enabling headless mode or ignoring HTTPS errors.
- Use additional options to inject scripts or styles if the page requires modifications before rendering.
- Increase timeout values in "Goto Options" if pages load slowly.
Links and References
- Browserless API Documentation
- Chromium Command Line Switches — for understanding possible browser flags
- Puppeteer API — underlying technology similar to Browserless for browser automation