# n8n

Take screenshots, PDFs and scrolling videos inside n8n workflows with the community node, or with the built-in HTTP Request node.

[n8n](https://n8n.io) is a workflow automation tool. The CurlShot community node adds screenshots to any workflow: it takes a URL, HTML or Markdown and hands the next node a PNG, JPEG, WebP, PDF or video file.

To install it in a self-hosted n8n, open **Settings → Community nodes → Install** and enter the package name:

```text
n8n-nodes-curlshot
```

Then add a **CurlShot** node, choose **Screenshot → Take**, and enter `https://example.com`. The image arrives in the binary field `data`, ready for a Slack, email, Google Drive or S3 node.

## Connect your key

1. Create an account at [CurlShot](https://curlshot.com/register). The free plan needs no card.
2. Open **API keys** in the dashboard and copy the access key.
3. In n8n, create a **CurlShot API** credential and paste it into **Access Key**.
4. Leave **Base URL** at `https://curlshot.com`.

n8n tests the credential with a call to `https://curlshot.com/api/v1/usage`. That call is free, so testing never uses a screenshot.

Paste the **Secret Key** too only if you use the trigger (see below). See [Authentication and API keys](https://curlshot.com/docs/authentication.md) for what the two keys are for.

## What the node can do

| Resource | Operation | What it does |
| --- | --- | --- |
| Screenshot | Take | A URL, HTML or Markdown as PNG, JPEG or WebP |
| PDF | Generate | A page as PDF: paper size, margins, landscape, or one tall page |
| Video | Record | The page scrolling, as MP4, WebM or GIF |
| Job | Create | Render in the background, then wait for the file or have it sent to a webhook |
| Job | Create Bulk | Up to 100 renders in one call, from a list of URLs (one per line) or a JSON array |
| Job | Get, Get Batch | Read one job or a whole batch, and download finished files |
| Device | Get Many | The phone, tablet and desktop presets |
| Account | Get Usage | Your plan, quota and screenshots left this month |

**Options** match the API parameters: full page, element selector, device, viewport, dark mode, delay, wait until, hide selectors, custom CSS, and blocking of ads, cookie banners, chats and trackers. See the [options reference](https://curlshot.com/docs/options.md) for what each one does.

**Output.** By default the file goes in a binary field, and the JSON next to it holds the reference id, the cache status and `quota_remaining`. Set **Output** to **Link** to get JSON with a temporary link to the file instead.

**Errors.** When the API refuses a request, the node shows the API's message and [error code](https://curlshot.com/docs/errors.md). With **On Error → Continue**, the error becomes the item's output and the workflow goes on.

## Start a workflow when a job finishes

The **CurlShot Trigger** node starts a workflow when a background job ends, with the event `screenshot.completed` or `screenshot.failed`.

1. Add the trigger and copy its **Production URL**.
2. In a CurlShot node, choose **Job → Create** or **Job → Create Bulk** and paste that URL into **Webhook URL**.
3. Activate the workflow.

The trigger checks the signature of each delivery with your secret key and refuses deliveries older than 5 minutes. A delivery can be retried, so deduplicate on `job_id` before a step that must run only once. [Async and webhooks](https://curlshot.com/docs/async-and-webhooks.md) explains the events and the signature.

## Without the community node

n8n Cloud only runs community nodes that n8n has verified. Until the CurlShot node is verified there, or if you would rather not install a package, the built-in **HTTP Request** node calls the API directly:

| Field | Value |
| --- | --- |
| Method | `POST` |
| URL | `https://curlshot.com/api/v1/screenshot` |
| Authentication | Generic Credential Type → Header Auth, with name `X-Access-Key` and your access key as the value |
| Send Body | On, Body Content Type JSON, Specify Body Using JSON |
| Options → Response → Response Format | File |

```json
{
  "url": "https://example.com",
  "format": "png",
  "full_page": true,
  "block_cookie_banners": true
}
```

The response is the image, in the binary field `data`. Every option on the [options reference](https://curlshot.com/docs/options.md) works in the body.

## Example workflows

- **Watch a competitor's pricing page:** Schedule Trigger (daily) → CurlShot *Screenshot → Take* with **Full Page** → Slack *Upload a file*.
- **Save submitted pages as PDF:** Form Trigger → CurlShot *PDF → Generate* → Google Drive *Upload*.
- **Weekly archive of your site:** Schedule Trigger → CurlShot *Job → Create Bulk* with your page URLs and the trigger's webhook URL → CurlShot Trigger → CurlShot *Job → Get* → S3 *Upload*.

Each screenshot counts toward your monthly quota like any other API call. Failed renders and cache hits are free. See [Usage and limits](https://curlshot.com/docs/usage-and-limits.md).
