n8n-nodes-snaplab
v0.1.0
Published
n8n community node for snaplab — turn any URL or HTML into a screenshot, a PDF or a social image.
Downloads
50
Maintainers
Readme
n8n-nodes-snaplab
An n8n community node for the snaplab rendering API.
snaplab is a rendering API: turn any URL or HTML into a screenshot, a PDF or a social image.
Installation
1. Community Nodes UI (recommended)
In n8n, go to Settings → Community Nodes → Install, enter n8n-nodes-snaplab, accept the risks
prompt and click Install. The snaplab node is available in the nodes panel right away.
2. Manual installation
cd ~/.n8n/nodes
npm install n8n-nodes-snaplabThen restart n8n.
Credentials
- Create an API key at https://snaplab.dev/app/keys — the free tier includes 100 renders per month.
- In n8n, add a new snaplab API credential.
- Paste your key (it looks like
sk_...) into API Key. Leave Base URL athttps://snaplab.devunless you self-host snaplab.
The key is sent as Authorization: Bearer sk_.... Use the credential's Test button to confirm it
works — it calls GET /api/me.
Operations
| Operation | Endpoint | Key options |
| --- | --- | --- |
| Screenshot | POST /api/render | Input Type (URL / HTML), Format (PNG, JPEG, WebP), Full Page, Viewport preset or custom Width/Height, Dark Mode, Block Ads, Dismiss Banners, Selector, Delay (ms), Response Type (Binary / JSON) |
| PDF | POST /api/render with format: "pdf" | Input Type (URL / HTML), Paper Format (Letter, Legal, Tabloid, Ledger, A3, A4, A5), Landscape, Print Background, Response Type (Binary / JSON) |
| HTML to Image | POST /api/render/image | HTML, Width, Height, Format (PNG, JPEG, WebP) |
Option names map straight onto snaplab's JSON body (fullPage, darkMode, dismissBanners,
blockAds, delayMs, selector, viewport, pdf: { format, landscape, printBackground }), so
anything you can read in the API docs behaves the same here.
Viewport
Viewport picks one of snaplab's presets — Wide (1920×1080), Desktop (1440×900), Laptop
(1280×800), Tablet (820×1180) or Mobile (390×844). Choose Custom to send explicit width and
height instead.
Response Type
With Response Type set to Binary File (the default) the node outputs the rendered file on the
binary property data, plus a small JSON summary (fileName, mimeType, bytes). With JSON the
node returns snaplab's JSON response instead — it carries a hosted url for the render, handy when
you want a link rather than bytes. HTML to Image always returns binary.
Example
A daily homepage snapshot, archived to Google Drive:
- Schedule Trigger — run every day at 08:00.
- snaplab — Operation
Screenshot, Input TypeURL, URLhttps://example.com, Full Page on, FormatPNG, Response TypeBinary File. - Google Drive → Upload file — set Input Binary Field to
data(the binary property the snaplab node writes) and the file name to{{ $json.fileName }}.
The same pattern works for the PDF operation (binary property data, application/pdf) feeding an
email or S3 node.
Compatibility
- n8n 1.x
- Node.js >= 20.15
