Cloudinary

Upload and transform images and media with Cloudinary.

OtherAPI key5 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (5)
  4. transformResource
  5. createUsageReport
  6. deleteResource
  7. findResourceByPublicId
  8. uploadResource
  9. 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("cloudinary", action, input) resolves with the provider's answer and rejects when Cloudinary 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: "cloudinary"} says whether yours can call it.

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

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

Actions

transformResource

Transform Resource. Apply transformations (resize, crop, watermark, etc.) to an asset and generate a new URL.

InputTypeDescription
resource_typerequiredid (picked from your account)Select the type of resource to upload to Cloudinary.
public_ids_dropdownoptionalids (picked from your account)Select assets to delete by their public IDs
public_id_manualoptionaltextOr enter public ID manually if not in dropdown
widthoptionalnumberTarget width in pixels
heightoptionalnumberTarget height in pixels
crop_modeoptionalone of "scale" | "fill" | "fit" | "crop" | "thumb" | "limit"How to handle resizing when aspect ratios differ
gravityoptionalone of "auto" | "face" | "center" | "north" | "south" | "east" | "west" | "north_west" | "north_east" | "south_west" | "south_east"Which part to focus on when cropping
formatoptionalone of "auto" | "jpg" | "png" | "webp" | "avif" | "gif" | "svg"Convert to this format
qualityoptionalone of "auto" | "90" | "80" | "70" | "50"Image quality/compression level
borderoptionaltextAdd border (e.g., "5px_solid_blue", "10px_solid_#ff0000")
radiusoptionalone of "10" | "20" | "50" | "max"Round corners or make circular
opacityoptionalnumberTransparency level (0-100, where 100 is opaque)
rotationoptionalnumberRotate image by degrees (0-360)
raw_transformationoptionallong textAdvanced: Raw transformation string (e.g., "c_fill,w_300,h_200/e_sepia/r_20"). This will be applied after the above basic transformations.
generate_url_onlyoptionalbooleanIf true, only return the transformation URL. If false, also make a request to generate the transformed asset.

createUsageReport

Create Usage Report. Generate a comprehensive report of account usage and quotas including storage, bandwidth, transformations, requests, and add-on usage.

InputTypeDescription
dateoptionaldate-time (ISO)Date for the usage report. Must be within the last 3 months. Leave empty for current date.
include_breakdownoptionalbooleanWhether to include detailed breakdown of transformation types and add-on usage in the response.

deleteResource

Delete Resource. Permanently delete images, videos, or files from Cloudinary.

InputTypeDescription
deletion_moderequiredone of "public_ids" | "tag" | "prefix"Choose how to specify assets for deletion
resource_typerequiredid (picked from your account)Select the type of resource to upload to Cloudinary.
public_ids_dropdownoptionalids (picked from your account)Select assets to delete by their public IDs
public_ids_manualoptionallong textOr type comma-separated public IDs manually (up to 100). Example: image1,image2,folder/image3
tag_dropdownoptionalid (picked from your account)Select existing tags or type new ones (comma-separated)
tag_manualoptionaltextOr type tag name manually to delete all assets with this tag (up to 1000 assets)
prefixoptionaltextDelete all assets whose public ID starts with this prefix (up to 1000 assets)
typeoptionalone of "upload" | "private" | "authenticated"The delivery type of assets to delete
keep_originaloptionalbooleanDelete only derived assets, keep the original
invalidateoptionalbooleanWhether to invalidate CDN cached copies. Takes a few minutes to propagate.

findResourceByPublicId

Find Resource by Public ID. Retrieve details of an asset using its unique public ID.

InputTypeDescription
resource_typerequiredid (picked from your account)Select the type of resource to upload to Cloudinary.
public_id_dropdownoptionalid (picked from your account)Select an asset to find by its public ID
public_id_manualoptionaltextOr enter the public ID manually if not found in dropdown (e.g., "sample", "folder/image-name")
delivery_typeoptionalone of "upload" | "private" | "authenticated"The delivery type of the asset

uploadResource

Upload Resource. Upload a new image, video, or file to Cloudinary.

InputTypeDescription
filerequiredfileThe file to upload to Cloudinary.
public_idoptionaltextThe public ID for the uploaded resource. If not specified, a random ID will be generated.
folderoptionalid (picked from your account)Select an existing folder or type a new folder path (e.g., "samples/animals")
tagsoptionalids (picked from your account)Select existing tags or type new ones
overwriteoptionalbooleanWhether to overwrite existing assets with the same public ID.
use_filenameoptionalbooleanWhether to use the original file name as the public ID.

Details

Id
cloudinary
Category
Other
Tags
images, media, cdn, transformation
Package
@activepieces/piece-cloudinary@0.1.3
Runs
Through the integration runner