Puppeteer ACTION
Screenshot a Page
Captures a screenshot of a page using Puppeteer. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Puppeteer account once, then configure and run Screenshot a Page 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: "puppeteer-screenshot-page",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
puppeteer: { authProvisionId: "apn_xxxxxxx" },
url: "URL",
downloadPath: "Download Path",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "puppeteer-screenshot-page",
"configured_props": {
"puppeteer": { "authProvisionId": "apn_xxxxxxx" },
"url": "URL",
"downloadPath": "Download Path"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "puppeteer",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "puppeteer-screenshot-page",
arguments: {
url: "URL",
downloadPath: "Download Path",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
url URL | string | The URL of the page to scrape. For example, https://example.com. Required |
downloadPath Download Path | string | Download the screenshot to the /tmp directory with the specified filename Optional |
captureBeyondViewport Capture Beyond Viewport | boolean | Capture the screenshot beyond the viewport. Optional |
clipHeight Clip Height | string | Specifies the height of the region of the page to clip. Optional |
clipScale Clip Scale | string | Specifies the scale of the region of the page to clip. Optional |
clipWidth Clip Width | string | Specifies the width of the region of the page to clip. Optional |
clipX Clip X | string | Specifies the X value of the region of the page to clip. Optional |
clipY Clip Y | string | Specifies Y value of the region of the page to clip. Optional |
encoding Encoding | string | Encoding of the image. Optional |
fromSurface From Surface | boolean | Capture the screenshot from the surface, rather than the view. Optional |
fullPage Full Page | boolean | When true, takes a screenshot of the full page. Optional |
omitBackground Omit Background | boolean | Hides default white background and allows capturing screenshots with transparency. Optional |
optimizeForSpeed Optimize For Speed | boolean | Optimize for speed. Optional |
quality Quality | integer | Quality of the image, between 0-100. Not applicable to png images. Optional |
type Type | string | Type of the screenshot image. Optional |
syncDir SyncDir | dir | Required |
browserTimeout Browser Timeout | integer | Maximum time in seconds to wait for the browser to start. Default is 30 seconds. Optional |
pageTimeout Page Timeout | integer | Maximum time in seconds to wait for the page to load. Default is 30 seconds. Optional |
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
- puppeteer-screenshot-page
- Version
- 1.0.5
- App
- Puppeteer
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗