Skip to content

everapihq/screenshotbase-pipedream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Screenshotbase Pipedream Components

Community contribution (Option B) for Pipedream Registry: app and a "Take Screenshot" action for https://screenshotbase.com.

Structure

  • components/screenshotbase.app.mjs: App definition (API key auth, status test)
  • components/actions/capture/capture.mjs: Action "Take Screenshot" (GET /v1/take) to render a website screenshot

Contribute to Pipedream Registry

  1. Fork the Pipedream Registry repo.
  2. If the Screenshotbase app does not exist yet, request creation from the Pipedream team. Once added, place the components under that app directory.
  3. Commit your components and open a Pull Request.
  4. After merge, the components appear in the Pipedream marketplace.

What this integration provides

  • Actions (wrap GET /v1/take):
    • Take Screenshot – basic screenshot
    • Take PDF – screenshot as PDF
    • Take from HTML – render from raw HTML
    • Take Screenshot (Advanced) – full set of parameters (format, quality, full_page, viewport)

Parameters (Take Screenshot)

  • Props (camelCase):

    • apiKey (string, optional; or set env SCREENSHOTBASE_API_KEY)
    • baseUrl (string, optional; default https://api.screenshotbase.com)
    • url (string, default https://example.com)
    • width (integer, default 1280)
    • height (integer, default 800)
    • format (string, default png, options: png, jpeg, pdf)
    • fullPage (boolean, default false)

    These map to Screenshotbase API query params: viewport_width, viewport_height, full_page, etc.

Parameters (Take PDF)

  • url (string, required)
  • viewport_width (integer, optional, default 1280)
  • viewport_height (integer, optional, default 800)
  • (sets format=pdf under the hood)

Parameters (Take from HTML)

  • html (string, required)
  • format (string, optional): jpg, jpeg, png, gif
  • viewport_width / viewport_height (optional)

Parameters (Take Screenshot – Advanced)

  • url (required)
  • format (jpg, jpeg, png, gif)
  • quality (jpg/jpeg only)
  • full_page (0/1)
  • viewport_width / viewport_height

How to test in a Pipedream workflow

  1. Create a workflow and add the Take Screenshot action. Set apiKey (or export SCREENSHOTBASE_API_KEY). Configure url, etc., or use defaults. Click Test.

  2. (Optional) Download bytes of the returned image URL:

const img = await axios($, { url: res.url, responseType: "arraybuffer" });
$.export("image_base64", Buffer.from(img).toString("base64"));
  1. cURL sanity check:
curl -G "https://api.screenshotbase.com/v1/take" \
  -H "apikey: YOUR_API_KEY" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "viewport_width=1280" \
  --data-urlencode "viewport_height=800" \
  --data-urlencode "full_page=1" \
  --data-urlencode "format=png"

Notes for reviewers

  • Action uses native fetch and returns a JSON payload with the binary body as base64 and metadata.
  • Auth: API key in apikey header.

Links

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors