View as Markdown
Cloudinary icon

Cloudinary ACTION

Upload Media Asset

Upload media assets such as images or videos. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Cloudinary account once, then configure and run Upload Media Asset from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "cloudinary-upload-media-asset",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    cloudinary: { authProvisionId: "apn_xxxxxxx" },
    file: "File Path or URL",
    publicId: "Public Id",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Upload Media Asset inputs
Property Type Description
file File Path or URL string
The file to upload. You can provide a file path from the /tmp folder (e.g. /tmp/myFile.jpg) or a public file URL, among other options supported by Cloudinary (see the documentation for available options).
Required
publicId Public Id string
The identifier that is used for accessing the uploaded asset. See the documentation for more information.
Optional
folder Folder string
An optional folder name where the uploaded asset will be stored. The public ID contains the full path of the uploaded asset, including the folder name.
Optional
resourceType Resource Type string
Set the type of file you are uploading or use auto to automatically detect the file type. Valid values: image, raw, video and auto. Defaults: image for server-side uploading and auto for client-side uploading. Note: Use the video resource type for all video assets as well as for audio files, such as .mp3.
Optional
type Type string
The delivery type. Allows uploading assets as private or authenticated instead of the default upload mode.
Optional
accessMode Access Mode string
Allows the asset to behave as if it's of the authenticated 'type'. Default is public. The asset can later be made public by changing its Access Mode via the Admin API, without having to update any delivery URLs.
Optional
tags Tags string[]
An array of tag names to assign to the uploaded asset for later group reference.
Optional
format Convert to Format string
An optional format to convert the uploaded asset to before saving in the cloud, e.g. jpg.
Optional
backup Backup boolean
Tell Cloudinary whether to back up the uploaded asset. Overrides the default backup settings of your account.
Optional
additionalOptions Additional Options object
Additional parameters and their values to use in the upload. See the documentation for all available options. Values will be parsed as JSON where applicable. Example: { "use_filename": true }
Optional
syncDir SyncDir dir
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
cloudinary-upload-media-asset
Version
1.0.4
App
Cloudinary
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes