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.
Store your API token in n8n Credentials and reference it in the HTTP Request node as the token query parameter.
Quickstart: Take a screenshot
Sign in to your n8n instance and create a new workflow.
Add a manual trigger node to control when the workflow runs.
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"}
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.
Your browser does not support the video tag.
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 .
{
"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
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 .
{
"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
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 .
{
"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
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 .
{
"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
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 .
{
"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)
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 .
{
"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 solve(\\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
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 .
{
"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
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).