Puppeteer

Puppeteer is a Node.js library which provides a high-level API to control Chrome/Chromium over the DevTools Protocol.

Go to site
Explore
/
Apps
/
Puppeteer

Puppeteer API Integrations

Build and run workflows using the Puppeteer API. Use 1000s of source-available triggers and actions across 1,700+ apps. Or write custom code to integrate any app or API in seconds.

Overview

Puppeteer is a Node.js library which provides a high-level API to control Chrome/Chromium over the DevTools Protocol. Puppeteer runs in headless mode on Chromium on Pipedream.

Using Puppeteer you can perform tasks including:

  • Capture Screenshots: Convert webpages into images.
  • Processing PDFs: parse and scan PDFs.
  • Web Scraping: Extract data from websites.
  • UI/UX Testing: Verify user interface and experience.
  • Integration with Test Frameworks: Combine with testing frameworks.
  • Task Automation: Automate web-related tasks like form filling.
  • Functional Testing: Automate user interactions to test web application functionality.
  • Regression Testing: Ensure new code changes don't introduce bugs.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 import { puppeteer } from '@pipedream/browsers';

export default defineComponent({
  async run({steps, $}) {
    const browser = await puppeteer.browser();
    
    // Interact with the web page programmatically
    // See Puppeeter's Page documentation for available methods:
    // https://pptr.dev/api/puppeteer.page
    const page = await browser.newPage();

    await page.goto('https://pipedream.com/');
    const title = await page.title();
    const content = await page.content();

    // The browser needs to be closed, otherwise the step will hang
    await browser.close();

    return { title, content }
  },
})

Choose an API to Connect with Puppeteer API

1
-
24
of
1,700+
apps by most popular

HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Notion
Notion
Notion is a new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.
OpenAI (ChatGPT)
OpenAI (ChatGPT)
OpenAI is an AI research and deployment company with the mission to ensure that artificial general intelligence benefits all of humanity. They are the makers of popular models like ChatGPT, DALL-E, and Whisper.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.
Google Drive
Google Drive
Google Drive is a file storage and synchronization service which allows you to create and share your work online, and access your documents from anywhere.
Google Sheets
Google Sheets
Use Google Sheets to create and edit online spreadsheets. Get insights together with secure sharing in real-time and from any device.
Filter
Filter
Specify a condition that your workflow must meet and whether you'd like to proceed or end workflow execution.
Python
Python
Anything you can do in Python can be done in a Pipedream Workflow. This includes using any of the 350,000+ PyPi packages available in your Python powered workflows.
Slack
Slack
Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work — all within a secure, enterprise-grade environment.
Data Stores
Data Stores
Use Pipedream Data Stores to manage state throughout your workflows.
GitHub
GitHub
Where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world.
Formatting
Formatting
Pre-built actions to make formatting and manipulating data within your workflows easier.
Node
Node
Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.
Airtable (OAuth)
Airtable (OAuth)
Airtable is a low-code platform to build next-gen apps. Move beyond rigid tools, operationalize your critical data, and reimagine workflows with AI.
Zoom
Zoom
Zoom is the leader in modern enterprise video communications, with an easy, reliable cloud platform for video and audio conferencing, chat, and webinars.
Google Calendar
Google Calendar
With Google Calendar, you can quickly schedule meetings and events and get reminders about upcoming activities, so you always know what’s next.
Gmail
Gmail
Gmail offers private and secure email by Google at no cost, for business and consumer accounts.
Gmail (Developer App)
Gmail (Developer App)
Private and secure email by Google at no cost, for business and consumer accounts. Use this app to connect your own developer account credentials.
Email
Email
Trigger workflows on new emails, and send emails to yourself as part of a Pipedream workflow.
Delay
Delay
Delay, pause, suspend, or have the execution of your workflow wait for as little as one millisecond, or as long as one year.
Go
Go
Anything you can do in Go, you can do in a Pipedream Workflow. You can use any of Go packages available with a simple import.
Premium
Zoom Admin
Zoom Admin
Video conferencing (includes account-level scopes) for Zoom Admins.
Twilio
Twilio
Twilio is a cloud communications platform for building SMS, Voice & Messaging applications on an API built for global scale.
Bash
Bash
Run any Bash in a Pipedream step within your workflow, including making curl requests.

Getting Started

No authentication is required to use Puppeteer in your Pipedream workflows. Pipedream publishes a specific NPM package that is compatible with the Pipedream Execution Environment. This package includes the headless Chromium binary needed to run a browser headlessly within your Pipedream workflows.

Simply import this package, launch a browser and navigate using a Puppeteer Page instance.

Usage in Node.js Code Steps

To get started, import the @pipedream/browsers package into your Node.js code step. Pipedream will automatically install this specialized package that bundles the dependencies needed to run puppeteer in your code step.

This package exports a puppeteer module that exposes these methods:

  • browser(opts?) - method to instantiate a new browser (returns a Puppeteer Browser instance)
  • launch(opts?) - an alias to browser()
  • newPage() - creates a new Puppeteer Page instance and returns both the page & browser

Note: After awaiting the browser instance, make sure to close the browser at the end of your Node.js code step.

import { puppeteer } from '@pipedream/browsers';

export default defineComponent({
  async run({steps, $}) {
    const browser = await puppeteer.browser();
    
    console.log(browser)
    // get page, perform actions, etc.

    await browser.close();
  },
})

Usage in Sources or Actions

The same @pipedream/browsers package can be used in actions as well as sources.

The steps are the same as usage in Node.js code. Open a browser, create a page, and close the browser at the end of the code step.

Please note: At this time Source's memory are not configurable and are fixed to 256 mb. This is below the recommened 2 gbs for usage in workflows.

Get Page Title with Puppeteer API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + Puppeteer
 
Try it
Get Page Title with Puppeteer API on New Submission from Typeform API
Typeform + Puppeteer
 
Try it
Get Page Title with Puppeteer API on New Submission (Instant) from Jotform API
Jotform + Puppeteer
 
Try it
Get Page Title with Puppeteer API on New Scheduled Tasks from Pipedream API
Pipedream + Puppeteer
 
Try it
Get Page Title with Puppeteer API on npm Download Counts from npm API
npm + Puppeteer
 
Try it
Get HTML with the Puppeteer API

Get the HTML of a webpage using Puppeteer. See the documentation

 
Try it
Get Page Title with the Puppeteer API

Get the title of a webpage using Puppeteer. See the documentation

 
Try it
Get PDF with the Puppeteer API

Generate a PDF of a page using Puppeteer. See the documentation

 
Try it
Screenshot a Page with the Puppeteer API

Captures a screenshot of a page using Puppeteer. See the documentation

 
Try it

Troubleshooting

Workflow exited before step finished execution

Remember to close the browser instance before the step finishes. Otherwise, the browser will keep the step "open" and not transfer control to the next step.

Out of memory errors or slow starts

For best results, we recommend increasing the amount of memory available to your workflow to 2 gigabytes. You can adjust the available memory in the workflow settings.

Authentication

The Puppeteer API does not require authentication.