Community contribution (Option B) for Pipedream Registry: app and a "Take Screenshot" action for https://screenshotbase.com.
- 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
- Fork the Pipedream Registry repo.
- If the Screenshotbase app does not exist yet, request creation from the Pipedream team. Once added, place the components under that app directory.
- Commit your components and open a Pull Request.
- After merge, the components appear in the Pipedream marketplace.
- Actions (wrap
GET /v1/take):Take Screenshot– basic screenshotTake PDF– screenshot as PDFTake from HTML– render from raw HTMLTake Screenshot (Advanced)– full set of parameters (format, quality, full_page, viewport)
-
Props (camelCase):
apiKey(string, optional; or set envSCREENSHOTBASE_API_KEY)baseUrl(string, optional; defaulthttps://api.screenshotbase.com)url(string, defaulthttps://example.com)width(integer, default 1280)height(integer, default 800)format(string, defaultpng, options:png,jpeg,pdf)fullPage(boolean, defaultfalse)
These map to Screenshotbase API query params:
viewport_width,viewport_height,full_page, etc.
url(string, required)viewport_width(integer, optional, default 1280)viewport_height(integer, optional, default 800)- (sets
format=pdfunder the hood)
html(string, required)format(string, optional):jpg,jpeg,png,gifviewport_width/viewport_height(optional)
url(required)format(jpg, jpeg, png, gif)quality(jpg/jpeg only)full_page(0/1)viewport_width/viewport_height
-
Create a workflow and add the
Take Screenshotaction. SetapiKey(or exportSCREENSHOTBASE_API_KEY). Configureurl, etc., or use defaults. Click Test. -
(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"));- 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"- Action uses native
fetchand returns a JSON payload with the binary body as base64 and metadata. - Auth: API key in
apikeyheader.
- Website: https://screenshotbase.com
- Docs: https://screenshotbase.com/docs/