This is an n8n community node to control a headless browser using the Puppeteer library.
n8n is a fair-code licensed workflow automation platform.
Installation
Operations
Credentials
Compatibility
Resources
Version history
Follow the installation guide in the n8n community nodes documentation.
WARNING: During the npm
-based installation of this plugin, puppeteer
will attempt to install a working version of chrome
or chromium
on the machine. It's quite possible that it will either be unable to find a suitable one, or it won't work on your particular platform due to missing system dependencies. You can refer to the troubleshooting document for instructions on how to fix this.
The following steps have been known to work:
For alpine
-based images (e.g. n8nio/n8n:latest
), the following command will install the latest chromium
:
apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont
Once installed, you would then have to instruct puppeteer
to use that version instead of the embedded one, by setting these env variables:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
For debian
-based images (e.g. n8nio/n8n:latest-debian
), the following command will install the latest chrome-browser
, including all dependencies, which should enable the embedded puppeteer version to also work:
apt-get update \
&& apt-get install -y wget gnupg \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
In any case, you may need to set the following env variable to instruct puppeteer
where to store its embedded chrome browser binaries, since the default location may be wiped if not properly persisted in your container in a durable volume:
PUPPETEER_CACHE_DIR=/root/.n8n/.cache/puppeteer
- Page:
- Take Screenshot
- Save as PDF
- Get HTML
No credentials for this node
Tested against n8n v0.196.0
First Release!