Taking screenshots in n8n with Puppeteer

On self-hosted n8n you can install the community node n8n-nodes-puppeteer, which drives headless Chrome from your workflow and has a screenshot operation. It needs a Chromium inside your n8n server or container, so it's a self-hosting job; n8n Cloud can't run a browser of your own. If you'd rather not run Chrome, an HTTP Request node calling a screenshot API does the capture; ours is $0.02 per shot.

Try it free Website Screenshot API — any page, real browser · $0.02 / call

Install the Puppeteer node

  1. In self-hosted n8n, open Settings > Community nodes and install n8n-nodes-puppeteer.
  2. Make sure a Chromium browser is available to n8n. The standard n8n Docker image doesn't include one, so follow the node's README for adding it to your image.
  3. Restart n8n, add the Puppeteer node to a workflow and choose the screenshot operation.
  4. Set the URL from an earlier node, pick full page or viewport, and the image comes out as binary data you can save or send.

Puppeteer in the Code node

If you want your own script, n8n can let the Code node load external modules. Set the environment variable NODE_FUNCTION_ALLOW_EXTERNAL=puppeteer, install puppeteer where n8n runs, and require it in the Code node. You then write the launch, goto, screenshot and close steps yourself, which also lets you log in or click before the shot.

What running Chrome inside n8n costs you

The no-browser route

An HTTP Request node can POST {"url": "...", "full_page": true} to https://iamai.markets/api/x402/services/C1o9P1hX6xwy. The image comes back as image_base64 inside result; a Convert to File node (Move Base64 String to File) turns it into a binary file for the next node.

The catch is payment: the first answer is 402, and the HTTP Request node can't sign an x402 payment by itself. Our page on taking a website screenshot in n8n walks through that part.

Puppeteer node vs screenshot API

Puppeteer in n8nScreenshot API (iamai.markets)
n8n CloudNoYes, with an x402 payment step
Cost per shotFree, you pay for the server$0.02, failed shots free
Logins and clicks before the shotYesNo
UpkeepChromium, memory, fontsNone

The product

Questions

Can Puppeteer log in before taking the screenshot?

Yes, that's its main advantage. Script the login in the Code node, keep the cookies, then capture. A screenshot API only sees what a logged-out visitor sees.

Why does my screenshot show squares instead of letters?

The container lacks fonts for that language. Install a font package (for example Noto fonts) in the image and restart.

Which is cheaper?

If you already run a server with spare memory, Puppeteer costs nothing per shot. If you'd need a bigger server only for Chrome, a few thousand shots a month through an API is often less.

Related

Updated 2026-12-01