How to Integrate Website Screenshots with n8n
Build an n8n workflow that captures a website screenshot through an API, then returns the image from a webhook or stores it for later.
To take a website screenshot in n8n, send a URL to a screenshot API with an HTTP Request node, configure the response as a file, then either return that binary file from a webhook or pass it to storage. The capture API handles the browser work; n8n handles the workflow, delivery, and any follow-up steps.
This is a documentation-backed design pattern, not a workflow verified against a live n8n instance. Exact authentication and screenshot parameters depend on the provider. Start with the provider’s current API documentation; n8n’s HTTP Request node supports REST calls, query parameters, headers, credentials, request bodies, and file responses.
1. Choose how the workflow starts and where the image goes
Use a Webhook trigger when another application submits a URL or capture options. For scheduled captures, start with a schedule trigger and provide the URL from another node. The same HTTP Request capture step works in either workflow.
| Need | Workflow shape |
|---|---|
| Return an image to an API caller | Webhook → validate input → HTTP Request (screenshot API) → Respond to Webhook |
| Save or process the image | Trigger → validate input → HTTP Request → storage or image-processing node |
| Capture many URLs | Trigger/source → split or batch URLs → HTTP Request per URL → storage or results |
Decide whether the caller needs the image in the same HTTP response. Synchronous capture is simple, but it keeps the caller waiting for the browser operation. If the chosen provider supports asynchronous jobs, a job-and-callback design can return quickly and deliver the result later; confirm its exact API behavior in that provider’s documentation.
2. Configure the screenshot API request
- Add an HTTP Request node after the trigger.
- Set the method, URL, authentication, and parameters exactly as specified by the screenshot provider. A provider may accept a URL in query parameters or in a JSON request body.
- For a webhook-driven workflow, map the incoming URL field into the provider’s URL parameter. Validate that it is present and an allowed URL before making the request.
- Set the response format to File and choose an output field for the image, such as
screenshot. This tells n8n to retain the response as binary data rather than parse it as JSON. - Connect the output to a Respond to Webhook node, storage destination, or another node that accepts binary input.
Provider-specific configuration matters: authentication schemes, image formats, viewport settings, full-page behavior, timeouts, and error responses are not universal. Do not copy a request body from one provider into another without checking its API reference. Browserless documents one example of a screenshot endpoint in its Screenshot API documentation.
Input validation and capture options
For caller-supplied input, reject a missing or malformed URL before the capture call. If the workflow is reachable by untrusted callers, restrict destinations to the sites your use case permits; a public URL-to-browser workflow can otherwise be abused to make requests to unintended hosts. Avoid forwarding arbitrary caller-supplied headers or credentials to the destination page.
Expose only options your chosen API supports and your workflow needs. Common choices include output format, viewport width and height, full-page capture, device scale, wait conditions, and a timeout. Treat those names as concepts, not universal parameter names. Check the provider’s API documentation for the exact accepted values and defaults.
3. Return the screenshot from a webhook
To return the image directly, configure the Webhook trigger to respond using a Respond to Webhook node. Place that node after the HTTP Request node and select Binary File as the response type. Point it at the binary property created by the HTTP Request node. The Respond to Webhook node also supports response status codes and headers. See n8n’s Respond to Webhook documentation.
- In the Webhook trigger, choose the response mode that waits for the Respond to Webhook node.
- In the HTTP Request node, use response format File and set the binary output field.
- In Respond to Webhook, choose Binary File and select that binary field.
- Optionally set a success status and a content type if the response node or workflow requires it. Use a content type that matches the image format returned by the provider.
- Call the webhook with a URL and verify that the response is image bytes, not a JSON object containing metadata.
Do not set the webhook to respond immediately if the caller expects the screenshot body: an immediate response happens before the capture result is available. If the capture may take longer than the caller’s request timeout, consider returning a job identifier and delivering the result through a later callback or separate retrieval route instead.
When returning HTML instead
If you build an HTML preview page around the screenshot, account for n8n’s webhook response behavior: automatic iframe wrapping of HTML responses was introduced in n8n 1.103.0. The documented sandbox prevents scripts from accessing the top-level window or local storage, authentication headers are unavailable there, and relative URLs do not work. These constraints apply to an HTML response, not to returning the image as a binary file.
4. Save the image or pass it to another step
When the screenshot is for later use, connect the binary output to a storage or processing step. Keep the binary property intact as the workflow passes through nodes; a later step that replaces item data may need to preserve or explicitly reference the binary field.
For high-volume retention, decide where execution binary data lives and how long it should remain. n8n documents external binary storage using AWS S3 for self-hosted Enterprise plans; Cloud Enterprise users should contact n8n. Other S3-compatible services may work but are not officially supported. The S3 setup requires a bucket lifecycle configuration unless binary data is intended to be retained indefinitely. Read the current external binary storage documentation and confirm plan eligibility before designing around it.
External binary storage concerns n8n execution data. It is not the only way to upload a file to object storage: a workflow can also send a binary file to a separate storage service using that service’s supported integration or API. Set explicit retention and deletion rules for whichever storage path you choose.
5. Test the workflow and handle failures
Test with a page you control before exposing the webhook. Check both the node execution data and the HTTP response: the capture result should be in the configured binary field, and the caller should receive the expected file bytes.
| Symptom | Likely cause | What to check |
|---|---|---|
| HTTP Request output is JSON or empty | Response format is not set to File, or the provider returned an error payload | Set File response mode and inspect the provider status and error body. |
| Webhook returns before the image is ready | Webhook is configured to respond immediately | Configure it to use Respond to Webhook and put that node after capture. |
| Binary response is missing | The response node references the wrong binary property | Match its binary field setting to the HTTP Request output field. |
| Provider returns an authentication error | Credential, API key placement, or authorization format is wrong | Compare the credential configuration and header/query requirements with the provider’s current docs. Keep secrets in n8n credentials rather than hard-coding them in expressions. |
| Capture fails on some pages | The page may block automation, load slowly, require authentication, or fail upstream | Inspect the provider’s response and capture settings. Test a permitted page with a longer timeout or an appropriate wait condition if supported. |
| Webhook caller times out | Capture and response exceed a caller, proxy, or n8n timeout | Check timeout limits along the request path. Use asynchronous processing if supported by the provider and workflow design. |
| Stored file disappears or executions consume too much storage | Retention is undefined or binary data accumulates | Set a retention policy and, for S3-backed execution data, configure the documented bucket lifecycle behavior. |
6. Performance, reliability, and cost
- Latency: Each synchronous workflow waits for the remote browser capture and image transfer. Large full-page images and pages with slow resources can take longer. Use only the wait condition needed for the page, and set caller and node timeouts with the complete request path in mind.
- Reliability: A successful n8n execution does not guarantee a useful screenshot; check the provider’s response and, where available, its status or error details. Define how the workflow handles transient failures and avoid unbounded retries that multiply load or cost.
- Throughput: Capturing a list of URLs creates one or more remote browser operations per URL. Batch or limit concurrency according to the provider’s documented limits and your n8n capacity. No general capture rate or latency can be assumed across providers.
- Storage: Binary images take execution and storage capacity. Return a screenshot transiently when retention is unnecessary; otherwise choose an explicit destination and deletion window.
- Cost: Check the provider’s current billing unit, limits, and failure billing rules, along with your n8n plan and storage costs. The available n8n and Browserless documentation cited here does not establish comparative provider pricing or capture limits.
7. Alternative: call ScreenshotNeo from n8n
If you want the screenshot API to handle consent banners and common overlays before capture, you can call ScreenshotNeo with the same HTTP Request pattern. Its API accepts a URL and returns an image or PDF; use the ScreenshotNeo API documentation for the current request parameters and options. In n8n, configure the response as File and continue to Respond to Webhook or storage as above.
Or skip the browser setup:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before the shot; each cleanup step can be turned off. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. Its MCP server gives AI agents tools to take screenshots, get page information, and capture PDFs. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots. Every feature is on every plan.
Sign up free for 1,000 screenshots a month, with no card required.
FAQ
Can n8n return a screenshot from a webhook?
Yes. Have the Webhook trigger wait for a Respond to Webhook node, configure the HTTP Request response as a file, and return its binary property using the Binary File response type.
Can I save a screenshot instead of returning it?
Yes. Pass the HTTP Request node’s binary output to a storage or processing step. Choose an explicit retention policy for saved images and execution data.
Does every screenshot API use the same request parameters?
No. The HTTP Request node is generic, but the endpoint, authentication, parameter names, and supported capture settings are provider-specific.
Do I need to run a browser on the n8n host?
Not when you delegate capture to a hosted screenshot API. Operating browser infrastructure yourself is another architecture and requires maintaining that runtime.


