> ## Documentation Index
> Fetch the complete documentation index at: https://browseruse-0aece648-agency-x402-payment-cap.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# n8n

> Use Browser Use as an HTTP node in n8n workflows.

Browser Use works with [n8n](https://n8n.io) as a standard HTTP integration — no custom nodes needed.

## 1. Create a credential

In n8n, go to **Credentials → Add Credential → Header Auth** and set:

| Field | Value |
| - | - |
| Name | `Authorization` |
| Value | `Bearer YOUR_API_KEY` |

Get your API key at [cloud.browser-use.com/settings](https://cloud.browser-use.com/settings?tab=api-keys\&new=1).

## 2. Start a session

Add an **HTTP Request** node:

| Setting | Value |
| - | - |
| Method | `POST` |
| URL | `https://api.browser-use.com/api/v3/sessions` |
| Authentication | Header Auth (from step 1) |
| Body Type | JSON |

Body:

```json theme={null}
{
  "task": "Find the top 3 trending repos on GitHub today"
}
```

The response includes a `session_id` you'll use to poll for results.

## 3. Poll for completion

Add a second **HTTP Request** node in a loop:

| Setting | Value |
| - | - |
| Method | `GET` |
| URL | `https://api.browser-use.com/api/v3/sessions/{{ $json.id }}` |
| Authentication | Header Auth (from step 1) |

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](/cloud/guides/webhooks) to receive a callback when the session completes. Configure your webhook endpoint in the [dashboard](https://cloud.browser-use.com/settings?tab=webhooks), then add a **Webhook** trigger node in n8n to receive `agent.task.status_update` events when sessions finish.

<Tip>
  This pattern works with any workflow tool that supports HTTP requests — Make, Zapier, Pipedream, or custom orchestrators.
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.