Zapier moves one record at a time and has nowhere to run a browser, which makes a screenshot step awkward to build by hand. The CustomJS action does the capture and returns a file object the following steps already know how to use.
600 free requests / month, no credit card
// live preview
Check that the page captures the way you expect, including any cookie banner, before wiring it into a Zap where failures are slower to see.
// the workflow
Add CustomJS as an action step and map the URL from the trigger. The step returns a file, and Zapier passes file objects between steps without a download in between.
{
"url": "{{trigger__website_url}}",
"commands": [
{ "type": "click", "selector": "button[data-testid='accept-all']" }
]
}// step by step
Add a step, search for CustomJS, and create a connection with the API key from your workspace. The Zapier integration page shows each screen.
Pick the field holding the address. Validate it first if it comes from a form, because a Zap that captures whatever a stranger typed is a request you did not intend to make.
A cookie banner or a filter that has to be set before the shot goes in the command list. Build the list in the visual builder and paste it in.
The Slack, Drive, Dropbox and Gmail steps take the returned file directly in their file or attachment field. No extra formatter step is needed.
// zapier specifics
The capture is the same everywhere. What differs is how Zapier handles files, loops and failures, and those three are where a working Zap goes wrong later.
// A list of 20 URLs in one field does NOT become 20 captures.
// Either send one trigger record per URL, or use a Looping step,
// and remember each pass costs a task.// Code by Zapier step, before the capture
const url = inputData.url || '';
const ok = /^https:\/\/[a-z0-9.-]+\.[a-z]{2,}(\/|$)/i.test(url);
// Stop the Zap rather than capturing something arbitrary
if (!ok) throw new Error('Refusing to capture: not a plain https URL');
output = [{ url }];A capture triggered by user input reaches whatever address it is given. Keep it to a list you control, or validate it as above.
One node turns a URL into a PNG inside your workflow. Full page rendering, binary output, ready to upload, attach or post.
A scenario that turns a URL into a PNG with the Website Screenshots module, including clicks and form input before the shot if the page needs them.
Create a workspace, connect the API key in Zapier, and the action appears in the picker.