npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-pinchtab

v0.1.9

Published

n8n community node for PinchTab — browser control for AI agents

Readme

n8n-nodes-pinchtab

Contrôle de navigateur pour agents IA — intégration n8n pour PinchTab

npm version License: MIT n8n community

Ce node permet à vos workflows n8n — et à vos agents IA — de contrôler un navigateur Chrome via PinchTab : naviguer, extraire du texte, cliquer, prendre des captures d'écran, et plus encore.


Prérequis

  • n8n v1.0+
  • Chrome ou Chromium installé sur la machine qui fait tourner PinchTab
  • PinchTab installé et démarré sur votre machine

Étape 1 — Installer Chrome ou Chromium

PinchTab ne vient pas avec Chrome inclus — il détecte automatiquement un navigateur installé sur le système.

macOS Installez Google Chrome normalement. PinchTab le trouvera automatiquement.

Linux (Ubuntu / Debian)

# Option A — Google Chrome
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt update && sudo apt install -y google-chrome-stable

# Option B — Chromium (plus léger)
sudo apt install -y chromium-browser

Raspberry Pi / ARM64

sudo apt install -y chromium-browser

Rocky Linux / AlmaLinux / RHEL

# Option A — Google Chrome
sudo dnf install -y wget
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
sudo dnf install -y ./google-chrome-stable_current_x86_64.rpm

# Option B — Chromium (dépôts EPEL)
sudo dnf install -y epel-release
sudo dnf install -y chromium

Windows (WSL) Installez Google Chrome dans Windows. PinchTab le détecte via WSL.

Étape 2 — Installer PinchTab

# macOS / Linux
curl -fsSL https://pinchtab.com/install.sh | bash

Démarrer PinchTab

Sans authentification (réseau local de confiance uniquement) :

pinchtab
# Serveur accessible sur http://127.0.0.1:9867

Avec un token d'authentification (recommandé si n8n tourne sur un serveur) :

PINCHTAB_TOKEN=mon-token-secret pinchtab

Avec un port personnalisé + token :

BRIDGE_PORT=9999 PINCHTAB_TOKEN=mon-token-secret pinchtab

En arrière-plan (production) :

PINCHTAB_TOKEN=mon-token-secret pinchtab &

# Ou avec systemd — créez /etc/systemd/system/pinchtab.service :
# [Unit]
# Description=PinchTab browser server
# After=network.target
#
# [Service]
# Environment="PINCHTAB_TOKEN=mon-token-secret"
# Environment="BRIDGE_HEADLESS=true"
# ExecStart=/home/USER/.local/bin/pinchtab
# Restart=on-failure
#
# [Install]
# WantedBy=multi-user.target

sudo systemctl enable --now pinchtab

Vérifier que le serveur tourne :

pinchtab health
# ou
curl http://127.0.0.1:9867/

Note sécurité : Par défaut PinchTab écoute sur 127.0.0.1 (localhost uniquement). Si vous exposez le port sur un réseau, utilisez toujours un token.


Installation du node

Via l'interface n8n (recommandé)

  1. Ouvrez n8n
  2. Allez dans Settings → Community Nodes
  3. Cliquez Install a community node
  4. Entrez : n8n-nodes-pinchtab
  5. Cliquez Install
  6. Redémarrez n8n si demandé

Via la ligne de commande

# Si n8n est installé globalement
npm install -g n8n-nodes-pinchtab

# Si n8n tourne dans un dossier personnalisé
cd ~/.n8n/custom
npm install n8n-nodes-pinchtab

Configuration des credentials

  1. Dans n8n, allez dans Credentials → New
  2. Cherchez PinchTab API
  3. Remplissez :

| Champ | Valeur | Notes | |-------|--------|-------| | Server URL | http://127.0.0.1:9867 | Changez le port si vous avez utilisé BRIDGE_PORT | | Auth Token | mon-token-secret | Doit correspondre exactement à PINCHTAB_TOKEN au démarrage. Laisser vide si pas de token. |

Exemple : PinchTab sur un serveur distant

Si PinchTab tourne sur une autre machine (ex: 192.168.1.100) :

  • Server URL : http://192.168.1.100:9867
  • Auth Token : votre token secret

Le token est envoyé en header Authorization: Bearer <token> à chaque requête.


Opérations disponibles

| Opération | Description | |-----------|-------------| | Navigate | Naviguer vers une URL | | Extract Text | Extraire le texte lisible de la page | | Snapshot | Arbre d'accessibilité (léger, token-efficient) | | Click | Cliquer sur un élément par ref ou sélecteur CSS | | Type | Taper du texte dans un champ | | Fill | Remplir un input directement | | Press Key | Appuyer sur une touche clavier | | Scroll | Faire défiler la page | | Screenshot | Capturer une image de la page | | List Tabs | Lister les onglets ouverts | | Open Tab | Ouvrir un nouvel onglet | | Close Tab | Fermer un onglet | | List Instances | Lister les instances Chrome actives | | Health Check | Vérifier l'état du serveur PinchTab |


Utilisation dans un workflow standard

Exemple : Extraire des données d'une page web

[Schedule Trigger]
       ↓
[PinchTab: Navigate]         url = https://monsite.com/page
       ↓
[PinchTab: Snapshot]         selector = #section-prix > div.valeur
       ↓
[Code]                       Extraire les données du JSON
       ↓
[Google Sheets: Append Row]  Sauvegarder les résultats

Exemple : Remplir un formulaire web

[Webhook]
       ↓
[PinchTab: Navigate]    url = https://monsite.com/formulaire
       ↓
[PinchTab: Fill]        ref = #nom   |  text = {{ $json.nom }}
       ↓
[PinchTab: Fill]        ref = #email |  text = {{ $json.email }}
       ↓
[PinchTab: Click]       ref = #submit
       ↓
[PinchTab: Screenshot]  Confirmation visuelle

Utilisation comme outil dans un Agent IA

Ce node supporte usableAsTool: true — il apparaît directement dans la liste des outils du node AI Agent de n8n sans nécessiter de sous-workflow intermédiaire.

Méthode directe (recommandée depuis n8n v1.x)

  1. Ajoutez un node AI Agent dans votre workflow
  2. Dans la section Tools, cliquez +
  3. Cherchez PinchTab dans la liste
  4. Sélectionnez l'opération souhaitée (Navigate, Snapshot, Extract Text, etc.)
  5. Configurez les credentials PinchTab

L'agent décidera lui-même quand et comment appeler PinchTab selon la requête de l'utilisateur.

[Chat Trigger]
      ↓
[AI Agent]  ←─── Modèle : Claude / GPT-4
      │
      ├── Tool: PinchTab (Navigate)
      ├── Tool: PinchTab (Snapshot)
      ├── Tool: PinchTab (Extract Text)
      ├── Tool: PinchTab (Click)
      └── Tool: PinchTab (Screenshot)
      ↓
[Respond to Chat]

Méthode sous-workflow (n8n < v1.x ou cas avancés)

Si vous avez besoin de combiner plusieurs opérations PinchTab en un seul outil, créez un sous-workflow :

Workflow pinchtab-scrape

[Execute Workflow Trigger]   reçoit: { url, selector? }
         ↓
[PinchTab: Navigate]         url = {{ $json.url }}
         ↓
[PinchTab: Snapshot]         selector = {{ $json.selector }}
         ↓
[Return to caller]           retourne: les données extraites

Puis dans l'AI Agent → Add ToolCall n8n Workflow → sélectionnez pinchtab-scrape.

Exemple de prompt système pour l'agent

Tu es un assistant spécialisé dans la navigation web et l'extraction de données.
Tu as accès à un navigateur Chrome via PinchTab.

Pour extraire des données d'une page web :
1. Utilise Navigate pour aller sur l'URL
2. Utilise Snapshot avec un sélecteur CSS précis pour cibler une section
3. Utilise Extract Text pour obtenir le texte complet
4. Si tu dois interagir, utilise Click ou Fill puis vérifie avec Snapshot

Les refs d'éléments (ex: e5, e12) viennent du Snapshot et permettent
de cibler précisément un élément pour cliquer ou taper.

L'agent peut répondre à des requêtes comme :

  • "Va sur ce site et trouve le prix de ce produit : [URL]"
  • "Remplis le formulaire de contact sur ce site avec ces informations"
  • "Prends une capture d'écran de cette page et décris ce que tu vois"
  • "Surveille ce site toutes les heures et alerte-moi si le prix change"

Conseils d'utilisation

Token efficiency

Utilisez Snapshot avec Format: Compact plutôt que Extract Text quand l'agent doit interagir avec la page — c'est 5-13x moins de tokens.

Sélecteurs CSS pour l'extraction

Toute la page         → laisser le sélecteur vide
Section spécifique    → #monId > div.maClasse
Tableau de données    → table.dataTable tbody tr

Gestion multi-onglets

Chaque opération retourne un tabId. Passez ce tabId aux opérations suivantes pour cibler le bon onglet dans un workflow parallèle.

Authentification

Si PinchTab tourne avec un token, la commande de démarrage et les credentials doivent correspondre :

# Démarrage
PINCHTAB_TOKEN=monsecret pinchtab
# Credentials n8n → PinchTab API
Auth Token : monsecret

Utilisation avec Docker

n8n dans Docker — accéder à PinchTab sur l'hôte

Si n8n tourne dans Docker et PinchTab sur la machine hôte, 127.0.0.1 ne fonctionnera pas. Utilisez host.docker.internal à la place.

Docker Desktop (macOS / Windows) — fonctionne nativement :

Server URL : http://host.docker.internal:9867

Docker sur Linux — ajoutez dans votre docker-compose.yml :

services:
  n8n:
    extra_hosts:
      - "host.docker.internal:host-gateway"

Puis :

Server URL : http://host.docker.internal:9867

PinchTab dans le même docker-compose (recommandé)

services:
  n8n:
    image: n8nio/n8n
    depends_on:
      pinchtab:
        condition: service_healthy

  pinchtab:
    build:
      context: ./pinchtab
      dockerfile: Dockerfile
    restart: always
    environment:
      - PINCHTAB_TOKEN=${PINCHTAB_TOKEN}
      - BRIDGE_HEADLESS=true
    volumes:
      - pinchtab_data:/data
    shm_size: "1gb"
    security_opt:
      - seccomp:unconfined
    cap_add:
      - SYS_ADMIN
    healthcheck:
      test: ["CMD-SHELL", "wget -qO- --header=\"Authorization: Bearer ${PINCHTAB_TOKEN}\" http://localhost:9867/health || exit 1"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 60s

volumes:
  pinchtab_data:

Credentials n8n :

Server URL : http://pinchtab:9867
Auth Token : (valeur de PINCHTAB_TOKEN)

Erreur 403 — IDPI domain not allowed

PinchTab inclut une protection anti-injection (IDPI) qui bloque la navigation vers des domaines non autorisés. Si vous obtenez :

navigation blocked by IDPI: domain "exemple.com" is not in the allowed list

Solution — Ajouter les domaines autorisés

Installation locale :

pinchtab config set security.idpi.allowedDomains "127.0.0.1,localhost,::1,exemple.com,www.exemple.com"

Installation Docker :

docker exec <nom-container-pinchtab> /usr/local/bin/pinchtab config set \
  security.idpi.allowedDomains "127.0.0.1,localhost,::1,exemple.com,www.exemple.com"

docker compose restart pinchtab

La configuration persiste dans le volume Docker — pas besoin de refaire à chaque redémarrage.

Désactiver l'IDPI (serveur privé uniquement)

# Local
pinchtab config set security.idpi.enabled false

# Docker
docker exec <nom-container-pinchtab> /usr/local/bin/pinchtab config set security.idpi.enabled false
docker compose restart pinchtab

Attention : Ne désactivez l'IDPI que sur un serveur privé non exposé publiquement.


Variables de sortie

Navigate / Snapshot / Text

{
  "tabId": "D388B2F87D77FB3A176B39ADCEDB7D22",
  "title": "Titre de la page",
  "url": "https://...",
  "nodes": [...],   // pour Snapshot
  "text": "..."     // pour Extract Text
}

Screenshot

Le résultat est stocké comme données binaires dans n8n (champ data par défaut). Connectez-le directement à un node Send Email, Google Drive, ou Telegram pour envoyer l'image.


Liens


Licence

MIT — Voir LICENSE