CloudConvert
Convert files between formats using CloudConvert.
On this page
Connect
Auth type: API key (secret_text). Paste the API key (or token) from the provider's settings into the connect dialog. It is encrypted at rest and only decrypted on the server when an action runs.
- In the editor: Backend panel, Integrations tab, then Connect. This connects it for the project.
- For every project in a workspace: Workspace settings, Integrations.
- Owners and admins choose which integrations members may connect in the admin panel (Integrations tab), and can attach their own OAuth app there.
Call it from a workflow
Pass the action name and its input. The call resolves with { success, output, error? }; a missing connection resolves with success false and the reason. See ctx.integrations.invoke and ctx.integrations.call.
// .workflow.js (native ctx)
export async function run(ctx) {
const res = await ctx.integrations.invoke("cloudconvert", "convert_file", {
"import_method": "upload",
"output_format": "<output_format>",
"wait_for_completion": true
});
if (!res.success) throw new Error(res.error);
ctx.log.info("CloudConvert answered", { output: res.output });
}// defineWorkflow module (@app/sdk ctx)
import { defineWorkflow } from "@app/sdk";
export default defineWorkflow({
id: "cloudconvert-convert-file",
name: "CloudConvert: Convert File",
description: "Calls CloudConvert when a row is created.",
trigger: { type: "entity_event", entity: "tickets", event: "created" },
async run(ctx, event) {
const res = await ctx.integrations.call("cloudconvert", {
"action": "convert_file",
"import_method": "upload",
"output_format": "<output_format>",
"wait_for_completion": true
}) as { success: boolean; error?: string };
if (!res.success) throw new Error(res.error);
},
});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_filein catalog
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- Tier
- Community