Cloudflare Browser Rendering ACTION
Get Screenshot
Takes a screenshot of a webpage from provided URL or HTML. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Cloudflare Browser Rendering account once, then configure and run Get 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: "cloudflare_browser_rendering-get-screenshot",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
cloudflare_browser_rendering: { authProvisionId: "apn_xxxxxxx" },
html: "HTML",
url: "URL",
},
})
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": "cloudflare_browser_rendering-get-screenshot",
"configured_props": {
"cloudflare_browser_rendering": { "authProvisionId": "apn_xxxxxxx" },
"html": "HTML",
"url": "URL"
}
}'// 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": "cloudflare_browser_rendering",
},
},
},
)
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: "cloudflare_browser_rendering-get-screenshot",
arguments: {
html: "HTML",
url: "URL",
},
})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 |
|---|---|---|
html HTML | string | Set the content of the page, eg: <h1>Hello World!!</h1>. Optional |
url URL | string | URL to navigate to, eg. https://example.com. Optional |
viewportHeight Viewport - Height | integer | The height of the viewport in pixels. Optional |
viewportWidth Viewport - Width | integer | The width of the viewport in pixels. Optional |
viewportDeviceScaleFactor Viewport - Device Scale Factor | integer | The device scale factor. Optional |
viewportHasTouch Viewport - Has Touch | boolean | Whether the viewport has touch capabilities. Optional |
viewportIsLandscape Viewport - Is Landscape | boolean | Whether the viewport is in landscape mode. Optional |
viewportIsMobile Viewport - Is Mobile | boolean | Whether the viewport is in mobile mode. Optional |
userAgent User Agent | string | Specify the browser user agent Optional |
additionalSettings Additional Settings | object | Specify additional settings for the browser rendering. Optional |
screenshotOptionsCaptureBeyondViewport Screenshot Options - Capture Beyond Viewport | boolean | Capture beyond the viewport Optional |
screenshotOptionsClip Screenshot Options - Clip | object | Clip the screenshot. The clip object has the following properties: height, width, x, y, scale (Optional). Optional |
screenshotOptionsEncoding Screenshot Options - Encoding | string | Encoding of the screenshot Optional |
screenshotOptionsFromSurface Screenshot Options - From Surface | boolean | Capture from the surface Optional |
screenshotOptionsFullPage Screenshot Options - Full Page | boolean | Capture the full page Optional |
screenshotOptionsOmitBackground Screenshot Options - Omit Background | boolean | Omit the background Optional |
screenshotOptionsOptimizeForSpeed Screenshot Options - Optimize For Speed | boolean | Optimize for speed Optional |
screenshotOptionsQuality Screenshot Options - Quality | integer | Quality of the screenshot Optional |
screenshotOptionsType Screenshot Options - Type | string | Type of the screenshot Optional |
selector Selector | string | Selector 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
- cloudflare_browser_rendering-get-screenshot
- Version
- 0.0.3
- App
- Cloudflare Browser Rendering
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗