CloudConvert

Convert files between formats using CloudConvert.

OtherAPI key7 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (7)
  4. convert_file
  5. archive_file
  6. capture_website
  7. custom_api_call
  8. download_file
  9. merge_pdf
  10. optimize_file
  11. Details

Connect

Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.

  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("cloudconvert", action, input) resolves with the provider's answer and rejects when CloudConvert isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "cloudconvert"} says whether yours can call it.

Workflow
// workflows/notify.ts: call CloudConvert when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellCloudconvert = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when CloudConvert isn't connected.
  const output = await step.run("CloudConvert", () =>
    step.ctx.integrations.invoke("cloudconvert", "convert_file", {
      "import_method": "upload",
      "output_format": "<output_format>",
      "wait_for_completion": true
    }),
  );
  step.ctx.log("CloudConvert answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "cloudconvert",
    "piece_action": "convert_file",
    "input": {
      "import_method": "upload",
      "output_format": "<output_format>",
      "wait_for_completion": true
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/cloudconvert/convert_file" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"import_method":"upload","output_format":"<output_format>","wait_for_completion":true}}'

Actions

convert_file

Convert File. Create a basic file conversion task for a single file with desired output format

InputTypeDescription
import_methodrequiredone of "upload" | "url" | "stored_file"How to import the file for conversion
fileoptionalfileFile to upload and convert (select from your device)
urloptionaltextURL of the file to convert
stored_file_idoptionaltextID of a previously stored file in Activepieces to convert
input_formatoptionalone of "auto" | "pdf" | "docx" | "doc" | "txt" | "jpg" | "png" | "html" | "other"The format of the input file. Leave as "Auto-detect" to let CloudConvert detect automatically
output_formatrequiredid (picked from your account)The target format to convert to
filenameoptionaltextChoose a filename (including extension) for the output file
engineoptionalid (picked from your account)Use a specific engine for the conversion
engine_versionoptionaltextUse a specific engine version for the conversion
timeoutoptionalnumberTimeout in seconds after which the task will be cancelled
wait_for_completionrequiredbooleanWait for the conversion to complete before returning
store_fileoptionalbooleanDownload and store the converted file in Activepieces

archive_file

Archive File. Creates a ZIP, RAR, 7Z, TAR, TAR.GZ or TAR.BZ2 archive

InputTypeDescription
import_methodrequiredone of "upload" | "url" | "stored_file"How to import the files for archiving
filesrequiredarrayList of files to include in the archive
output_formatrequiredone of "zip" | "rar" | "7z" | "tar" | "targz" | "tarbz2"The archive format to create
filenameoptionaltextChoose a filename (including extension) for the archive file
engineoptionalone of "7z" | "archivetool"Use a specific engine for the archiving
engine_versionoptionaltextUse a specific engine version for the archiving
timeoutoptionalnumberTimeout in seconds after which the task will be cancelled
wait_for_completionrequiredbooleanWait for the archive creation to complete before returning
store_fileoptionalbooleanDownload and store the created archive in Activepieces

capture_website

Capture Website. Capture webpage as PDF, screenshot PNG, or JPG from a URL

InputTypeDescription
urlrequiredtextThe URL of the website to capture
output_formatrequiredone of "pdf" | "png" | "jpg"The target format to convert to
pagesoptionaltextPage range (e.g. 1-3) or comma separated list (e.g. 1,2,3) of pages
zoomoptionalnumberZoom level to display the website. Defaults to 1
page_widthoptionalnumberPage width in cm
page_heightoptionalnumberPage height in cm
page_formatoptionalone of "letter" | "legal" | "tabloid" | "ledger" | "a0" | "a1" | "a2" | "a3" | "a4" | "a5" | "a6"Paper format type when printing a PDF. Overrides page_width and page_height
page_orientationoptionalone of "portrait" | "landscape"Page orientation for PDF output
margin_topoptionalnumberPage top margin in mm
margin_bottomoptionalnumberPage bottom margin in mm
margin_leftoptionalnumberPage left margin in mm
margin_rightoptionalnumberPage right margin in mm
print_backgroundoptionalbooleanRender the background of websites
display_header_footeroptionalbooleanCreate a header and a footer with the URL and page numbers
header_templateoptionallong textHTML template for the print header with classes: date, title, url, pageNumber, totalPages
footer_templateoptionallong textHTML template for the print footer with classes: date, title, url, pageNumber, totalPages
wait_untiloptionalone of "load" | "domcontentloaded" | "networkidle0" | "networkidle2"When to consider navigation finished
wait_for_elementoptionaltextCSS selector for element to wait for (e.g. "body" or "#element")
wait_timeoptionalnumberAdditional time in ms to wait after the page load
css_media_typeoptionalone of "print" | "screen"Changes the CSS media type of the page

custom_api_call

Custom API Call. Make a custom API call to a specific endpoint

InputTypeDescription
urlrequiredobject (depends on other props)url
methodrequiredone of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD"Method
headersrequiredobjectAuthorization headers are injected automatically from your connection.
queryParamsrequiredobjectQuery Parameters
body_typeoptionalone of "none" | "json" | "form_data" | "raw"Body Type
bodyoptionalobject (depends on other props)Body
response_is_binaryoptionalbooleanEnable for files like PDFs, images, etc.
failsafeoptionalbooleanNo Error on Failure
timeoutoptionalnumberTimeout (in seconds)
followRedirectsoptionalbooleanFollow redirects

download_file

Download a File. Downloads output from a completed task

InputTypeDescription
task_idrequiredtextID of the CloudConvert task to retrieve
includeoptionalids (picked from your account)Additional data to include in the response
store_fileoptionalbooleanDownload and store the output files in Activepieces

merge_pdf

Merge Files to PDF. Combine multiple documents/images into a single PDF

InputTypeDescription
import_methodrequiredone of "upload" | "url" | "stored_file"How to import the files for merging
filesrequiredarrayList of files to merge into a single PDF
filenameoptionaltextChoose a filename (including extension) for the output file
engineoptionalone of "3heights" | "pdftron" | "mupdf" | "poppler" | "libreoffice"Use a specific engine for the conversion
engine_versionoptionaltextUse a specific engine version for the conversion
timeoutoptionalnumberTimeout in seconds after which the task will be cancelled
wait_for_completionrequiredbooleanWait for the merge to complete before returning
store_fileoptionalbooleanDownload and store the merged PDF in Activepieces

optimize_file

Optimize File. Creates a task to optimize and compress a file

InputTypeDescription
import_methodrequiredone of "upload" | "url" | "stored_file"How to import the file for optimization
fileoptionalfileFile to upload and optimize (PDF, PNG, JPG)
urloptionaltextURL of the file to optimize
stored_file_idoptionaltextID of a previously stored file in Activepieces to optimize
input_formatoptionalone of "pdf" | "png" | "jpg"The current format of the file. If not set, the extension of the input file is used
profileoptionalone of "web" | "print" | "archive" | "mrc" | "max"Optimization profile for specific target needs
flatten_signaturesoptionalbooleanFlatten visible signatures and keep them as non-editable graphics
colorspaceoptionalone of "unchanged" | "rgb" | "cmyk" | "grayscale"Color space of raster images
filenameoptionaltextChoose a filename (including extension) for the output file
engineoptionalone of "3heights" | "pdftools"Use a specific engine for the optimization
engine_versionoptionaltextUse a specific engine version for the optimization
timeoutoptionalnumberTimeout in seconds after which the task will be cancelled
wait_for_completionrequiredbooleanWait for the optimization to complete before returning
store_fileoptionalbooleanDownload and store the optimized file in Activepieces

Details

Id
cloudconvert
Category
Other
Tags
conversion, files, pdf, media
Package
@activepieces/piece-cloudconvert@0.1.4
Runs
Through the integration runner