View as Markdown
Playwright icon

Playwright ACTION

Take Screenshot

Store a new screenshot file on /tmp directory. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Playwright account once, then configure and run Take Screenshot from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "playwright-take-screenshot",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    playwright: { authProvisionId: "apn_xxxxxxx" },
    url: "URL",
    filename: "File Name",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Take Screenshot inputs
Property Type Description
url URL string
The URL of the page.
Required
filename File Name string
The screenshot file name with extension, e.g. screenshot.png. it will be stored on /tmp directory.
Required
colorScheme Color Scheme string
The user color scheme preferences
Required
fullPage Full Page boolean
When true, takes a screenshot of the full page.
Required
viewportWidth Viewport Width integer
The width of viewport. default: 1280
Optional
viewportHeight Viewport Height integer
The height of viewport. default: 720
Optional
syncDir SyncDir dir
Required

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
playwright-take-screenshot
Version
0.0.5
App
Playwright
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes