Overview
This n8n node uses Puppeteer (with optional stealth mode) to automate browser actions and capture screenshots of web pages. The "Get Screenshot" operation navigates to a specified URL, waits for the page to load (with customizable timing and conditions), and then captures an image of the rendered page. This is useful for:
- Monitoring website appearance or uptime.
- Archiving visual states of web pages.
- Generating thumbnails or previews for links.
- Automated testing of web UI rendering.
Example use cases:
- Take daily screenshots of a dashboard for reporting.
- Capture product pages for e-commerce monitoring.
- Generate images for social media sharing from dynamic content.
Properties
| Name | Type | Meaning |
|---|---|---|
| URL | String | The web address of the page to screenshot. |
| Property Name | String | Name of the binary property in which to store the image data. |
| Type | Options | Image format: PNG, JPEG, or WebP. |
| Quality | Number | Image quality (0–100). Only applies to JPEG and WebP formats. |
| Full Page | Boolean | If true, captures the entire scrollable page; otherwise, only the visible viewport. |
| Wait Before Screenshot | String | Time in milliseconds to wait before taking the screenshot after navigation. |
| Query Parameters | Collection | Additional query parameters to append to the URL. |
| Options > Emulate Device | Options | Emulate a specific device (e.g., mobile, tablet) for the screenshot. |
| Options > Executable path | String | Path to the browser executable for Puppeteer. |
| Options > Extra Headers | Collection | Custom HTTP headers to send with the request. |
| Options > File Name | String | File name to set in the binary output. |
| Options > Launch Arguments | Collection | Additional command-line arguments for the browser instance. |
| Options > Timeout | Number | Maximum navigation time in milliseconds (0 disables timeout). |
| Options > Wait Until | Options | Event that determines when navigation is considered complete (e.g., load, DOMContentLoaded). |
| Options > Page Caching | Boolean | Enable or disable page-level caching. |
| Options > Headless mode | Boolean | Run browser in headless mode (no GUI). |
| Options > Stealth mode | Boolean | Use stealth techniques to avoid detection as a bot. |
| Options > Proxy Server | String | Proxy server configuration for browser traffic. |
Output
Binary Data:
- The screenshot is returned as binary data under the property name specified by "Property Name".
- The MIME type matches the selected image format (e.g.,
image/png,image/jpeg,image/webp). - If a file name is provided, it is included in the binary metadata.
JSON Data:
headers: HTTP response headers from the page load.statusCode: HTTP status code of the page load.
Example output structure:
{
"binary": {
"data": {
"data": "<Buffer ...>",
"mimeType": "image/png",
"fileName": "screenshot.png"
}
},
"json": {
"headers": { /* ... */ },
"statusCode": 200
}
}
Dependencies
- External Services/Dependencies:
- Requires internet access to reach the target URL.
- Uses Puppeteer and puppeteer-extra-plugin-stealth (bundled).
- API Keys: None required.
- n8n Configuration:
- Sufficient system resources to run a headless browser.
- Optional: Environment variables if using a custom browser executable or proxy.
Troubleshooting
Common Issues:
Navigation Timeout:
- Error:
Request failed with status code ...or navigation never completes. - Solution: Increase the "Timeout" value or check network connectivity.
- Error:
Blocked by Bot Detection:
- Some sites may block automated browsers. Enable "Stealth mode" to reduce detection.
Invalid URL or Network Errors:
- Ensure the URL is correct and accessible from the n8n host.
Screenshot Not Captured:
- Check "Wait Before Screenshot" to ensure the page has enough time to render.
Proxy/Device Emulation Issues:
- Verify proxy settings and device names are valid.
Error Messages:
Request failed with status code <code>: The page did not return a 200 OK status. Check the URL or site availability.- Browser launch errors: May indicate missing dependencies or incorrect executable path.