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
Create an account or sign in to your n8n instance to get started with workflow automation.
Once logged in, create a new workflow where you'll configure your Browserless integration.
Start by adding a manual trigger node to your workflow to control when the automation runs.
Add an HTTP Request node to your workflow. This will be used to communicate with Browserless APIs.
Configure your HTTP Request node with the Browserless endpoint URL and add your API token as a query parameter.
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 
 
{
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "73479c89-44a3-4f49-ba59-97f99a23f5b9",
      "name": "When clicking 'Execute workflow'"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://production-sfo.browserless.io/screenshot",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "token",
              "value": "YOUR_API_TOKEN_HERE"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "https://www.example.com"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        240,
        -80
      ],
      "id": "afd7858f-1db8-4251-b3f9-aaa6a1f8ad95",
      "name": "Screenshot buffer"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://production-sfo.browserless.io/screenshot",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "token",
              "value": "YOUR_API_TOKEN_HERE"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\n  \"url\": \"https://www.example.com\",\n  \"options\": {\n    \"encoding\": \"base64\"\n  }\n}",
        "options": {
          "redirect": {
            "redirect": {}
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        240,
        128
      ],
      "id": "d2ba4e93-62ff-49ed-874a-78c077045b9d",
      "name": "Screenshot base64"
    },
    {
      "parameters": {
        "content": "## Take a Screenshot\nYou can generate a screenshot as a **Buffer or Base64** Learn more about the [Screenshot API here.](https://docs.browserless.io/rest-apis/screenshot-api)",
        "width": 304
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        0
      ],
      "typeVersion": 1,
      "id": "82d552de-4927-4c8d-8ec1-8956d939d155",
      "name": "Sticky Note"
    }
  ],
  "connections": {
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "Screenshot buffer",
            "type": "main",
            "index": 0
          },
          {
            "node": "Screenshot base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Screenshot buffer": {
      "main": [
        []
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "72f423f1e1c447db670aa3dc4919caee6676a7384f1dac4911c50b24b11b1249"
  }
}
Copy Screenshot Template to Clipboard 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 
 
{
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -64,
        -48
      ],
      "id": "f7231783-1ab2-4587-bdaf-5139d2dfad95",
      "name": "When clicking 'Execute workflow'"
    },
    {
      "parameters": {
        "content": "## Generate a PDF\nYou can generate a PDF Learn more about the [PDF API here.](https://docs.browserless.io/rest-apis/pdf-api)",
        "width": 304
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -432,
        -48
      ],
      "typeVersion": 1,
      "id": "82cceda8-fee2-42f9-abef-a6178b8f9e69",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://production-sfo.browserless.io/pdf",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "token",
              "value": "YOUR_API_TOKEN_HERE"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "https://www.example.com"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        144,
        -48
      ],
      "id": "3373552b-36c4-4061-bd38-40398211904d",
      "name": "PDF"
    }
  ],
  "connections": {
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "72f423f1e1c447db670aa3dc4919caee6676a7384f1dac4911c50b24b11b1249"
  }
}
Copy PDF Template to Clipboard The /content endpoint  extracts the HTML content from web pages. This is useful for:
Web scraping 
Content analysis 
Data extraction 
 
{
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        432,
        -144
      ],
      "id": "dc05fa4c-e60d-4082-8a1f-158e28032c38",
      "name": "When clicking 'Execute workflow'"
    },
    {
      "parameters": {
        "content": "## Scrape content\nFetch the HTML content of a site, read more about the [Content API here.](https://docs.browserless.io/rest-apis/content)",
        "width": 304
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        -144
      ],
      "typeVersion": 1,
      "id": "4f000aa2-aeb9-4bb9-83f6-5a5f9b0baec4",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://production-sfo.browserless.io/content",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "token",
              "value": "YOUR_API_TOKEN_HERE"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "https://www.example.com"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        640,
        -144
      ],
      "id": "a3aa914f-8f37-404d-b7c6-5f5c3493a303",
      "name": "Content"
    }
  ],
  "connections": {
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "72f423f1e1c447db670aa3dc4919caee6676a7384f1dac4911c50b24b11b1249"
  }
}
Copy Content Template to Clipboard Unblock  
The /unblock endpoint  helps bypass common anti-bot measures. This is useful for:
Accessing protected content 
Handling CAPTCHAs 
Managing cookies and sessions 
 
{
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -64,
        -48
      ],
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "When clicking 'Execute workflow'"
    },
    {
      "parameters": {
        "content": "## Unblock\nBypass common anti-bot measures, read more about the [Unblock API here.](https://docs.browserless.io/rest-apis/unblock)",
        "width": 304
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -432,
        -48
      ],
      "typeVersion": 1,
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://production-sfo.browserless.io/unblock",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "token",
              "value": "YOUR_API_TOKEN_HERE"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "https://www.example.com"
            },
            {
              "name": "cookies",
              "value": "true"
            },
            {
              "name": "browserWSEndpoint",
              "value": "true"
            },
            {
              "name": "content",
              "value": "true"
            },
            {
              "name": "screenshot",
              "value": "true"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        144,
        -48
      ],
      "id": "c3d4e5f6-a789-0123-cdef-123456789012",
      "name": "Unblock"
    }
  ],
  "connections": {
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "Unblock",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "72f423f1e1c447db670aa3dc4919caee6676a7384f1dac4911c50b24b11b1249"
  }
}
Copy Unblock Template to Clipboard 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 
 
{
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -64,
        -48
      ],
      "id": "j7k8l9m0-n1o2-3456-jklm-no7890123456",
      "name": "When clicking 'Execute workflow'"
    },
    {
      "parameters": {
        "content": "## Scrape\nExtract structured data from web pages using CSS selectors, read more about the [Scrape API here.](https://docs.browserless.io/rest-apis/scrape)",
        "width": 304
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -432,
        -48
      ],
      "typeVersion": 1,
      "id": "k8l9m0n1-o2p3-4567-klmn-op8901234567",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://production-sfo.browserless.io/scrape",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "token",
              "value": "YOUR_API_TOKEN_HERE"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json",
        "body": "{\"url\": \"https://www.example.com\", \"elements\": [{\"selector\": \"h1\"}, {\"selector\": \"p\"}]}"
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        144,
        -48
      ],
      "id": "l9m0n1o2-p3q4-5678-lmno-pq9012345678",
      "name": "Scrape"
    }
  ],
  "connections": {
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "Scrape",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "72f423f1e1c447db670aa3dc4919caee6676a7384f1dac4911c50b24b11b1249"
  }
}
Copy Scrape Template to Clipboard 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 
 
{
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -64,
        -48
      ],
      "id": "d1e2f3a4-b5c6-7890-defg-hi1234567890",
      "name": "When clicking 'Execute workflow'"
    },
    {
      "parameters": {
        "content": "## Browser Query Language (BQL)\nExecute complex browser automation using GraphQL, read more about [BQL here.](https://docs.browserless.io/browserql/start)",
        "width": 304
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -432,
        -48
      ],
      "typeVersion": 1,
      "id": "e2f3a4b5-c6d7-8901-efgh-ij2345678901",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://production-sfo.browserless.io/chrome/bql",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "token",
              "value": "YOUR_API_TOKEN_HERE"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json",
        "body": "{\"query\": \"mutation FormExample {\\n  goto(url: \\\"https://www.browserless.io/practice-form\\\") {\\n    status\\n  }\\n select(selector:\\\"#Contact-Subject\\\",value:\\\"support\\\"){     time   } \\n typeEmail: type(text: \\\"john@email.com\\\", selector: \\\"#Email\\\") {\\n    time\\n  }\\n  typeMessage: type(\\n    selector: \\\"#Message\\\"\\n    text: \\\"Hello world!\\\"\\n  ) {\\n    time\\n  }\\n  verify(\\n    type: cloudflare\\n  ){\\n    solved\\n  }\\n waitForTimeout(time:3000){time}\\n screenshot{\\n    base64\\n  }\\n}\", \"variables\": {}, \"operationName\": \"FormExample\"}"
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        144,
        -48
      ],
      "id": "f3a4b5c6-d7e8-9012-fghi-jk3456789012",
      "name": "BQL"
    }
  ],
  "connections": {
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "BQL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "72f423f1e1c447db670aa3dc4919caee6676a7384f1dac4911c50b24b11b1249"
  }
}
Copy BQL Template to Clipboard 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 
 
{
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -64,
        -48
      ],
      "id": "g4h5i6j7-k8l9-0123-ghij-kl4567890123",
      "name": "When clicking 'Execute workflow'"
    },
    {
      "parameters": {
        "content": "## Function\nExecute custom JavaScript code in a browser context, read more about the [Function API here.](https://docs.browserless.io/rest-apis/function)",
        "width": 304
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -432,
        -48
      ],
      "typeVersion": 1,
      "id": "h5i6j7k8-l9m0-1234-hijk-lm5678901234",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://production-sfo.browserless.io/function",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "token",
              "value": "YOUR_API_TOKEN_HERE"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/javascript",
        "body": "export default async function ({ page }) {await page.goto(\"https://example.com/\");\n  const url = await page.content();\n  const buffer = await page.pdf({ format: \"A4\" });\n  const base64PDF = buffer.toString('base64');\n  const screenshot = await page.screenshot({ encoding: \"base64\" });\n\n  return {\n    data: {\n      url,\n      screenshot,\n      base64PDF\n    },\n    type: \"application/json\",\n  };\n}"
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        144,
        -48
      ],
      "id": "i6j7k8l9-m0n1-2345-ijkl-mn6789012345",
      "name": "Function"
    }
  ],
  "connections": {
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "Function",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "72f423f1e1c447db670aa3dc4919caee6676a7384f1dac4911c50b24b11b1249"
  }
}
Copy Function Template to Clipboard