Description
n8n-nodes-npilot
Npilot is an n8n community node that brings Playwright-powered browser automation into your workflows. Use it to navigate pages, interact with UI elements, extract structured data, take screenshots, and run custom JavaScript — all from within n8n, without writing a separate scraper.
n8n is a fair-code licensed workflow automation platform.
- Installation
- Operations
- Compatibility
- Usage
- Resources
- Version history
—
Installation
Npilot controls a real Chromium browser, so Chromium must be available in the environment where n8n runs. Choose the path that matches your setup.
—
Option 1 — Self-hosted n8n (Non-Docker)
⚠️ This option is for native installations only (Ubuntu, Debian, macOS, Windows). If you’re running n8n in Docker, skip to Option 2.
#### Step 1 — Install the community node
In n8n go to Settings → Community Nodes → Install and enter:
n8n-nodes-npilot
Or install it via npm in your n8n root:
npm install n8n-nodes-npilot
#### Step 2 — Install Chromium
Npilot does not download a browser automatically. You must install Chromium in the same environment as n8n.
Using Playwright’s built-in installer (recommended):
npx playwright install chromium --with-deps
Or using your system package manager (Debian/Ubuntu):
apt-get install -y chromium-browser
#### Step 3 — Point Npilot to the binary (only needed when using a system Chromium)
If Playwright’s own browser is not used, set the environment variable so Npilot can find the binary:
export PLAYWRIGHTCHROMIUMEXECUTABLE_PATH=/usr/bin/chromium-browser
Add this to your n8n startup script or .env file so it persists across restarts.
#### Step 4 — Restart n8n
Restart n8n to pick up the new node and environment variable.
—
Option 2 — Docker
⚠️ Important: The official n8n Docker image (n8nio/n8n) does not include a browser and uses Alpine Linux, which is incompatible with Playwright’s Chromium binaries. To use Npilot in Docker, you have two options:
#### Option 2A — Use the pre-built Npilot image (recommended)
A ready-to-use Docker image is available on Docker Hub. It bundles n8n, Chromium, and the Npilot node in a single container — no additional setup required.
Quick start:
docker run -d
-p 5678:5678
--name n8n-npilot
--shm-size=512m
-e N8NBASICAUTH_ACTIVE=true
-e N8NBASICAUTH_USER=admin
-e N8NBASICAUTH_PASSWORD=changeme
alee0510/n8n-npilot:latest
Access n8n at: http://localhost:5678
Using Docker Compose:
services:
n8n:
image: alee0510/n8n-npilot:latest
restart: unless-stopped
ports:
- "5678:5678"
environment:
- N8NBASICAUTH_ACTIVE=true
- N8NBASICAUTH_USER=admin
- N8NBASICAUTH_PASSWORD=changeme
volumes:
- n8n_data:/home/node/.n8n
shm_size: "512mb"
deploy:
resources:
limits:
memory: 2gvolumes:
n8n_data:
Then run:
docker compose up -d
#### Option 2B — Build a custom Debian-based n8n image
If you need to customize the setup, you can build your own image using n8n’s Debian variant and install Chromium manually.
Example Dockerfile:
FROM n8nio/n8n:latest-debianUSER root
Install Chromium and dependencies
RUN apt-get update &&
apt-get install -y chromium chromium-driver &&
rm -rf /var/lib/apt/lists/*Install Npilot node
RUN cd /usr/local/lib/node_modules/n8n &&
npm install n8n-nodes-npilotSet Chromium path
ENV PLAYWRIGHTCHROMIUMEXECUTABLE_PATH=/usr/bin/chromiumUSER node
Build and run:
docker build -t my-n8n-npilot .
docker run -d -p 5678:5678 --shm-size=512m my-n8n-npilot
#### Option 2C — Build from source
Clone the GitHub repository to customize the image:
git clone https://github.com/alee0510/n8n-npilot.git
cd n8n-npilot
docker compose up -d
What the Docker image includes:
n8n-nodes-npilot pre-installed from npmPLAYWRIGHTCHROMIUMEXECUTABLE_PATH configured automatically—
Operations
Npilot exposes 18 browser automation actions organized across two operation modes.
| Category | Action |
| ————— | ———————————————————————————————————- |
| Navigation | Navigate to URL, Wait for Navigation |
| Interaction | Click Element, Type Text, Select Option, Check / Uncheck, Hover-over Element, Scroll to Element, Press Key |
| Waiting | Wait for Selector, Wait (Fixed Timeout) |
| Extraction | Extract Text, Extract Attribute, Extract Table |
| Utilities | Take Screenshot, Evaluate JavaScript, Debug, Close Session |
—
Compatibility
n8nio/n8n:latest)—
Usage
1. Session model
Npilot is session-based. Each node execution can either open a fresh browser session or reuse one from a previous node by passing the Session ID. This lets you chain multiple Npilot nodes in a workflow, keeping the same browser page open across steps.
—
2. Operation modes
Choose how you want to define browser steps using the Operation Modes field.
#### 2.1 Action Based (default)
Build steps one by one using the UI. Each step has an Action dropdown that shows only the fields relevant to that action. Steps are executed top-to-bottom and can be reordered by dragging.
Best for: building and testing workflows interactively.
#### 2.2 Script Based (JSON)
Provide a JSON array of step objects directly. Each object must have an action key plus the corresponding fields for that action:
[
{ "action": "navigate", "url": "https://example.com", "waitUntil": "domcontentloaded" },
{ "action": "click", "selector": "#login-btn", "timeout": 5000 },
{ "action": "type", "selector": "#email", "text": "user@example.com", "clearFirst": true },
{ "action": "extractText", "selector": "h1", "outputField": "heading" }
]
Best for: dynamically building a script in an earlier node (e.g. with a Code node) and passing it in as a variable.
—
Actions reference
#### 1. Navigate to URL
Opens a URL in the browser. Configure Wait Until to control when navigation is considered complete:
DOM Content Loaded — HTML parsed, resources still loading (recommended default)Network IDLE — no network activity for 500 ms; use for SPAs or lazy-loaded pagesLoad — full page load eventCommit — response received; fastest, useful for redirects#### 2. Click Element
Clicks the element matched by the Selector. Waits up to Timeout ms for the element to appear.
#### 3. Type Text
Types into the matched element. Enable Clear Before Typing to empty the field first (useful for pre-filled inputs).
#### 4. Select Option
Selects a option by its value attribute (not the visible label). Use the Debug action to find the correct value if unsure.
#### 5. Check / Uncheck
Sets the checked state of a checkbox or radio button. Toggle Checked on or off.
#### 6. Hover-over Element
Moves the mouse pointer over the matched element. Useful for triggering dropdown menus or tooltips.
#### 6. Scroll to Element
Scrolls the matched element into view. Add this before Extract Attribute or Extract Text when content is lazy-loaded on scroll.
#### 8. Press Key
Dispatches a keyboard event. Common keys: Enter, Tab, Escape, ArrowDown, ArrowUp.
#### 8. Wait for Selector
Pauses the workflow until an element matching the Selector reaches the target State:
Visible — in the DOM and visible (default)Attached — exists in DOM even if hiddenHidden — has display:none, visibility:hidden, or zero sizeDetached — removed from the DOM#### 10. Wait (Fixed Timeout)
Pauses for exactly the number of milliseconds set in Timeout. Use as a last resort when selector-based waiting is not possible.
#### 11. Extract Text
Reads the inner text of the matched element and saves it to Output Field Name in the JSON output.
#### 12. Extract Attribute
Reads an HTML attribute (e.g. href, src, data-id) from the matched element. For lazy-loaded images or links, add a Scroll to Element + Wait (Fixed Timeout) step first.
#### 13. Extract Table
Reads an HTML