This is an n8n community node that lets you automate browsers using Browserbase powered by Stagehand in your n8n workflows.
n8n is a fair-code licensed workflow automation platform.
Follow the installation guide in the n8n community nodes documentation.
# Install dependencies
npm install
# Build the node
npm run build
# Run n8n with your node in Docker
docker-compose up --build
# Open http://localhost:5678 and search for "Browserbase" nodeTo rebuild after changes:
npm run build && docker-compose up --buildThe Browserbase Agent node is a single, self-contained node that:
- Creates a browser session
- Navigates to your starting URL
- Executes an AI agent to complete your task
- Closes the session automatically
Just provide a URL and an instruction - the node handles everything else.
| Field | Description |
|---|---|
| Starting URL | The page where the agent begins (e.g., https://example.com) |
| Instruction | Natural language task for the agent to complete |
The driver model powers the browser session (navigation, DOM interactions). Choose from:
google/gemini-2.5-flash(Recommended - fast & cheap)google/gemini-2.5-proopenai/gpt-4oopenai/gpt-4o-minianthropic/claude-sonnet-4-5-20250929
| Mode | Description | Best For |
|---|---|---|
| CUA | Computer Use Agent - uses vision and coordinates | Complex UIs, visual interactions |
| DOM | Uses DOM selectors - works with any LLM | Speed, simple pages |
| Hybrid | Combines both approaches | Fallback reliability |
Models available depend on the selected mode:
CUA Mode:
google/gemini-2.5-computer-use-preview-10-2025openai/computer-use-previewanthropic/claude-sonnet-4-20250514anthropic/claude-sonnet-4-5-20250929anthropic/claude-haiku-4-5-20251001
DOM Mode:
google/gemini-2.5-flashgoogle/gemini-2.5-proopenai/gpt-4oopenai/gpt-4o-minianthropic/claude-sonnet-4-5-20250929
Hybrid Mode:
google/gemini-3-flash-previewanthropic/claude-sonnet-4-20250514anthropic/claude-haiku-4-5-20251001
You need three credentials:
| Credential | Description |
|---|---|
| Browserbase API Key | Your Browserbase API key |
| Browserbase Project ID | Your Browserbase project ID |
| Model API Key | API key for your chosen model provider |
Important: The Model API Key must match the provider of your models. If using Google models, provide a Google API key. If using OpenAI, provide an OpenAI key.
- Sign up at Browserbase
- Navigate to your dashboard for API key and Project ID
- Get an API key from your model provider:
Simple extraction:
- URL:
https://news.ycombinator.com - Instruction:
Find the top 3 stories and return their titles and URLs
Form filling:
- URL:
https://example.com/contact - Instruction:
Fill out the contact form with name "John Doe" and email "[email protected]", then submit
Navigation + action:
- URL:
https://github.com - Instruction:
Search for "stagehand" and click on the first repository result
The node returns an AgentResult object:
{
"success": true,
"message": "Task completed successfully",
"actions": [
{ "type": "act", "action": "clicked submit button" }
],
"completed": true,
"usage": {
"input_tokens": 1250,
"output_tokens": 340,
"inference_time_ms": 2500
},
"sessionId": "abc-123"
}Compatible with [email protected] or later