Skip to main content

Using Browserless with n8n

n8n is a powerful workflow automation platform that allows you to connect different services and automate tasks. This guide will show you how to use Browserless with n8n to automate browser-based tasks. For the templates below, remember to replace YOUR_API_TOKEN_HERE with your actual Browserless API token

  1. Sign up for n8n

    Create an account or sign in to your n8n instance to get started with workflow automation.

    Sign up for n8n

  2. Create a new workflow

    Once logged in, create a new workflow where you'll configure your Browserless integration.

    Create a new workflow

  3. Add a manual trigger

    Start by adding a manual trigger node to your workflow to control when the automation runs.

    Add manual trigger

  4. Add HTTP Request node

    Add an HTTP Request node to your workflow. This will be used to communicate with Browserless APIs.

    Add HTTP Request

  5. Configure the endpoint

    Configure your HTTP Request node with the Browserless endpoint URL and add your API token as a query parameter.

    Configure endpoint

Prerequisites

  • A Browserless account with an API token
  • An n8n instance (self-hosted or cloud)

Available Endpoints

You'll find templates for each of our REST API endpoints that can be implemented within n8n. Make sure that you add your API token to the query parameter "Token" for your node to work.

Screenshot

The /screenshot endpoint allows you to capture screenshots of web pages. This is useful for:

  • Visual monitoring of websites
  • Creating thumbnails
  • Documenting web content

PDF Generation

The /pdf endpoint generates PDF documents from web pages. This is useful for:

  • Creating printable versions of web content
  • Archiving web pages
  • Generating reports

Content Extraction

The /content endpoint extracts the HTML content from web pages. This is useful for:

  • Web scraping
  • Content analysis
  • Data extraction

Unblock

The /unblock endpoint helps bypass common anti-bot measures. This is useful for:

  • Accessing protected content
  • Handling CAPTCHAs
  • Managing cookies and sessions

Scrape

The /scrape endpoint allows you to extract structured data from web pages using CSS selectors. This is useful for:

  • Extracting specific content from websites
  • Structured data collection
  • Automated data gathering with selectors

Browser Query Language (BQL)

The /chrome/bql endpoint allows you to execute complex browser automation tasks using GraphQL. This is useful for:

  • Complex form filling
  • Multi-step workflows
  • Custom browser automation

Function

The /function endpoint allows you to execute custom JavaScript code in a browser context. This is useful for:

  • Custom browser automation
  • Complex data extraction
  • Multi-step workflows