Actions4
Overview
This node captures website screenshots based on a given URL. It allows users to specify viewport dimensions, image format, delay before capture, and whether to capture the full page or just the visible viewport. The node can return the screenshot either as binary data (image file) or as a URL pointing to the image.
Common scenarios include:
- Automatically generating visual previews of web pages.
- Archiving website states at specific times.
- Creating thumbnails for URLs in content management workflows.
- Testing and monitoring website appearance changes.
For example, you could use this node to take a PNG screenshot of a product page with a 1200x800 viewport after waiting 5 seconds for dynamic content to load, then save the image for later use.
Properties
| Name | Meaning |
|---|---|
| URL | The URL of the webpage to capture. |
| Viewport Width | Width of the browser viewport in pixels (100–3000). |
| Viewport Height | Height of the browser viewport in pixels (100–3000). |
| Full Page | Whether to capture the entire scrollable page (true/false). |
| Format | Image format for the screenshot: PNG, JPEG, or WebP. |
| Delay | Delay in seconds before taking the screenshot (0–30). |
| Output | How to return the screenshot data: Binary Data (image file) or URL Only (link to image). |
| Scale Factor | Screen scale factor for high-DPI screenshots (1.0–3.0). |
| Element Selector | CSS selector to capture a specific element instead of the whole page. |
| Transparent Background | Use transparent background (only for PNG format). |
Additional Options (under "Additional Options" collection)
| Name | Meaning |
|---|---|
| Best Format | Automatically select the optimal image format (boolean). |
| Block Ads | Block advertisements on the page (boolean). |
| Block Cookie Banners | Automatically dismiss cookie banners (boolean). |
| Block Trackers | Block tracking scripts (boolean). |
| Bypass Bot Detection | Attempt to bypass bot detection systems (boolean). |
| Dark Mode | Enable dark mode rendering (boolean). |
| Emulate Device | Emulate a specific device (e.g., "iPhone X") for the screenshot. |
| File Name | Custom filename for the saved file (string). |
| Fresh | Force a new capture ignoring any cached images (boolean). |
| HTTP Authentication | HTTP Basic Authentication credentials encoded in base64url (string). |
| Mobile | Emulate a mobile device (boolean). |
| User Agent | Custom user agent string to use when loading the page (string). |
| Wait For ID | Wait for an element with this ID before capturing (string). |
| Wait For Selector | Wait for a CSS selector to appear before capturing (string). |
Output
The node outputs JSON objects containing metadata about the capture operation, including:
url: The URL of the captured image.operation: The operation performed ("screenshot").format: The image format used (png, jpg, webp).viewportWidthandviewportHeight: Dimensions of the viewport.fullPage: Boolean indicating if the full page was captured.
If the output mode is set to Binary Data, the node also outputs the image file as binary data under the binary.data property, with the appropriate MIME type (image/png, image/jpeg, or image/webp). This allows downstream nodes to process or save the image file directly.
If the output mode is URL Only, only the JSON metadata with the image URL is returned, without binary data.
Dependencies
- Requires an API key credential for the external Capture API service.
- The node makes HTTP requests to
https://cdn.capture.pageto perform the capture operations. - No additional environment variables are required beyond the API key and secret.
- Uses internal helper functions to validate URLs, build request URLs, download binary content, and create binary data objects.
Troubleshooting
- Invalid URL error: If the provided URL is malformed or invalid, the node throws an error
"Invalid URL: <url>". Ensure the URL is correctly formatted and accessible. - Unsupported operation error: If an unsupported operation is specified, the node throws
"Unsupported operation: <operation>". Confirm that the operation is set to "screenshot". - API authentication errors: If the API key or secret is missing or incorrect, the node will fail to authenticate with the Capture API. Verify credentials are configured properly.
- Timeouts or delays: If the page takes too long to load or the specified delay is insufficient, the screenshot may not capture the desired content. Adjust the delay or use wait-for selectors to ensure readiness.
- Binary data issues: When outputting binary data, downstream nodes must support binary input. Otherwise, choose the URL output option.
- Format compatibility: Transparent backgrounds are only supported for PNG format; selecting this option with other formats may cause unexpected results.