Skip to main content

BrowserCloud Integration with n8n

n8n is a comprehensive workflow automation solution that enables seamless service integration and task automation. This guide demonstrates how to leverage BrowserCloud within n8n workflows for sophisticated browser automation. Remember to substitute YOUR_API_TOKEN_HERE with your authentic BrowserCloud API credentials in all templates below.

Requirements

  • Active BrowserCloud account with valid API token
  • Running n8n instance (self-hosted or cloud-based)

Supported API Endpoints

Screenshot Capture

The /screenshot endpoint enables web page screenshot generation. Primary use cases include:

  • Website visual monitoring and tracking
  • Thumbnail creation for content preview
  • Web content documentation and archiving
{
"nodes": [
{
"parameters": {
"method": "POST",
"url": "https://chrome-v2.browsercloud.io/screenshot",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "token",
"value": "YOUR_API_TOKEN_HERE"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "url",
"value": "https://www.example.com"
}
]
}
},
"type": "n8n-nodes-base.httpRequest",
"name": "Screenshot"
}
]
}

PDF Document Creation

The /pdf endpoint converts web pages into PDF format. Key applications:

  • Printable web content generation
  • Web page archival and preservation
  • Automated report creation
{
"nodes": [
{
"parameters": {
"method": "POST",
"url": "https://chrome-v2.browsercloud.io/pdf",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "token",
"value": "YOUR_API_TOKEN_HERE"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "url",
"value": "https://www.example.com"
}
]
}
},
"type": "n8n-nodes-base.httpRequest",
"name": "PDF"
}
]
}

Data Extraction

The /content endpoint retrieves structured data and text from web pages. Essential for:

  • Web scraping and information harvesting
  • Content monitoring and analysis
  • Automated data aggregation workflows
{
"nodes": [
{
"parameters": {
"method": "POST",
"url": "https://chrome-v2.browsercloud.io/content",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "token",
"value": "YOUR_API_TOKEN_HERE"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "url",
"value": "https://www.example.com"
}
]
}
},
"type": "n8n-nodes-base.httpRequest",
"name": "Content"
}
]
}

Custom JavaScript Execution

The /function endpoint enables custom JavaScript execution within browser environments. Ideal for:

  • Advanced browser interaction scenarios
  • Tailored data processing operations
  • Complex multi-step automation workflows
{
"nodes": [
{
"parameters": {
"method": "POST",
"url": "https://chrome-v2.browsercloud.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 }) {\n 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",
"name": "Function"
}
]
}