Skip to content

Releases: drudge/n8n-nodes-puppeteer

v1.3.1

19 Dec 18:36
Compare
Choose a tag to compare

This release improves error handling capabilities and fixes some key issues:

  • Resolved an issue that prevented the Continue on Error functionality from working reliably. Additionally, added support for using the error output when continuing on error. (#43)
  • Fixed a data format issue which was preventing sending extra HTTP headers (#45)
  • Updated Puppeteer from 23.10.1 to 23.10.4

v1.3.0

19 Dec 18:30
Compare
Choose a tag to compare

This release improves error handling capabilities and fixes some key issues:

  • Resolved an issue that prevented the Continue on Error functionality from working reliably. Additionally, added support for using the error output when continuing on error. (#43)
  • Fixed a data format issue which was preventing sending extra HTTP headers (#45)
  • Updated Puppeteer from 23.10.1 to 23.10.4

v1.2.0

07 Dec 06:31
Compare
Choose a tag to compare

This release adds intelligent container detection and automatic optimization for Docker environments, making the Puppeteer node more reliable in containerized deployments.

Automatic Container Detection

  • Added smart container environment detection for Docker and Kubernetes
  • Detects containers through multiple methods:
  • Docker environment file
  • Control group information (Linux)
  • Container environment variables

Automatic Browser Launch Arguments

  • Automatically adds recommended Chrome flags for container environments:
  • --no-sandbox
  • --disable-setuid-sandbox
  • --disable-dev-shm-usage
  • --disable-gpu

User Control

  • New option "Add Container Arguments" in node settings
  • Defaults to enabled when running in a container
  • Can be toggled off if custom configuration is needed
  • Preserves any user-specified launch arguments

v.1.1.2

02 Dec 16:31
d7d53ce
Compare
Choose a tag to compare
  • Dependency version updates (puppeteer, typescript, eslint, etc.)

v1.1.1

20 Nov 03:29
Compare
Choose a tag to compare

This release brings improved security and a streamlined Docker deployment experience.

Security Enhancements

  • Updated cross-spawn and related dependencies to resolve potential security vulnerabilities
  • Recommended update for all users to ensure workflow security

Documentation Updates

  • Enhanced installation guides for all deployment methods
  • New Docker setup instructions with practical examples
  • Better guidance on using local Chrome vs remote browser options

v1.1.0

16 Nov 01:44
Compare
Choose a tag to compare

This release significantly enhances the Run Custom Script operation, bringing it closer to feature parity with n8n's native Code node while maintaining all the power of Puppeteer automation.

New Features

Console Logging Support

  • console.log statements in your custom scripts now work exactly like they do in the Code node
  • Output is displayed in:
    • Browser's console during test mode
    • Standard output (stdout) when executing in production

Special Variables & Helper Methods

  • Added support for all special variables and methods from the Code node
  • Remember, you can access Puppeteer-specific objects too using:
    • $browser - Browser instance
    • $page - Current page instance
    • $puppeteer - Puppeteer library
  • Seamlessly use familiar Code node helpers and utilities in your Puppeteer scripts

Enhanced Return Data Handling

  • Improved support for complex return data structures
  • Added support for binary properties, enabling direct handling of:
    • Screenshots
    • Downloaded files
    • Generated PDFs
    • Other binary data

Example Usage

Here's a simple example demonstrating the new binary property support with page screenshots:

await $page.goto('https://www.google.com')
const imageData = await $page.screenshot({ type: 'png', encoding: 'base64' })
return [
  {
    binary: {
      screenshot: {
        data: imageData,
        mimeType: 'image/png',
        fileName: 'screenshot.png',
      },
    },
  }
]

v1.0.3

14 Nov 02:06
4c159f3
Compare
Choose a tag to compare

Thank you for your contribution, @jcmarcano!

v1.0.1

03 Nov 20:46
Compare
Choose a tag to compare

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.

v0.8.0 - Custom Scripts

01 Nov 04:24
Compare
Choose a tag to compare
  • Adds new Run Custom Script operation

Introducing the new Run Custom Script operation, which allows you to write and execute your own custom Puppeteer scripts directly within the node.

Capabilities:

  • Access to core Puppeteer objects: $browser and $page, enabling complete control over browser automation tasks.

  • Utilize $input, $json, or $items to reference incoming workflow data, allowing you to adapt the script to the current workflow context.

  • Supports full use of Puppeteer's API, enabling advanced scenarios such as custom page interactions, data extraction, and conditional logic.

Example Use Case: Navigate to an IP lookup page, extract the IP address, and return it as part of the workflow output:

// Navigate to an IP lookup service
await $page.goto('https://httpbin.org/ip');

// Extract the IP address from the page content
const ipData = await $page.evaluate(() => {
    const response = document.body.innerText;
    const parsed = JSON.parse(response);
    return parsed.origin;  // Extract the 'origin' field, which typically contains the IP address
});

// Return the result in the required format
return [{ ip: ipData }];

Screenshot

image

v0.7.0 - Browser WebSocket Endpoint

17 Oct 02:08
Compare
Choose a tag to compare
  • Add support for connecting to a browser websocket URL (browserWSEndpoint)

This update introduces a significant enhancement that makes it easier to integrate Puppeteer workflows with remote browser instances, providing greater flexibility and efficiency in deploying automations.

By specifying a WebSocket endpoint, users can now connect directly to a remotely hosted Puppeteer browser instance. This is particularly useful when running workflows on cloud-based environments or shared infrastructure.