View as Markdown
PolyDoc icon

PolyDoc ACTION

Capture Screenshot

Capture a screenshot of a URL, inline HTML, or a saved template. See the documentation.
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's PolyDoc account once, then configure and run Capture 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: "polydoc-convert-screenshot",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    polydoc: { authProvisionId: "apn_xxxxxxx" },
    sourceType: "Source Type",
    url: "URL",
  },
})

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.

Capture Screenshot inputs
Property Type Description
sourceType Source Type string
Where the content to render comes from.
Required
url URL string
The web page to render. Used when Source Type is url.
Optional
html HTML string
Inline HTML to render. Used when Source Type is html.
Optional
templateId Template ID string
ID of a template saved in PolyDoc (for example jlE-whg). Used when Source Type is template.
Optional
templateData Template Data object
Key-value data passed to the Liquid template renderer. Example: { "customerName": "Ada Lovelace", "invoiceNumber": "INV-1001" }. Used when Source Type is template.
Optional
imageType Image Type string
Screenshot image format.
Optional
fullPage Full Page boolean
Capture the entire scrollable page.
Optional
quality Quality integer
Compression quality 0-100 for JPEG / WebP.
Optional
viewportWidth Viewport Width integer
Viewport width in pixels.
Optional
viewportHeight Viewport Height integer
Viewport height in pixels.
Optional
devicePixelRatio Device Pixel Ratio integer
Device pixel ratio (0-10).
Optional
outputEncoding Output Encoding string
Return the screenshot as a binary file or a base64 string.
Optional
filename Filename string
Output filename, used in the file written for download delivery.
Optional
tag Tag string
A short label (max 30 chars) for logging and analytics.
Optional
timeout Timeout (ms) integer
Conversion timeout in milliseconds. The free tier is capped at 30000.
Optional
deliveryMode Delivery Mode string
How the result is delivered.
Required
presignedUrl Presigned URL string
A presigned upload URL (S3 / GCS / Azure). Used when Delivery Mode is cloudStorage.
Optional
webhookUrl Webhook URL string
The URL the file is delivered to. Used when Delivery Mode is webhook.
Optional
webhookOptions Webhook Options object
Optional webhook settings. Example: { "async": true, "method": "POST", "headers": { "X-Signature": "abc123" }, "retries": 3, "retryDelay": 1000, "timeout": 10000 }.
Optional
advanced Advanced (JSON) object
Raw object deep-merged into the request body for any API field not exposed above (for example pdf.watermark, pdf.pdfa, render, request). Advanced values win on conflict.
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
polydoc-convert-screenshot
Version
0.0.2
App
PolyDoc
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes