1. Create a credential
In n8n, go to Credentials → Add Credential → Header Auth and set:
Get your API key at cloud.browser-use.com/settings.
2. Start a session
Add an HTTP Request node:
Body:
session_id you’ll use to poll for results.
3. Poll for completion
Add a second HTTP Request node in a loop:
Check the
status field. The session is done when status is idle, stopped, error, or timed_out. Use an If node to loop back with a Wait node (5–10 seconds) until complete.
The final response contains output with the agent’s result.
Event-driven alternative
Instead of polling, use Webhooks to receive a callback when the session completes. Configure your webhook endpoint in the dashboard, then add a Webhook trigger node in n8n to receiveagent.task.status_update events when sessions finish.