CloudConvert
Convert files between formats using CloudConvert.
On this page
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.
// 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);
});{
"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"
}
}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
| Input | Type | Description |
|---|---|---|
import_methodrequired | one of "upload" | "url" | "stored_file" | How to import the file for conversion |
fileoptional | file | File to upload and convert (select from your device) |
urloptional | text | URL of the file to convert |
stored_file_idoptional | text | ID of a previously stored file in Activepieces to convert |
input_formatoptional | one 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_formatrequired | id (picked from your account) | The target format to convert to |
filenameoptional | text | Choose a filename (including extension) for the output file |
engineoptional | id (picked from your account) | Use a specific engine for the conversion |
engine_versionoptional | text | Use a specific engine version for the conversion |
timeoutoptional | number | Timeout in seconds after which the task will be cancelled |
wait_for_completionrequired | boolean | Wait for the conversion to complete before returning |
store_fileoptional | boolean | Download and store the converted file in Activepieces |
archive_file
Archive File. Creates a ZIP, RAR, 7Z, TAR, TAR.GZ or TAR.BZ2 archive
| Input | Type | Description |
|---|---|---|
import_methodrequired | one of "upload" | "url" | "stored_file" | How to import the files for archiving |
filesrequired | array | List of files to include in the archive |
output_formatrequired | one of "zip" | "rar" | "7z" | "tar" | "targz" | "tarbz2" | The archive format to create |
filenameoptional | text | Choose a filename (including extension) for the archive file |
engineoptional | one of "7z" | "archivetool" | Use a specific engine for the archiving |
engine_versionoptional | text | Use a specific engine version for the archiving |
timeoutoptional | number | Timeout in seconds after which the task will be cancelled |
wait_for_completionrequired | boolean | Wait for the archive creation to complete before returning |
store_fileoptional | boolean | Download and store the created archive in Activepieces |
capture_website
Capture Website. Capture webpage as PDF, screenshot PNG, or JPG from a URL
| Input | Type | Description |
|---|---|---|
urlrequired | text | The URL of the website to capture |
output_formatrequired | one of "pdf" | "png" | "jpg" | The target format to convert to |
pagesoptional | text | Page range (e.g. 1-3) or comma separated list (e.g. 1,2,3) of pages |
zoomoptional | number | Zoom level to display the website. Defaults to 1 |
page_widthoptional | number | Page width in cm |
page_heightoptional | number | Page height in cm |
page_formatoptional | one 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_orientationoptional | one of "portrait" | "landscape" | Page orientation for PDF output |
margin_topoptional | number | Page top margin in mm |
margin_bottomoptional | number | Page bottom margin in mm |
margin_leftoptional | number | Page left margin in mm |
margin_rightoptional | number | Page right margin in mm |
print_backgroundoptional | boolean | Render the background of websites |
display_header_footeroptional | boolean | Create a header and a footer with the URL and page numbers |
header_templateoptional | long text | HTML template for the print header with classes: date, title, url, pageNumber, totalPages |
footer_templateoptional | long text | HTML template for the print footer with classes: date, title, url, pageNumber, totalPages |
wait_untiloptional | one of "load" | "domcontentloaded" | "networkidle0" | "networkidle2" | When to consider navigation finished |
wait_for_elementoptional | text | CSS selector for element to wait for (e.g. "body" or "#element") |
wait_timeoptional | number | Additional time in ms to wait after the page load |
css_media_typeoptional | one 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
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
download_file
Download a File. Downloads output from a completed task
| Input | Type | Description |
|---|---|---|
task_idrequired | text | ID of the CloudConvert task to retrieve |
includeoptional | ids (picked from your account) | Additional data to include in the response |
store_fileoptional | boolean | Download and store the output files in Activepieces |
merge_pdf
Merge Files to PDF. Combine multiple documents/images into a single PDF
| Input | Type | Description |
|---|---|---|
import_methodrequired | one of "upload" | "url" | "stored_file" | How to import the files for merging |
filesrequired | array | List of files to merge into a single PDF |
filenameoptional | text | Choose a filename (including extension) for the output file |
engineoptional | one of "3heights" | "pdftron" | "mupdf" | "poppler" | "libreoffice" | Use a specific engine for the conversion |
engine_versionoptional | text | Use a specific engine version for the conversion |
timeoutoptional | number | Timeout in seconds after which the task will be cancelled |
wait_for_completionrequired | boolean | Wait for the merge to complete before returning |
store_fileoptional | boolean | Download and store the merged PDF in Activepieces |
optimize_file
Optimize File. Creates a task to optimize and compress a file
| Input | Type | Description |
|---|---|---|
import_methodrequired | one of "upload" | "url" | "stored_file" | How to import the file for optimization |
fileoptional | file | File to upload and optimize (PDF, PNG, JPG) |
urloptional | text | URL of the file to optimize |
stored_file_idoptional | text | ID of a previously stored file in Activepieces to optimize |
input_formatoptional | one of "pdf" | "png" | "jpg" | The current format of the file. If not set, the extension of the input file is used |
profileoptional | one of "web" | "print" | "archive" | "mrc" | "max" | Optimization profile for specific target needs |
flatten_signaturesoptional | boolean | Flatten visible signatures and keep them as non-editable graphics |
colorspaceoptional | one of "unchanged" | "rgb" | "cmyk" | "grayscale" | Color space of raster images |
filenameoptional | text | Choose a filename (including extension) for the output file |
engineoptional | one of "3heights" | "pdftools" | Use a specific engine for the optimization |
engine_versionoptional | text | Use a specific engine version for the optimization |
timeoutoptional | number | Timeout in seconds after which the task will be cancelled |
wait_for_completionrequired | boolean | Wait for the optimization to complete before returning |
store_fileoptional | boolean | Download 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