Skip to main content

n8n integration templates

Use n8n's HTTP Request node to call Browserless REST endpoints and BrowserQL. Copy a template below, paste it into your workflow, and replace the token value with your API token.

Before you copy

Store your API token in n8n Credentials and reference it in the HTTP Request node as the token query parameter.

Quickstart: Take a screenshot

  1. Create a new workflow

    Sign in to your n8n instance and create a new workflow.

    Create a new workflow

  2. Add a manual trigger

    Add a manual trigger node to control when the workflow runs.

    Add manual trigger

  3. Add HTTP Request node

    Add an HTTP Request node and configure it:

    • Method: POST
    • URL: https://production-sfo.browserless.io/screenshot?token=YOUR_TOKEN
    • Body: {"url": "https://example.com"}

    Add HTTP Request

    Configure endpoint

  4. Execute the workflow

    Click "Execute workflow" to capture a screenshot. The response will contain the image buffer.

Copy the templates below to quickly add other Browserless endpoints to your workflows.

Templates

Screenshot

Capture a screenshot of any URL. POST https://production-sfo.browserless.io/screenshot with url in the body.

Use it to: visual monitoring, creating thumbnails, documenting web content.

Learn more about the Screenshot API.

PDF

Generate a PDF from a URL. POST https://production-sfo.browserless.io/pdf with url in the body.

Use it to: creating printable versions, archiving web pages, generating reports.

Learn more about the PDF API.

Content

Fetch the page HTML. POST https://production-sfo.browserless.io/content with url in the body.

Use it to: web scraping, content analysis, data extraction.

Learn more about the Content API.

Unblock

Bypass bot detection and optionally return session details (cookies, browserWSEndpoint, content, screenshot). POST https://production-sfo.browserless.io/unblock with url and flags.

Use it to: accessing protected content, handling CAPTCHAs, managing cookies and sessions.

Learn more about the Unblock API.

Scrape

Extract structured data with CSS selectors. POST https://production-sfo.browserless.io/scrape with elements array.

Use it to: extracting specific content, structured data collection, automated data gathering.

Learn more about the Scrape API.

Browser Query Language (BQL)

Run BrowserQL (GraphQL) to automate multi-step flows. POST https://production-sfo.browserless.io/chrome/bql with a GraphQL query.

Use it to: complex form filling, multi-step workflows, custom browser automation.

Learn more about BrowserQL.

Function

Run custom JavaScript in a browser context. POST https://production-sfo.browserless.io/function with JS code.

Use it to: custom browser automation, complex data extraction, multi-step workflows.

Learn more about the Function API.

Best practices for n8n

Binary vs base64: For screenshots and PDFs, enable the "Download" option in n8n to handle binary responses, or request encoding: "base64" in the body to receive JSON responses.

Timeouts and retries: Long-running pages may exceed default timeouts. Configure timeout settings in your HTTP Request node and add retry logic for reliability.

Security: Store your API token in n8n Credentials or environment variables. Never hardcode tokens in plain text within your workflow templates.

Regional endpoints: Choose a regional endpoint close to your location for lower latency. Available regions include production-sfo (US West), production-lon (UK), and production-ams (Netherlands).