v1.0.1
I'm thrilled to announce the release of v1.0.1 of the n8n-nodes-puppeteer package! This version marks a significant milestone, delivering all the features originally envisioned for this node, along with key enhancements to stability, performance, and security.
What's New in v1.0.1
Latest Dependencies & Zero Vulnerabilities
The module now leverages the latest dependencies, including an update to Puppeteer v23.6.1. With npm audit
showing 0 vulnerabilities and tslint
identifying 0 issues, this release is more secure and maintains the highest development standards.
Chrome Headless Shell Support
Puppeteer has recently made changes to its default headless behavior. The previous headless mode is now called chrome-headless-shell, which ships as a separate binary. This mode is optimized for scenarios where full Chrome functionality isn't required and performance is the priority. The chrome-headless-shell offers a more efficient solution for automation tasks, and you can now choose it via the new Use Chrome Headless Shell
option in addition to the existing Headless
toggle.
If your use case prioritizes performance over full browser capabilities, this new headless shell mode is ideal.
Page Batching
Introducing Batch Size control! You can now adjust the batch size (which defaults to 1
as in previous versions), allowing you to process multiple pages concurrently. This new feature can significantly improve performance for workloads involving a large number of input pages. When configuring a larger batch size, be mindful of resource constraints such as CPU and memory, and be cautious about rate limits when automating workflows.
Custom Script Upgrades
To enhance security and flexibility, Script Sandboxing is now used. All custom scripts are executed in a sandbox using n8n/vm2
, similar to the Code node. The sandbox includes the following context:
$browser
: Access to the browser instance.$page
: Represents the current page being automated.$input
: The current input item being processed (items[itemIndex]
).$json
: JSON data of the current input item (items[itemIndex].json
).$items
: Access to all input items (items
).$puppeteer
: Access to the Puppeteer module for advanced browser interactions.
Built-in and external npm modules configured (NODE_FUNCTION_ALLOW_BUILTIN
and NODE_FUNCTION_ALLOW_EXTERNAL
) in the Code node are also available for use in custom scripts, ensuring consistency across different parts of the workflow.
Additionally, the Page Caching
, Emulate Device
, and Extra HTTP Headers
options are now processed before execution of the custom scripts. To keep a low-code approach, configure your options and override as needed in the script code using $page
.