Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add n8n integration documentation for Browser Use #897

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

hoangnb24
Copy link
Contributor

@hoangnb24 hoangnb24 commented Feb 27, 2025

/claim #841

Overview

This PR introduces a new community node for n8n that enables seamless integration with Browser Use Cloud. The n8n-nodes-browser-use node allows n8n users to harness the power of AI-driven browser automation directly within their workflow automation platform.

Features

  • Cloud API Integration: Complete integration with Browser Use Cloud API, allowing execution of tasks with natural language instructions
  • Task Management Operations: Full suite of operations for running, monitoring, pausing, resuming, and stopping tasks
  • Session Persistence: Option to save browser session data for multi-step automations
  • Comprehensive Documentation: Added documentation in the development section explaining installation and usage

Implementation Details

  • Created a node that handles all available Browser Use Cloud API endpoints
  • Implemented proper credential management for secure API key storage
  • Added validation and error handling for all operations
  • Ensured compatibility with n8n version 1.80.4

Work in Progress

There is ongoing development for a "Local Bridge" connection type that will allow users to connect to a locally running Browser Use instance. This feature is marked as WIP in the interface and documentation, and will be fully implemented in a future update.

  • Done

Screenshots

I've attached screenshots in this PR showing:

  • The node configuration interface
  • Example workflow with the Browser Use node
  • Credential configuration screen
Screenshot 2025-02-27 at 23 47 29 Screenshot 2025-02-27 at 23 47 55 Screenshot 2025-02-27 at 23 48 03 Screenshot 2025-02-27 at 23 48 13 Screenshot 2025-02-27 at 23 48 24

Documentation

Added a comprehensive documentation file at docs/development/n8n-integration.mdx that covers installation, configuration, and usage of the node.

Testing Instructions

  1. Install the node using one of the methods described in the documentation
  2. Configure credentials with a valid Browser Use Cloud API key
  3. Add the node to a workflow and test the various operations

Related


Note: I am not entirely sure this is the optimal approach for local integration. Looking forward for feedbacks and suggestions.

The planned implementation for the Local Bridge feature involves:

  1. Separate Service: The Local Bridge will be built as a separate service that users need to run locally alongside n8n
  2. Simple Endpoint Switching: The integration will simply switch endpoints when changing between Cloud API and Local Bridge credentials
  3. API Compatibility: The Local Bridge service will implement an API compatible with the Cloud API

Update 1

I've now updated the node to include integration with the Nodes-as-tools

bu1
Screenshot 2025-02-28 at 10 07 01

Update 2

I've finished the Local Bridge Implementation. More info here

Demo Usage Video

@algora-pbc algora-pbc bot mentioned this pull request Feb 27, 2025
Copy link

algora-pbc bot commented Feb 27, 2025

💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe.

@vishaldwdi
Copy link

This node lacks Nodes-as-Tools feature. From n8n version 1.62 onwards, it allows nodes to be used as LangChain agent tools. Therefore requesting to @hoangnb24 to take measure to enable this n8n node to be used with AI Agents in n8n.

@hoangnb24
Copy link
Contributor Author

This node lacks Nodes-as-Tools feature. From n8n version 1.62 onwards, it allows nodes to be used as LangChain agent tools. Therefore requesting to @hoangnb24 to take measure to enable this n8n node to be used with AI Agents in n8n.

I implemented the Nodes-as-Tools feature for this node.

@vishaldwdi
Copy link

vishaldwdi commented Feb 28, 2025

@hoangnb24 Much appreciated.

Though, I have some questions. I am trying to experiment with this node on Railway.com deployment.

  1. Currently I have Browserless instance connected to n8n instance through shared env

  2. I can run Puppeteer node in n8n through Websocket Endpoint address directing it to Browserless instance

  3. Can I deploy Browser-Use as instance on Railway like I have deployed Browserless instance, if yes, then how best connect n8n instance with it? (I understand Local Bridging isn't stable, I want to experiment and contribute my learning)

  4. Do you think the following Dockerhub image would work perfectly to deploy Browser-Use on Railway https://hub.docker.com/r/vovan/browser-use

  5. Is it possible to establish Local Bridging like Browserless Websocket Endpoint?

  6. What would be the best way to fix " N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true " as n8n instance image is being fetched directly from Dockerhub image on Railway?

@hoangnb24
Copy link
Contributor Author

  • 1, 2, 3. Yes, give it a try, and then you can decide on one or the other approach.
  • 4, 5. I cant tell, need to do more research.
  • 6. Just set the configuration to env then restart the instance.

@CLAassistant
Copy link

CLAassistant commented Mar 14, 2025

CLA assistant check
All committers have signed the CLA.

@vishaldwdi
Copy link

vishaldwdi commented Mar 14, 2025

@hoangnb24 can I request you to please update the documentation of https://github.com/draphonix/n8n-nodes-browser-use to correctly integrate LocalBridge update?

@pirate pirate merged commit 71d3054 into browser-use:main Mar 26, 2025
1 check passed
@pirate
Copy link
Member

pirate commented Mar 26, 2025

thanks for adding these docs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants