> ## Documentation Index
> Fetch the complete documentation index at: https://cloudinary.com/documentation/llms.txt
> Use this file to discover all available pages before exploring further.

# PowerFlow block reference


As explained in [Build a PowerFlow](mediaflows_build_flow), PowerFlows are composed of a set of blocks that are connected together, creating step-by-step actions to execute. Each block performs a specific function. Blocks are grouped into different **categories** to make them more accessible.

  

## Triggers

Flows in MediaFlows start with **Trigger Blocks**, which define how and when a flow is initiated. Triggers can be event-driven (e.g., a webhook call, an asset upload) or time-based (e.g., a scheduled task). Each flow must begin with a trigger block.

---

### On Asset Upload
Triggers a flow whenever an asset is uploaded to Cloudinary.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Asset filter | Asset filter | No | Configure conditions to trigger the flow only for specific assets. When **Trigger for any asset** is selected, no filter is applied. Otherwise, filter by **Asset type** (`image`, `video`, `raw`), **Tags** (with operators like `is any of`, `is all of`, `are empty`, `aren't empty`), **Structured metadata** (specific metadata fields and values), or **Folders** (exact folder or including subfolders). |
| Webhook URL | Text | No | The unique webhook URL to send requests to. |

#### Example use case
When an image is uploaded by a third party, automatically check if it contains a watermark.

---

### On Upload With Preset
Triggers a flow whenever an asset is uploaded to Cloudinary using certain upload presets.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Trigger this flow whenever an asset is uploaded to Cloudinary using one of the following upload presets | Upload presets | Yes | Choose one or more upload presets. The flow runs when an asset is uploaded using any of the selected presets. |
| Asset filter | Asset filter | No | Configure conditions to trigger the flow only for specific assets. When **Trigger for any asset** is selected, no filter is applied. Otherwise, filter by **Asset type** (`image`, `video`, `raw`), **Tags** (with operators like `is any of`, `is all of`, `are empty`, `aren't empty`), **Structured metadata** (specific metadata fields and values), or **Folders** (exact folder or including subfolders). |
| Webhook URL | Text | No | The unique webhook URL to send requests to. |

> **NOTE**: When you test this flow, the upload preset(s) you select are automatically added to the test configuration options so you can choose which to test with:

![Test configuration showing the upload preset selection](https://cloudinary-res.cloudinary.com/image/upload/bo_1px_solid_gray/f_auto/q_auto/docs/mediaflows/upload_preset_test_config.png "thumb:c_scale,w_400,dpr_2.0, width: 400, popup:true")

#### Example use case
When an image is uploaded using the "product_images" upload preset, automatically tag it with product metadata and run quality checks.

---

### On Manual Run From Assets

Allows you to trigger flows manually from selected assets within the Cloudinary Media Library.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Description | Text | No | A short description of the flow to appear in the MediaFlows DAM App. |
| Return results as array | Toggle | No | Enable this if you want the output to be returned as an array. If disabled, the block is executed for each selected asset. |
| Input parameters | Multi-input variable | No | The input parameters that users can set when running the flow. For each parameter, enter a name and select a type (**Text**, **Number**, **Boolean**, or **Folder**). Subsequent blocks can access them as custom variables. |

#### Run the app

1. Navigate to your Media Library in **Assets**.
1. Either select one asset and click **Run Automation** from the (3-dots) context menu on the asset, or select multiple assets, and in the assets toolbar click **Run Automation**. Then choose the flow that you want to trigger.

    ![Run automation option from Assets](https://cloudinary-res.cloudinary.com/image/upload/bo_1px_solid_gray/f_auto/q_auto/docs/mediaflows/run_automation_mf.png "thumb:c_scale,w_600,dpr_2.0, width: 600, popup:true")

#### Example use case
A user manually selects some images in the Cloudinary Media Library and triggers a flow. In a **prompt** parameter they ask the same question about each of the images and the app sets the answer for each image in its metadata.

> **NOTE**: Only MediaFlows users who are also Master Admins or Admins can run flows from Assets.

---

### On Scheduled Search
Triggers a flow on a predefined schedule by searching for assets that match specific criteria.

The flow works on 50 results at a time, in parallel, so in the logs you may see multiple executions for the same trigger, each with a maximum of 50 assets. There's no limit to the maximum number of assets processed by the flow, but you can set it to process a small sample first when building and testing the flow. 

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Recurring schedule (AWS cron expression) | Cron schedule | Yes | The AWS cron expression to use for scheduling this search. |
| Search expression | Text | Yes | A Lucene-like string used to define the search query. See [search expressions](search_expressions) for syntax details. |
| Sort by | Dropdown | No | The field to sort the results by.**Options:** `created_at`, `uploaded_at`, `public_id`, `filename`, `format`, `resource_type`, `type`, `bytes`, `width`, `height`, `aspect_ratio`, `pixels`, `duration`, `folder`, `score` |
| Sort order | Dropdown | No | Choose whether to sort results in ascending or descending order.**Options:** `asc`, `desc` |
| Maximum assets to process | Number | No | Processes only the first matching assets up to the set limit. |

#### Example use case
Each day, apply a transformation to all assets uploaded in the last 24 hours.

#### Example cron expressions
| Scenario | AWS cron expression |
|----------|---------------------|
| Run every day at 10:00 AM UTC | `0 10 * * ? *` |
| Run every Monday at 2:00 PM UTC | `0 14 ? * MON *` |
| Run once per hour | `0 * * * ? *` |

> **TIP**: Refer to the [cron expression reference](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-scheduled-rule-pattern.html) for more cron syntax.

#### Example search expressions
| Use case | Search expression |
|----------|------------------|
| Find all assets in "products" with the tag "spring_collection" | `folder=products AND tags=spring_collection` |
| Find all assets that are of type "video" | `resource_type=video` |

> **TIP**: Learn more about writing [search expressions](search_expressions).

---

### On Schedule
Executes flows at predefined time intervals, similar to a cron job.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Recurring schedule (AWS cron expression) | Cron schedule | No | The AWS cron expression to use for scheduling this flow. |

#### Example use case
Send a daily report on your account usage.

#### Example cron expressions
| Scenario | AWS cron expression |
|----------|---------------------|
| Run every day at 10:00 AM UTC | `0 10 * * ? *` |
| Run every Monday at 2:00 PM UTC | `0 14 ? * MON *` |
| Run once per hour | `0 * * * ? *` |

> **TIP**: Refer to the [cron expression reference](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-scheduled-rule-pattern.html) for more cron syntax.

> **NOTE**: Uses UTC timezone.

---

### On Webhook Received
Initiates a flow when an HTTP request is received at a specific webhook URL. This allows external applications to trigger flows in MediaFlows.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Webhook URL | Text | No | The unique webhook URL to send requests to. |
| Payload fields to expose | Multi-value text | No | Enter fields from the webhook payload to use in later blocks. For example: `notification_type` or `response.public_id`. |

#### Example use case
A custom CMS sends a webhook to MediaFlows when an asset is updated. The flow checks the `notification_type` to determine whether the asset was tagged, renamed, or moved, and routes the logic accordingly.

---

### On Notification Received
Triggers a flow based on one or more Cloudinary webhook notifications.  It's useful for notifications that don't have dedicated trigger blocks already defined, or if you want to set up one trigger for multiple notifications.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Notification event | Multi-select | No | Select the type of event that should trigger this webhook.**Options:** `Upload`, `Move`, `Delete`, `Resource display name changed`, `Resource context changed`, `Resource metadata changed`, `Access control changed`, `Create folder`, `Delete folder`, `Rename`, `Resource tags changed`, `Move or rename asset folder` |

#### Example use case
A flow starts when a user moves an asset to a folder or uploads an asset to a folder.

> **NOTES**:
>
> * Some notifications may not be available for product environments using the legacy fixed folder mode.

> * The structure of each notification is different so you need to take multiple structures into consideration.
> {/note}
> ---
> ### On Proof Status Change
> Triggers a flow when a change to a proof's status in a Creative Approval flow causes a [decision](dam_admin_creative_approval_flows#understanding_proof_decision_calculation) to be made about the flow.
> The flow runs separately for each asset in the proof that meets the filter criteria.
> {note}
> **Creative Approval** is a premium offering for our **Assets** product. Availability depends on your account setup and incurs an additional cost. If **Creative Approval** isn't yet enabled for your account and you'd like to activate it, please contact your Customer Success Manager.
> {/note}
> #### Configuration
> {table:class=mf-config-table} Field | Type | Required | Description |
> |-------|------|----------|-------------|
> | Proof status filter | Proof status filter | No | Configure when the trigger runs based on proof status and Creative Approval flow:- **When proof status is set to**: Select which status changes trigger the flow.**Options:** `Any Status`, `Decision pending`, `Approved`, `Approved with changes`, `Changes required`, `Not relevant`- **Trigger for these Creative Approval flows**: Select specific flows or choose `Any Flow` to trigger on all approval flows. |
> | Asset filter | Asset filter | No | Configure conditions to trigger the flow only for specific assets. When **Trigger for any asset** is selected, no filter is applied. Otherwise, filter by **Asset type** (`image`, `video`, `raw`), **Tags** (with operators like `is any of`, `is all of`, `are empty`, `aren't empty`), **Structured metadata** (specific metadata fields and values), or **Folders** (exact folder or including subfolders). |
> | Webhook URL | Text | No | The unique webhook URL to send requests to. |
> #### Example use cases

> * When a proof is approved, automatically move all images in the proof to a "Ready for production" folder and update their structured metadata.

> * When a proof requires changes, restrict access control and move the assets to a revision folder.
> {reading: :title=See also}

> * [Creative Approval Flows Admin Guide](dam_admin_creative_approval_flows) - Learn how to set up and manage approval flows.

> * [Understanding proof decision calculation](dam_admin_creative_approval_flows#understanding_proof_decision_calculation) - Learn how proof decisions are calculated based on reviewer decisions.
> {/reading}
> ---
> ### On Folder Change
> Triggers a flow when a user moves an asset between folders in Cloudinary.
> #### Configuration
> {table:class=mf-config-table} Field | Type | Required | Description |
> |-------|------|----------|-------------|
> | From folder | Folder filter | No | Specify the source folder from which assets are moved. First, choose an operator, then select a folder from your account.**Options:** `Is`, `Is, or is a subfolder of` |
> | To folder | Folder filter | No | Specify the destination folder to which assets are moved. First, choose an operator, then select a folder from your account.**Options:** `Is`, `Is, or is a subfolder of` |
> | Asset filter | Asset filter | No | Configure conditions to trigger the flow only for specific assets. When **Trigger for any asset** is selected, no filter is applied. Otherwise, filter by **Asset type** (`image`, `video`, `raw`), **Tags** (with operators like `is any of`, `is all of`, `are empty`, `aren't empty`), **Structured metadata** (specific metadata fields and values), or **Folders** (exact folder or including subfolders). Use **Add Condition** to combine multiple criteria. |
> #### Example use cases

> * Moving an image from any folder into an "Approved" folder triggers a transformation process.

> * Moving a video asset from "Draft" to "Published" triggers a notification workflow.
> {notes}

> * Not supported for product environments using the legacy fixed folder mode.

> * In legacy mode, moving an asset changes its `public_id`, triggering a **rename** notification instead.

---

### On Structured Metadata Change
Triggers a flow when an asset's structured metadata is modified.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Structured metadata filter | Structured metadata filter | No | Configure when to trigger based on structured metadata changes. When **Trigger for any structured metadata change** is selected, all metadata changes trigger the flow. Otherwise, specify a metadata field, choose an operator, and select one or more values to filter on.**Options:** `is any of`, `is all of`, `are empty`, `aren't empty` |
| Asset filter | Asset filter | No | Configure conditions to trigger the flow only for specific assets. When **Trigger for any asset** is selected, no filter is applied. Otherwise, filter by **Asset type** (`image`, `video`, `raw`), **Tags** (with operators like `is any of`, `is all of`, `are empty`, `aren't empty`), **Structured metadata** (specific metadata fields and values), or **Folders** (exact folder or including subfolders). Use **Add Condition** to combine multiple criteria. |

#### Example use cases
* When an asset's "Status" metadata field changes to "Archived," move it to a designated folder.
* When the "Moderation Source" metadata is set to "Automatic," trigger an automated approval workflow.

---

### On Tag Change
Triggers a flow when a tag is added to or removed from an asset in Cloudinary.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Tag filter | Tag filter | No | Configure when to trigger based on tag changes. When **Trigger when any tag is added or removed** is selected, all tag changes trigger the flow. Otherwise, specify an operator, enter one or more tags, and choose an action.**Tag operators:** `All of these`, `Any of these`**Actions:** `Added`, `Removed` |
| Asset filter | Asset filter | No | Configure conditions to trigger the flow only for specific assets. When **Trigger for any asset** is selected, no filter is applied. Otherwise, filter by **Asset type** (`image`, `video`, `raw`), **Tags** (with operators like `is any of`, `is all of`, `are empty`, `aren't empty`), **Structured metadata** (specific metadata fields and values), or **Folders** (exact folder or including subfolders). Use **Add Condition** to combine multiple criteria. |

#### Example use cases
* When the tag "featured" is added to an asset, automatically generate social media versions.
* When any tag is removed from a video asset, send a notification to the content team.

---

### On Trigger From Another Flow
Triggers a flow when another flow calls it using a [Trigger Another Flow](#trigger_another_flow) block.

> **TIP**: Add this block to a flow before creating a flow with a [Trigger Another Flow](#trigger_another_flow) block, so that you can select this flow when configuring that block.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Triggered by these flows | Multi-select | No | The flows that are allowed to trigger this flow. Select a flow from the dropdown, or click **Custom** to manually enter the flow ID. Add more flows as required.|

#### Example use case
Create a reusable "watermarking" flow that can be triggered from multiple other flows, each handling different asset types.

## Flow logic

These blocks can be used by any flow to implement logical flow functionality.

---

### Complex Condition

Evaluates JSON data against [JsonLogic](https://jsonlogic.com) expressions to decide the flow's path.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| JSON data | Text | Yes | The JSON object to evaluate against the condition. Typically the output of a previous block. |
| JsonLogic expression | Code | Yes | A JsonLogic expression that returns true or false based on the input data. |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`). 

#### Example use case
If an image is grayscale, apply a tag.

> **TIP**: Refer to the [JsonLogic documentation](https://jsonlogic.com/operations.html) for supported operations.

#### Output paths
* **True** → Block connected to the **upper** blue dot executes.
* **False** → Block connected to the **lower** blue dot executes.

#### Example JsonLogic 

#### Example 1: Check results from AI moderation by prompts Loop through all responses from an [AI Vision Moderate By Prompts](#ai_vision_moderate_by_prompts) block. If at least one response has `"value": "yes"`, the condition returns `true`. If none of the responses are "yes", it returns `false`.

```JsonLogic
{
    "some": [
        {{$.AI_Vision_Moderate_by_Prompts.result.responses}},
        { 
            "===": [{ "var": "value" }, "yes"] 
        }
    ]
}
```

#### Example 2: Check if an image is grayscale Check whether each of the predominant colors in an uploaded image is either white, black, or gray. If so, the condition returns `true`, meaning the image is grayscale. If any other colors are found, it returns `false`. 

```JsonLogic
{
    "all": [
        {{$.Cloudinary_Upload.result.predominant.cloudinary}},
        {
            "in": [{ "var": "0" }, ["white", "black", "gray"]]
        }
    ]
}
```

> **NOTE**: For the upload response to return predominant colors, set the `colors` parameter of the [upload](image_upload_api_reference#upload_optional_parameters) request to `true`, which you can do directly, or using an [upload preset](upload_presets).

---

### Condition

Evaluates a comparison between two variables using a specified operator.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| First variable | Text | Yes | The first value to compare. This must be a variable from a previous block. |
| Operator | Dropdown | No | The comparison operator to use.**Options:** `not_equal_to`, `equal_to`, `is_present`, `greater_than`, `less_than`, `array_contains`, `greater_than_or_equal_to`, `array_not_contains`, `less_than_or_equal_to` |
| Second variable | Text | Yes | The second value to compare. Can be a static value or a variable from a previous block. |
| Variable type | Dropdown | No | The data type of the second variable. Default: `String`**Options:** `Number`, `String`, `Boolean` |

#### Example use case
Only continue the flow if an asset is in a specific folder.

#### Output paths
* **True** → Block connected to the **upper** blue dot executes.
* **False** → Block connected to the **lower** blue dot executes.

---

### Iterate Assets

Executes the next connected blocks on each asset in a list.

> **NOTE**: If the items in the list aren't Cloudinary assets, use [Iterate List](#iterate_list) instead.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Source of asset list | Text | Yes | A list of Cloudinary assets that this step will iterate through, running the next blocks on each asset. |
| Run in parallel | Toggle | No | Whether to iterate over the items one by one or process them in parallel. |

#### Example use case
Search for images with a particular tag and delete each of those images.
  
---

### Iterate List

Executes the next connected blocks on each item in a list.

> **NOTE**: If the items in the list are Cloudinary assets, consider using [Iterate Assets](#iterate_assets) instead.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| List to iterate | Text | Yes | A list of items that this step will iterate through, running the next blocks on each item. |
| Fields to expose | Multi-value text | No | Specify which fields from each item you want to use in later blocks. For example: `notification_type` or `response.public_id`. |
| Run in parallel | Toggle | No | Whether to iterate over the items one by one or process them in parallel. |

#### Example use case
Add a prefix to each product SKU in a list.
  
---

### Trigger Another Flow

Triggers another flow from within the current flow. This allows you to create modular, reusable flows that can be called from multiple parent flows. The flow to trigger must start with an [On Trigger From Another Flow](#on_trigger_from_another_flow) block.

> **TIP**: Set up the flow to trigger before configuring this block so that you can select that flow when configuring this block.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Flow to trigger | Flow selector | Yes | Select a flow from the dropdown, or click **Custom** to manually enter the flow ID. |

#### Example use case
A main flow handles different asset types and triggers a specialized "watermarking" flow for images that need branding applied.

---

### Wait For All

Pauses execution until all block executions following an [Iterate List](#iterate_list) or [Iterate Assets](#iterate_assets) block complete.

> **NOTE**: Blocks that come after a [Wait For All](#wait_for_all) block cannot access outputs from blocks that are positioned between the [Iterate List](#apply_on_each)/[Assets](#iterate_assets) block and the [Wait For All](#wait_for_all) block.

#### Configuration
No configuration needed.

#### Example use case
Wait for all tags to be added before sending a confirmation message.

## Developer tools

These blocks help with debugging, string operations, data shaping, and integration with external APIs.

---

### Add To Logs

Outputs a message in the execution logs, useful for debugging and tracking flow behavior.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Message | Text | No | The message to display. This can be a combination of plain text and variables from previous blocks. |

#### Example use case
Log the name of each uploaded file during testing.

---

### Delay

Pauses the flow for a specified number of seconds.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Number of seconds | Text | Yes | The number of seconds to delay. Must be between 1 and 240 (up to 4 minutes). Default: `30` |

#### Example use case
Wait 10 seconds before executing an API call to avoid throttling.

---

### Export Metadata To CSV

Generates a CSV file that lists the provided assets and their structured metadata values in a readable format.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Assets | Text | Yes | An array of assets to export. Each asset must include `public_id`, `type`, and `resource_type`. |
| File name | Text | Yes | Name of the CSV file to generate. Default: `assets_metadata.csv` |
| Destination folder | Folder selector | Yes | Folder path where the generated CSV file will be stored. |

#### CSV file format

* The first three columns are **Public ID**, **Type**, and **Resource type**.
* Additional columns are added for each structured metadata field, using the field's display name as the header.
* Multi-value metadata fields are written as comma-separated values.
* Missing metadata values result in empty cells.

#### Block output

The block returns the following details of the generated CSV file:

| Output | Description |
|--------|-------------|
| `public_id` | Public ID of the generated CSV asset |
| `resource_type` | Resource type of the generated CSV asset (raw) |
| `type` | Delivery type of the generated CSV asset |
| `secure_url` | Secure URL to access the generated CSV file |

#### Example use case
Export a list of product images and their metadata to a CSV file for review or integration with external systems.

---

### Join Strings

Concatenates two strings, optionally using a separator.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| First string | Text | Yes | The first string to concatenate. |
| Second string | Text | Yes | The second string to concatenate. |
| Separator (optional) | Text | No | An optional character or string to insert between the two strings (e.g., space, dash, or slash). |

#### Example use case
Combine a folder path and filename into a full asset path.

---

### JQ Processor

Processes JSON data using a [JQ expression](https://www.devtoolsdaily.com/cheatsheets/jq/) and outputs transformed data as JSON.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| JSON data | Text | Yes | The input JSON to process using the JQ expression. This is usually output from a previous block. |
| JQ expression | Code | Yes | A JQ expression used to transform or extract data from the input JSON. |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`). 

> **TIP**: Use the [JQ Playground](https://www.devtoolsdaily.com/jq_playground/) to test your expressions.

#### Example use cases
#### Example 1: Parse strings and extract product details from a filename In this example, the public ID of the uploaded image contains product information in the following format: `[Product Type]-[Collection]-[Color]-[Size]`

Where:

Identifier | Values
--|--
**Product Type** | T = T-shirtH = HoodieP = Pants
**Collection** | CL = ClassicSP = SportLX = Luxury
**Color** | WHT = WhiteBLK = BlackRED = Red
**Size:** | S = SmallM = MediumL = Large

So, an uploaded image with public ID: `H-SP-RED-L`, means it's a large, red hoodie, from the Sport collection.

The aim is for the **JQ Processor block** to parse the public ID string, and produce the following JSON result, which you can subsequently use, for example, to update metadata in Cloudinary or any other system:

```json
{
  "result": {
    "Product Type": "Hoodie",
    "Collection": "Sport",
    "Color": "Red",
    "Size": "Large"
  }
}
```

![Example flow with logs](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/docs/mediaflows/jq-example1-flow-and-logs.png "thumb:c_scale,w_800,dpr_2.0, width: 800, popup:true")

To achieve this, configure the **JQ Processor** block as follows:

![Example flow with logs](https://cloudinary-res.cloudinary.com/image/upload/bo_1px_solid_gray/f_auto/q_auto/docs/mediaflows/jq-example1-block-parameters.png "thumb:c_scale,w_300,dpr_2.0, width: 300, popup:true")

**JSON data**: 

```JSON
{{$.Cloudinary_Upload.result}}
```

This evaluates to JSON data containing:

```json
{
  ...
  "public_id": "H-SP-RED-L"
  ...
}
```

**JQ expression**:

```JQ
(.public_id | split("-")) as $parts | 
{ 
  "Product Type": ($parts[0] | if . == "T" then "T-shirt" elif . == "H" then "Hoodie" elif . == "P" then "Pants" else "Unknown" end), 
  "Collection": ($parts[1] | if . == "CL" then "Classic" elif . == "SP" then "Sport" elif . == "LX" then "Luxury" else "Unknown" end), 
  "Color": ($parts[2] | if . == "WHT" then "White" elif . == "BLK" then "Black" elif . == "RED" then "Red" else "Unknown" end), 
  "Size": ($parts[3] | if . == "S" then "Small" elif . == "M" then "Medium" elif . == "L" then "Large" else "Unknown" end) 
}
```

> **TIP**: You can test the expression in the [JQ playground](https://www.devtoolsdaily.com/jq_playground/#v2=N4IglgdgDgrgLgFQKYA84gFwmAHQgAnxxFgCMAbMAYwH0wATYjIkACQFoBlABXYCUAogBF2AGWJ4AviAA0IAGZhycJACcBKKKswgAFADoylWg3wAffAGcolOLuLtiASif4AhpfwASKG9VxPCzxgIgIWblUAe3oYKjh8BABPKCQmfF0fPwCAbQAGAF1zfDB5fH18AF4KlgRifDgACyQCYgR2SwawfzqkSlLyqpZWOsbmocjosFSQfF6Sssrq4m4RppaQbjcIAJ7ySyQWAFUIAGsISIB3CB6IeicZUMJiAGFI8nIkOLBI68x0zP8lmyAEZChZ5gMliBnuIZqN1s9yB5LNRdhDFiweKsxsROFBIt0ZnN+hjiKIABrY9aiGAoGCqRK7fZHU7nK43O4PPBPaFvAlpDK+QHZABMYOKJMGxAA6qxanC1ixpZ0VGjJVCAEKiADSVJYGqRVBOaoWUpAgiEeuIfCQjCJewOxGOZ0uv1mt3uj0xYAAXtNmIKskCAMzi9FmzhWkCcAC2bneJshLAAslHk7awDAY4nSSBYfVFWS-ABzaazB0sl3soke0LSSRAA):

![JQ playground](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/docs/mediaflows/jq-playground.png "thumb:c_scale,w_800,dpr_2.0, width: 800, popup:true")

#### Example 2: Calculate an expiration date based on metadata In this example, an image is uploaded with contextual metadata:`days_to_expiration=200`

The aim is for the **JQ Processor block** to use the value of the metadata to calculate the actual expiration date based on the upload date. For example, if the upload date was 26th December 2024, the expiration date would be 200 days later, 14th July 2025:

```json
{
  "result": "2025-07-14"
}
```

![Example flow with logs](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/docs/mediaflows/jq-example2-flow-and-logs.png "thumb:c_scale,w_800,dpr_2.0, width: 800, popup:true")

To achieve this, configure the **JQ Processor** block as follows:

![Example flow with logs](https://cloudinary-res.cloudinary.com/image/upload/bo_1px_solid_gray/f_auto/q_auto/docs/mediaflows/jq-example2-block-parameters.png "thumb:c_scale,w_300,dpr_2.0, width: 300, popup:true")

**JSON data**: 

```JSON
{{$.Cloudinary_Upload.result.context.custom}}
```

This evaluates to JSON data containing the custom contextual metadata of the uploaded asset, which includes:

```json
{
  ...
  "days_to_expiration": "200"
  ...
}
```

**JQ expression**:

```JQ
(now + (.days_to_expiration | tonumber * 86400)) | todate | split("T")[0]
```

> **TIP**: You can test the expression in the [JQ playground](https://www.devtoolsdaily.com/jq_playground/#v2=N4IglgdgDgrgLgFQKYA84gFwmAHQgAnxxABMBDATwGcB9OAextSjACcy4x6JiMiQATAAYhxPAF8QAGhAAzMABs4SVgFEUUVphAAKCPQDu+ANT4dAOnLU6jZmw5cCAH3wMIMALYAjFfgBU+AAcAGwALCIAlBH4LgzkyjH4VFAKYHA6xAjEEQDaQgC6IOJAA):

![JQ playground](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/docs/mediaflows/jq-example2-playground.png "thumb:c_scale,w_800,dpr_2.0, width: 800, popup:true")

#### Example 3: Restructure tags into a formatted array In this example, an image is uploaded with a list of tags:`shirt,hat,jacket`

The aim is for the **JQ Processor block** to get the list of tags as a single comma-separated string and inject it into a new object, which could be the required input to another system:

```json
{
  "result": {
    "tags": [
      {
        "locale": "en",
        "data": "shirt,hat,jacket"
      }
    ]
  }
}
```

![Example flow with logs](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/docs/mediaflows/jq-example3-flow-and-logs.png "thumb:c_scale,w_800,dpr_2.0, width: 800, popup:true")

To achieve this, configure the **JQ Processor** block as follows:

![Example flow with logs](https://cloudinary-res.cloudinary.com/image/upload/bo_1px_solid_gray/f_auto/q_auto/docs/mediaflows/jq-example3-block-parameters.png "thumb:c_scale,w_300,dpr_2.0, width: 300, popup:true")

**JSON data**: 

```JSON
{{$.Cloudinary_Upload.result.tags}}
```

This evaluates to JSON data containing:

```json
{
  ...
  [
    "shirt",
    "hat",
    "jacket"
  ]
  ...
}
```

**JQ expression**:

```JQ
{
  "tags": [
    {
      "locale": "en",
      "data": (. | join(","))
    }
  ]
}
```

> **TIP**: You can test the expression in the [JQ playground](https://www.devtoolsdaily.com/jq_playground/#v2=N4IglgdgDgrgLgFQKYA84gFwgNoB0IAEBuIAzgBZgBOcJANPkSeQIa0gOHEgBWLAxgGsk7fAF0OIAGZgANnCRUAoiihVMIYI25wWAc1IkMBPFyJazRbrID2-FrKRHuSCPW1XuAEzYtnACgA6AgAfAh4bSH93EABKWI8CAF9tMXwkkCSgA):

![JQ playground](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/docs/mediaflows/jq-example3-playground.png "thumb:c_scale,w_800,dpr_2.0, width: 800, popup:true")

---

### JSON To Array

Transforms a JSON object into an array, embedding each original key into its corresponding item. This is especially useful for iterating over objects with the [Iterate List](#iterate_list) block.

Specify a key name to include the original object key as a new property in each array item. 

Example input:

```json
{
  "amazon_logo": {
    "width": 162,
    "height": 38,
    "x": 0,
    "y": 0
  },
  "apple_logo": {
    "width": 206,
    "height": 250,
    "x": 0,
    "y": 40
  },
  "microsoft_logo": {
    "width": 216,
    "height": 70,
    "x": 0,
    "y": 292
  }
},
```

With key name set to `public_id`, the output becomes:

```json
[
    {
      "width": 162,
      "height": 38,
      "x": 0,
      "y": 0,
      "public_id": "amazon_logo"
    },
    {
      "width": 206,
      "height": 250,
      "x": 0,
      "y": 40,
      "public_id": "apple_logo"
    },
    {
      "width": 216,
      "height": 70,
      "x": 0,
      "y": 292,
      "public_id": "microsoft_logo"
    }
]
```

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Object | Text | Yes | The input JSON object to convert to an array. Each key-value pair becomes an array item. |
| Key name | Text | Yes | The name of the field to hold each original object key inside the resulting array items. Example: If key name is "id", then output items will include "id": "original_key" Default: `key` |

#### Example use case
Convert a list of assets presented as a JSON object from a webhook notification into an array for tagging.

---

### JSONPath Query

Extracts parts of JSON using a [JSONPath](https://goessner.net/articles/JsonPath/index.html#e2) expression.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| JSONPath query | Text | Yes | Enter a JSONPath expression to extract values from a JSON object. |

#### Example use case
Pull public IDs from a list of assets with a particular tag (`{{$.Search_Media.result}}..public_id`).

---

### Parse CSV Asset

Parses a CSV file into an array of objects, with keys from the first row of headers.

> **NOTE**: CSV files greater than 100 kB are not supported by this block.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| CSV delimiter | Text | Yes | The character used to separate values in the CSV file (e.g., `,` or `;`). Default: `,` |
| Skip empty lines | Toggle | No | Skip empty lines or lines containing all empty values. |
| Trim values (cells) | Toggle | No | Remove leading and trailing whitespace from each cell value. |

#### Example use case
Import a list of product SKUs and metadata from a CSV file, then process each row to update asset metadata in Cloudinary.

---

### Search And Replace

Replaces parts of a string that match a given string or regex pattern.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| String | Text | Yes | The text to search within. This is the original string where replacements will be made. |
| Pattern | Text | Yes | The string or regular expression to search for in the input. |
| Replacement value (optional) | Text | No | Text to replace the matched pattern. Leave blank to remove the match entirely. |

#### Example use cases
* Change dashes from metadata values to underscores before sending them to an external system:
  * Set **Pattern** to `-`.
  * Set **Replacement value** to `_`.
* Remove a file extension from a file name (this assumes three or four letters of any case after the dot at the end of the string):
  * Set **Pattern** to `\.[a-zA-Z]{3,4}$`.
  * Leave **Replacement value** blank.

---

### Send HTTP Request

Sends a request to a third-party API. You can use this block for integrating with external tools like CRMs, PIMs, or marketing platforms.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Target URL | Text | Yes | The full URL of the endpoint to send the HTTP request to. |
| Request method | Dropdown | No | The HTTP method to use, such as GET, POST, PUT, or DELETE.**Options:** `HEAD`, `DELETE`, `POST`, `GET`, `CONNECT`, `OPTIONS`, `PUT`, `PATCH` |
| Request headers | Code | No | Optional HTTP headers to include in the request. Use JSON format. You can use [JSONLint.com](https://jsonlint.com/) to validate your JSON. |
| Request message body (optional) | Code | No | Optional content to send in the body of the request, typically used with POST or PUT. Use JSON format. |
| Response filter (optional) | Code | No | A JQ expression used to transform or extract data from the response JSON received by the HTTP block. Useful for trimming down responses for subsequent blocks. |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`). 

#### Example use case
Send asset info to a product database after upload.

> **NOTE**: If setting `"Content-Type": "application/x-www-form-urlencoded"` in the Request Headers, you should specify the form fields in the Message Body.

---

### Split String

Divides a string into an array using a defined separator. The output is a list, which you can feed into the [Iterate List](#iterate_list) block.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| String | Text | Yes | The full string you want to split into parts. Example: `shirt,hat,jacket` |
| Separator | Text | Yes | The character or pattern to use as the delimiter. Can be plain text or a regular expression. Example: `,` (comma), or `\s+` for spaces |

#### Example use case
Split `shirt,hat,jacket` into separate tags.

---

### Upload Asset To HTTP

Uploads a Cloudinary asset to an external HTTP endpoint using a multipart/form-data request. You can apply optional Cloudinary transformations to the asset before upload and include additional form fields in the request.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Transformation (URL syntax) | Text | No | Optional Cloudinary transformation string to apply before upload. Use [URL syntax](transformation_reference), e.g., `c_fill,w_500,h_500`. |
| Target URL | Text | Yes | The full URL of the HTTP endpoint where the asset will be uploaded. |
| Request method | Dropdown | Yes | The HTTP method to use for the request. Typically POST or PUT for file uploads.**Options:** `POST`, `PUT` |
| Request Headers | Code | No | Optional HTTP headers in JSON format. You can use [JSONLint.com](https://jsonlint.com/) to validate your JSON. |
| File field name | Text | Yes | The form field name to assign to the uploaded file. Common values include `file` or `media`. |
| Request form data | Code | No | Optional key-value pairs to include in the form data, in addition to the file itself. Use JSON format. Example: `{ "userId": "1234" }` You can use [JSONLint.com](https://jsonlint.com/) to validate your JSON. |

#### Example use case
After moderating an uploaded video, send the asset via POST to a partner system's API with a resized version and accompanying metadata as form fields.

## Cloudinary APIs

These blocks interact with Cloudinary's APIs to manage, transform, and retrieve media assets.

---

### Account Usage
Retrieves usage statistics for your Cloudinary account.

#### Configuration
No configuration needed.

#### Example use case
Schedule a daily report summarizing storage and bandwidth usage.

> **TIP**: Refer to the [Admin API usage method](admin_api#usage) for more details.

---

### Apply Actions
Prepares [eager transformations](eager_and_incoming_transformations#eager_transformations) or performs updates on a Cloudinary asset.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Eager transformation (optional) | Text | No | The transformation to eagerly generate for the asset (in [URL syntax](transformation_reference)). |
| Explicit parameters (optional) | Code | No | The optional parameters of the Explicit API method, in JSON format. You can use [JSONLint.com](https://jsonlint.com/) to validate your JSON. |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`). 

#### Example use case
Convert an uploaded video to multiple formats before publishing.

#### Example optional parameters

Apply tags to the asset, update the contextual metadata and request quality analysis on the asset.

```json
{
  "tags": ["summer", "sale"],
  "context": {
    "caption": "A summer sale banner",
    "photographer": "John Doe"
  },
  "quality_analysis": true
}
```

> **TIP**: Refer to the [Upload API explicit method](image_upload_api_reference#explicit) for more details.

---

### Change Display Name
Modifies the display name of an asset in Cloudinary.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Display name | Text | Yes | The name shown for this asset in the Media Library. |

#### Example use case
Standardize asset names in your Cloudinary Media Library.

> **NOTE**:
>
> * Not relevant for product environments using the legacy fixed folder mode.

---

### Change Public ID
Renames an asset or moves it to a different folder.

> **INFO**: For product environments using the legacy fixed folder mode, changing the Public ID also changes the delivery URL, and if not done carefully, risks breaking production content.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Select asset from block to rename | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Current public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| New public ID | Text | Yes | The new public ID to assign to the asset. |
| Rename parameters (optional) | Code | No | The optional parameters of the Rename API method, in JSON format. You can use [JSONLint.com](https://jsonlint.com/) to validate your JSON. |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`).      

#### Example use case
Organize assets by moving large files to a dedicated folder.

#### Example optional parameters

Specify that a rename should overwrite existing assets with the same public ID, invalidate CDN cached copies of the asset together with all its transformed versions, and change the type to `authenticated`.

```json
{
  "overwrite": true,
  "invalidate": true,
  "to_type": "authenticated"
}
```

> **TIP**: Refer to the [Upload API rename method](image_upload_api_reference#rename) for more details.

---

### Create Asset URL
Creates a delivery URL for an asset, optionally including a transformation.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Transformation string (optional) | Text | No | The transformation to perform on the media in [URL syntax](transformation_reference). |

#### Example use case
Prepare a delivery URL for use in a PIM system.

> **TIP**: Refer to the [Cloudinary URL helper method](image_transformations#cloudinary_url_helper_method) for more details.

---

### Create Structured Metadata
Creates a structured metadata field for assets.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| External ID | Text | Yes | A unique identifier for this metadata field, used in API requests. |
| Label | Text | Yes | The user-friendly name shown in the Media Library UI. |
| Type | Dropdown | No | The data type for this field.**Options:** `date`, `set`, `string`, `integer`, `enum` |
| Additional options | Code | No | Additional options such as predefined values, restrictions, and validations. |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`). 

#### Example use case
Set up structured metadata for product categorization.

#### Example additional options

Make this metadata field mandatory, and give it a default value of "new".

```json
{
  "mandatory": true,
  "default_vaue": "new"
}
```

> **TIP**: Refer to the [Admin API add_metadata_field method](admin_api#create_a_metadata_field) for more details.

---

### Delete Media
Deletes an asset from Cloudinary.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Invalidate | Toggle | No | Whether or not to invalidate CDN cached copies of the asset. |

#### Example use case
Remove outdated product images from your Cloudinary account.

> **TIP**: Refer to the [Upload API destroy method](image_upload_api_reference#destroy) for more details.

---

### Duplicate Media
Duplicates an asset by calling the [upload](image_upload_api_reference#upload) method of the Upload API to create a copy with a new public ID in the Media Library.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Link duplicate to original | Toggle | No | Relates the duplicated asset to the original so they appear connected in Cloudinary. |
| Copy access control | Toggle | No | Copy access control settings from the original asset. |
| Copy structured metadata | Toggle | No | Copy structured metadata (SMD) from the original asset. |
| Copy contextual metadata | Toggle | No | Copy contextual metadata (CMD) from the original asset. |
| Copy tags | Toggle | No | Copy tags from the original asset. |
| Transformation object | Code | Yes | A transformation in Cloudinary JSON syntax, using key-value pairs. |
| Upload preset | Text | No | An upload preset that defines how the duplicated media is uploaded. |
| Custom upload options | Code | No | Custom upload options from the upload API method that define how the duplicated media is uploaded. |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`). 

#### Example use case
Preserve the original version of an image while applying edits to the duplicate.

---

### Get Asset Information
Fetches details about an asset, such as dimensions and secure URL.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Include media metadata | Toggle | No | Include IPTC, XMP, and detailed Exif metadata in the response. Also returns the asset's ETag value. |
| Include related assets | Toggle | No | Include the list of assets related to this asset in the response. |

#### Example use case
Retrieve asset dimensions before applying transformations.

> **TIP**: Refer to the sample response of the [Upload API explicit method](image_upload_api_reference#explicit_response) for more details.

---

### Get Contextual Metadata
Retrieves a specific contextual metadata value.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Key | Text | Yes | The key of the contextual metadata field you want to retrieve. |

#### Example use case
Fetch a product's SKU stored as contextual metadata.

> **TIP**: Refer to the [Admin API resources method](admin_api#get_resources) for more details.

---

### Get Structured Metadata
Retrieves the value of a specific structured metadata field.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Structured metadata field external ID | Text | Yes | The external ID of the structured metadata field to retrieve. |
| SMD selector | SMD selector | No | Use the structured metadata picker to choose the field by external ID, or enter the external ID manually in Structured metadata field external ID. |

> **NOTE**:
>
> The **External ID** is usually different than the name of the structured metadata field. You can find it on the [Manage Structured Metadata](https://console.cloudinary.com/console/media_library/metadata_fields) page when selecting a field.
> ![Find the external ID of a structured metadata field](https://cloudinary-res.cloudinary.com/image/upload/bo_1px_solid_gray/f_auto/q_auto/docs/mediaflows/external_id "thumb:c_scale,w_600,dpr_2.0, width: 600, popup:true")

#### Example use case
Retrieve asset licensing details stored in structured metadata.

> **TIP**: Refer to the [Admin API resources method](admin_api#get_resources) for more details.

---

### Get Tags
Retrieves the tags assigned to an asset.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |

#### Example use case
Check if an asset has a specific tag before processing it.

> **TIP**: Refer to the [Admin API resources method](admin_api#get_resources) for more details.

---

### Image Quality Analysis
Analyzes the quality of an image using Cloudinary's powerful capabilities and returns a comprehensive set of quality indicators, including JPEG quality, focus, noise, contrast, exposure, lighting, color score, resolution, and more.

> **NOTE**: You must have the [Extended quality analysis](image_quality_analysis#extended_quality_analysis) feature enabled in your Cloudinary product environment to use this block.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |

#### Example use case
Check image focus quality before publishing product photos.

Learn more about [Image quality analysis](image_quality_analysis).

---

### Manual Moderation
Sends an asset to manual moderation. You can later review it in the Console to approve or reject it.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |

#### Example use case
Manually review flagged images before you publish them.

> **TIP**: Learn about [moderating assets manually](dam_admin_asset_management#reviewing_assets_manually).

---

### Move To Folder
Moves an asset to a different folder.

> **INFO**: For product environments using the legacy fixed folder mode, changing the folder also changes the delivery URL, and if not done carefully, risks breaking production content.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Target folder | Folder selector | Yes | The folder where you want to move the asset to. The field will not switch to Fixed mode if the folder does not exist in your Cloudinary account. |

#### Example use case
Move approved images to a specific folder.

> **TIP**: Refer to the [Upload API explicit method](image_upload_api_reference#explicit) for more details.

---

### Relate Assets
[Relates](relate_assets) (or links) two Cloudinary assets.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Asset A: Select from block | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID (Asset A) | Text | Yes* | The public ID for Asset A. Required when **Custom** is selected. |
| Delivery type (Asset A) | Text | Yes* | The delivery type for Asset A (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type (Asset A) | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Asset B: Select from block | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID (Asset B) | Text | Yes* | The public ID for Asset B. Required when **Custom** is selected. |
| Delivery type (Asset B) | Text | Yes* | The delivery type for Asset B (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type (Asset B) | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |

#### Example use case
Relate an image with a video showing the same product.

> **TIP**: Refer to the [Admin API add_related_assets method](admin_api#add_related_assets) for more details.

---

### Search Media
Finds assets based on search criteria. The block returns a maximum of 50 results in an array, which you can iterate over using the [Iterate Assets](#iterate_assets) block.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Search expression | Text | Yes | The expression specifying the search query. See [search expressions](search_expressions) for syntax details. |
| Sort field | Dropdown | No | The field to sort the results by.**Options:** `created_at`, `uploaded_at`, `public_id`, `filename`, `format`, `resource_type`, `type`, `bytes`, `width`, `height`, `aspect_ratio`, `pixels`, `duration`, `bit_rate`, `frame_rate` |
| Sort order | Dropdown | No | Choose whether to sort results in ascending or descending order.**Options:** `asc`, `desc` |
| Max results | Text | No | Maximum number of results to return (1–50). Default: `50` |

#### Example use case
Find all assets that require syncing to a PIM.

#### Example search expressions
| Use case | Search expression |
|----------|------------------|
| Find all assets in "products" with the tag "spring_collection" | `folder=products AND tags=spring_collection` |
| Find all assets that are of type "video" | `resource_type=video` |

> **TIP**: Refer to the [Admin API search method](search_method) for more details.

---

### Set Access Control
[Controls access permissions](control_access_to_media#access_controlled_media_assets) for an asset. You can either make it publicly accessible, completely restricted, or set up access control based on the `access_control` parameter of the [upload](image_upload_api_reference#upload) or [update](admin_api#update_details_of_an_existing_resource) methods.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Access control | Dropdown | Yes | Choose how to control access to this asset.**Options:** `Restricted`, `Use Custom JSON (advanced)`, `Public` |
| Custom JSON (advanced) | Code | No | Define detailed access control rules in JSON format. The provided JSON schema is an example, you may use it as a template. To use this field, select `Use Custom JSON (advanced)` in the **Access Control** field above; otherwise, it will be ignored. |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`). 

#### Example use case
Restrict access to confidential media assets.

#### Example custom JSON

Restrict an asset to require token based access except for the period from 15th December 2022 until 20th January 2024 when it will be publicly available:

```json
{
  "access_control": [
    {
      "access_type": "token"
    },
    {
      "access_type": "anonymous",
      "start": "2022-12-15T12:00Z",
      "end": "2023-01-20T12:00Z"
    }
  ]
}
```

> **TIP**: Refer to the [Admin API update method](admin_api#update_details_of_an_existing_resource) for more details.

---

[//]: # (This section is also in a Fin internal article)

### Universal API
Calls any Cloudinary API method dynamically. Use this block to call any of the supported Cloudinary API methods when there isn't a dedicated block in MediaFlows that addresses your use case.

> **INFO**: To use this block you should be familiar with [Cloudinary's APIs](cloudinary_references#url_and_rest_apis) and understand how to specify parameter methods and values in JSON format.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| API namespace | Dropdown | Yes | The Cloudinary API namespace to call.**Options:** `utils`, `api`, `uploader`, `search` |
| Method and arguments | Code | Yes | Define the Cloudinary API method and its parameters in JSON format. [See examples](#example_method_and_arguments). |
| Response fields to expose | Multi-value text | No | Enter fields from the expected response to use in later blocks. For example: `notification_type` or `response.public_id`. [Learn more](#response_fields_to_expose).|
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`). 

**Response fields to expose**

Specify any response fields that you want to make available in subsequent blocks. For example, if the method you're calling returns many results, you may want to access the `next_cursor` value in a subsequent block, so type `next_cursor` in the **Field to expose** field.In subsequent blocks you can use this variable by selecting the **Universal API Next cursor** lozenge when you insert a variable:
    
![Accessing exposed variables in subsequent blocks](https://cloudinary-res.cloudinary.com/image/upload/bo_1px_solid_gray/f_auto/q_auto/docs/mediaflows/next_cursor_variable_log.png "thumb:c_scale,w_300,dpr_2.0, width: 300, popup:true")

#### Example use case
Perform batch operations when no dedicated block exists.

#### Example Method and arguments

#### Example 1: A method with options only

Call the **download_zip_url** method from the **utils** API namespace, specifying the public IDs of the assets to zip, their resource type and the name of the downloaded file. The result is a URL that allows you to download the zip file. Notice that you can insert variables from previous blocks (in this example, one of the public IDs is from the uploaded asset that triggered the flow).

You can use the definition of the [download_zip_url](image_upload_api_reference#download_zip_url_syntax) method to structure the JSON. Looking at the Node.js definition:

```nodejs
cloudinary.v2.utils.download_zip_url(options)
```

* The method is `download_zip_url`.
* There are only parameters specified in the `options` object, so these are all specified in one object with the key `0` within the `parameters` object.

```json
{
  "method": "download_zip_url",
  "parameters": {
    "0": {
      "public_ids": [ "cld-sample", "{{$.Cloudinary_Upload.result.public_id}}" ],
      "resource_type": "image",
      "target_public_id": "samples"
    }
  }
}
```

#### Example 2: A method with positional parameters and options

Call the **resources_by_moderation** method from the **api** API namespace, specifying the kind of moderation, the status of the moderation, the order of the returned assets according to the `created_at` date, and that tags should be included in the response.

You can use the definition of the [resources_by_moderation](admin_api#get_resources_in_moderation) method to structure the JSON. Looking at the Node.js definition:

```nodejs
cloudinary.v2.api.resources_by_moderation(moderation_kind, status, options)
```

* The method is `resources_by_moderation`.
* There are two positional parameters, `moderation_kind` and `status`.  You must specify these in the correct order with the keys `0` and `1` respectively within the `parameters` object.
* Specify parameters in the `options` object together in one object, with the next key, `2`, using their names (in this case `direction` and `tags`).

```json
{
  "method": "resources_by_moderation",
  "parameters": {
    "0": "aws_rek",
    "1": "rejected",
    "2": {
      "direction": "asc",
      "tags": true
    }
  }
}
```

#### Example 3: The search method

The search method requires slightly different syntax than other methods, because instead of parameters, it uses chained methods. Remember to select the **search** API namespace.

For example, take a search expression written in Node.js (learn more about this expression in the [Quick example](search_method#quick_example)):

```nodejs
cloudinary.v2.search
  .expression('resource_type:image AND tags=shirt AND uploaded_at>1d AND bytes>1m')
  .sort_by('public_id','desc')
  .max_results(30)
  .execute()
  .then(result=>console.log(result));
```

You should write it in this JSON format: 

```json
{
  "method": "search",
  "parameters": {
    "0": {
      "expression": {
        "0": "resource_type:image AND tags=shirt AND uploaded_at>1d AND bytes>1m"
      },
      "sort_by": {
        "0": "public_id",
        "1": "desc"
      },
      "max_results": {
        "0": 30
      }
    }
  }
}
```

Notice how you specify each of the methods as an object with numeric keys for each of the parameters, and there's no need to add the `execute` method.

> **TIP**: Refer to the [Upload](image_upload_api_reference) and [Admin](admin_api) API references for more details.

---

### Update Contextual Metadata
Updates the contextual metadata of an asset.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Metadata key | Text | Yes | The key of the metadata to add. |
| Metadata value | Text | Yes | The value of the metadata to add. Not relevant when removing metadata. |
| Action | Dropdown | No | Choose whether to add or update, or remove metadata on the asset.**Options:** `Add or update`, `Remove` |

#### Example use case
Update an asset's category field for better organization.

> **TIP**: Refer to the [Upload API context method](image_upload_api_reference#context) for more details.

---

### Update Structured Metadata
Updates structured metadata values for an asset.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Action | Dropdown | Yes | Choose whether to update or clear the structured metadata field.**Options:** `Update`, `Clear` |
| Structured metadata field | Dropdown | Yes | Select the structured metadata field to update or clear from your account's metadata fields. |
| Structured metadata value | Text | Yes* | Enter the new value to assign to the metadata field. Use a format that matches the field's type. Required when **Action** is set to `Update`. |

> **NOTE**:
>
> The **External ID** is usually different than the name of the structured metadata field. You can find it on the [Manage Structured Metadata](https://console.cloudinary.com/console/media_library/metadata_fields) page when selecting a field.
> ![Find the external ID of a structured metadata field](https://cloudinary-res.cloudinary.com/image/upload/bo_1px_solid_gray/f_auto/q_auto/docs/mediaflows/external_id "thumb:c_scale,w_600,dpr_2.0, width: 600, popup:true")

#### Example use case
Store the expiry date of an image in structured metadata.

#### Example metadata values

Metadata type | Example | Explanation
--|--|--
Text | `hello world` | The text, "hello world".
Number | `3` | The number three.
Date | `2025-03-25` | The date, 25th March 2025.
Single-selection list | `ext_id_one` | Sets the value corresponding to the external ID of `ext_id_one`.
Multiple-selection list | `["ext_id_one", "ext_id_two"]` | Sets two values corresponding to the external IDs of `ext_id_one` and `ext_id_two`. 

> **TIP**: Refer to the [Upload API metadata method](image_upload_api_reference#metadata) for more details.

---

### Update Tags
Adds or removes tags from an asset.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Action | Dropdown | No | Choose how to update tags: add new ones or remove existing ones.**Options:** `Add`, `Remove` |
| Tag | Text | Yes | Enter one or more tags to apply or remove. Separate multiple tags with commas. |

#### Example use case
Tag assets for seasonal campaigns.

> **TIP**: Refer to the [Upload API tags method](image_upload_api_reference#tags) for more details.

---

### Update XMP Metadata
Updates XMP metadata embedded within an image asset. It merges the new XMP metadata with existing values, updating only the specified fields (i.e. any fields that already exist are overwritten, fields that don't yet exist are added.) 

You can set any of the tags defined in the [XMP specification](https://exiftool.org/TagNames/XMP.html) using the tag name together with its qualifying namespace, e.g., `"XMP-photoshop:Credit": "Company Photography Department"`. 

Additionally, you can set any custom field using the `XMP-cloudinary` namespace, e.g.,  `"XMP-cloudinary:TestCustomTextField": "TEST!"`.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| XMP metadata | Code | Yes | XMP metadata, using key-value pairs (JSON). |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`).
#### Example use case
Add copyright and licensing information to product images by updating their XMP metadata fields.

#### Example XMP metadata

Update various pieces of information in an image:

```json
{
  "XMP-dc:Creator": "John Doe",
  "XMP-dc:Rights": "Copyright 2025 Company Name",
  "XMP-photoshop:Credit": "Company Photography Department",
  "XMP-xmp:Rating": 5,
  "XMP-cloudinary:ProductInfo": {
    "sku": "PROD-12345",
    "category": "Electronics",
    "price": "299.99"
  }
}
```

You can view the XMP metadata in the **Embedded metadata** section of the asset management drill-down page:

![Embedded Metadata](https://cloudinary-res.cloudinary.com/image/upload/bo_1px_solid_gray/f_auto/q_auto/docs/mediaflows/embedded_xmp_metadata.png "thumb:c_scale,w_500,dpr_2.0, width: 500, popup:true")

> **TIP**: Refer to the [XMP specification](https://exiftool.org/TagNames/XMP.html) for details on available metadata fields and their formats.

---

### Upload From HTTP
Sends an HTTP request to a target URL, and then automatically uploads the response's media binary to your Cloudinary product environment. 

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Target URL | Text | Yes | The URL to send the request to. |
| Request method | Dropdown | No | The HTTP method to use for the request.**Options:** `POST`, `GET`, `PUT` |
| Request headers | Code | No | The headers to send in the request, in JSON format. You can use [JSONLint.com](https://jsonlint.com/) to validate your JSON. |
| Request message body (optional) | Code | No | The data to send in the request. |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`). 

#### Example use case
Retrieve and store images from a third-party API.

---

### Upload Media
Uploads an asset from an FTP, HTTP, or HTTPS URL to Cloudinary.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Media URL | Text | Yes | The FTP, HTTP, or HTTPS URL of a file to upload. |
| Resource type | Dropdown | Yes | Specify the file type. Use `Auto` to detect automatically.**Options:** `Auto`, `Video`, `Raw`, `Image` |
| Incoming transformation (optional) | Text | No | Apply a transformation to the media before it's saved. Use Cloudinary [URL syntax](transformation_reference). |
| Upload parameters (optional) | Code | No | Optional upload parameters of the Upload API method, in JSON format. You can use [JSONLint.com](https://jsonlint.com/) to validate your JSON. |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`). 

#### Example use case
Automatically upload new images from an S3 bucket.

#### Example optional parameters

Apply tags and contextual metadata to the asset, and request quality analysis on the asset.

```json
{
  "tags": ["summer", "sale"],
  "context": {
    "caption": "A summer sale banner",
    "photographer": "John Doe"
  },
  "quality_analysis": true
}
```

> **TIP**: Refer to the [Upload API upload method](image_upload_api_reference#upload) for more details.

## Cloudinary add-ons

These blocks let you enhance your flows using Cloudinary's AI-powered add-ons for tasks like automatic tagging, content analysis, moderation, and more.

> **NOTE**: Before using a block that's associated with a Cloudinary add-on, make sure you're [registered for the add-on](cloudinary_add_ons#registering_for_add_ons). You can manage add-on registration and usage within each of the blocks.

---

### AI Content Analysis Set Tags

Use this block to analyze and tag an image using the [Cloudinary AI Content Analysis add-on](cloudinary_ai_content_analysis_addon).

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Detection model | Dropdown | Yes | Choose the AI tagging model to use.**Options:** `human-anatomy`, `cld-fashion`, `unidet`, `cld-text`, `coco`, `lvis`, `shop-classifier`, `watermark-detection`, `iqa`, `image-type` |
| Confidence score | Text | Yes | Set the minimum confidence level (0.0–1.0) required for a tag to be applied to the image. Fewer tags are applied as the confidence level increases. Default: `0.9` |
| Cloudinary AI Content Analysis | Add-on subscription | Yes | Confirms the Cloudinary AI Content Analysis add-on is registered for your product environment so this block can run. |

#### Example use case
Auto-tag product images based on visual content.

---

### AI Vision Analyze By Prompt

Use this block to analyze an image using an open-ended question or instruction with the [Cloudinary AI Vision add-on](cloudinary_ai_vision_addon).

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Prompt | Text | Yes | A question or a request to ask. Example: "Describe the image in detail". |
| Cloudinary AI Vision | Add-on subscription | Yes | Confirms the Cloudinary AI Vision add-on is registered for your product environment so this block can run. |

#### Example use case
Ask "What products are visible in this image?" and use the result to tag or categorize the asset.

---

### AI Vision Moderate By Prompts

Use this block to ask up to ten yes/no questions about an image and get structured moderation responses with the [Cloudinary AI Vision add-on](cloudinary_ai_vision_addon).

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Rejection questions (prompts) | Multi-value text | Yes | A list of rejection questions to ask (max 10). Example: "Does the image contain alcohol?". |
| Cloudinary AI Vision | Add-on subscription | Yes | Confirms the Cloudinary AI Vision add-on is registered for your product environment so this block can run. |

#### Example use case
Automatically flag images that include restricted content.

---

### AI Vision Tag By Prompts

Use this block to generate tags from yes/no prompts and optionally apply the tags to the image with the [Cloudinary AI Vision add-on](cloudinary_ai_vision_addon).

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Tag definitions (prompts) | Multi-value text | Yes | Define up to 10 tag definitions. A tag is returned and optionally applied when its rule returns true. For example: apply the tag "desk" if the answer to "Does the image contain a desk?" is yes. |
| Add tags to asset | Toggle | No | Whether to automatically apply the matching tags to the asset. |
| Cloudinary AI Vision | Add-on subscription | Yes | Confirms the Cloudinary AI Vision add-on is registered for your product environment so this block can run. |

#### Example use case
Tag all images containing people by defining a tag definition like: **Tag:** "person" **Rule:** "Does this image contain a person?"

---

### Amazon Image Moderation

Use this block to moderate images for potentially sensitive content with the [Amazon Rekognition AI Moderation add-on](aws_rekognition_ai_moderation_addon).

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Moderation confidence level | Text | Yes | Set the minimum confidence level (0.0–1.0) required for a category to be flagged. Lower values are more sensitive. |
| Moderation categories | Multi-select | No | Select one or more content categories to moderate.**Options:** `alcohol`, `explicit_nudity`, `drugs`, `rude_gestures`, `hate_symbols`, `gambling`, `visually_disturbing`, `tobacco`, `suggestive_nudity`, `violence` |
| Rekognition AI Moderation | Add-on subscription | Yes | Confirms the Amazon Rekognition AI Moderation add-on is registered for your product environment so this block can run. |

#### Example use case
Flag images with explicit or inappropriate content to prevent publishing.

> **NOTE**: You must be [registered to the Amazon Rekognition AI Moderation add-on](https://console.cloudinary.com/app/settings/addons) to use this block.

---

### Cloudinary Image Captioning

Use this block to generate a descriptive caption for an image using the [Cloudinary AI Content Analysis add-on](cloudinary_ai_content_analysis_addon#ai_based_image_captioning).

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Cloudinary AI Content Analysis | Add-on subscription | Yes | Confirms the Cloudinary AI Content Analysis add-on is registered for your product environment so this block can run. |

#### Example use case
Create SEO-friendly alt text for product photos.

---

### Duplicate Image Detection

Use this block to determine if duplicate images exist in your Media Library using the [Cloudinary Duplicate Image Detection add-on](cloudinary_duplicate_image_detection_addon).

> **NOTE**: You need to run duplicate detection on the images in your Media Library for them to be included in the search when duplicate detection is run on further images. You can do this in another flow, searching for the images you want to include in the search and running duplicate detection on them. Also see [Specifiying which images are included in the search](cloudinary_duplicate_image_detection_addon#specifying_which_images_are_included_in_the_search).

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Threshold | Text | Yes | The minimum similarity score (`0.0`–`1.0`) for considering an image a duplicate. Higher values are stricter, e.g., `1.0` means completely identical whereas `0.8` means almost identical. |
| Wait for confidence result | Toggle | No | Whether to wait for the confidence score before continuing. Choose Yes if the result is needed for downstream logic. |
| Webhook URL (optional) | Text | No | Send a webhook when duplicate detection is complete. Use this to trigger another flow or external system. |

#### Example use case
Check if a similar image already exists in your Media Library before allowing it to be stored.

---

### Generate Alt Text

Use this block to generate SEO-friendly alt text for an image using [Cloudinary AI Vision](cloudinary_ai_vision_addon#general_mode), and save it to the asset's contextual metadata in the selected language(s).

This block consolidates what would typically require multiple separate blocks—analyzing the image with AI Vision, processing the results, translating the alt text into multiple languages, and updating contextual metadata—into a single, streamlined action. This simplifies your PowerFlows and makes it easier to add accessible, SEO-optimized descriptions to your assets at scale across multiple languages.

The generated alt text is concise (typically one sentence, up to 125 characters), objective, and accurate. It avoids marketing language and unnecessary detail, prioritizes clarity for screen-reader users, and naturally incorporates SEO keywords when relevant. You can customize this behavior by providing **Additional instructions** to modify the prompt.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Output language(s) | Multi-select | Yes | Output language(s) for stored alt text. Select one or more languages.**Options:** `Acehnese (ace)`, `Afar (aa)`, `Afrikaans (af)`, `Arabic (ar)`, `Armenian (hy)`, `Assamese (as)`, `Avar (av)`, `Aymara (ay)`, `Bambara (bm)`, `Bashkir (ba)`, `Basque (eu)`, `Belarusian (be)`, `Bemba (bem)`, `Bengali (bn)`, `Bhojpuri (bho)`, `Breton (br)`, `Burmese (my)`, `Catalan (ca)`, `Cebuano (ceb)`, `Chamorro (ch)`, `Chechen (ce)`, `Chichewa (ny)`, `Chinese (zh)`, `Chuvash (cv)`, `Corsican (co)`, `Czech (cs)`, `Danish (da)`, `Dhivehi (dv)`, `Dutch (nl)`, `Dzongkha (dz)`, `English (en)`, `Esperanto (eo)`, `Ewe (ee)`, `Faroese (fo)`, `Fijian (fj)`, `Finnish (fi)`, `French (fr)`, `Frisian (fy)`, `Fulani (ff)`, `Ga (gaa)`, `Galician (gl)`, `Georgian (ka)`, `German (de)`, `Greek (el)`, `Guarani (gn)`, `Gujarati (gu)`, `Haitian Creole (ht)`, `Hausa (ha)`, `Hebrew (he)`, `Hiligaynon (hil)`, `Hindi (hi)`, `Hungarian (hu)`, `Igbo (ig)`, `Ilocano (ilo)`, `Italian (it)`, `Japanese (ja)`, `Javanese (jw)`, `Kalaallisut (kl)`, `Kannada (kn)`, `Kanuri (kr)`, `Kapampangan (pam)`, `Kazakh (kk)`, `Khmer (km)`, `Kikongo (kg)`, `Kinyarwanda (rw)`, `Komi (kv)`, `Korean (ko)`, `Kurdish (Kurmanji) (ku)`, `Kyrgyz (ky)`, `Lao (lo)`, `Latin (la)`, `Limburgish (li)`, `Lingala (ln)`, `Lithuanian (lt)`, `Luganda (lg)`, `Luxembourgish (lb)`, `Macedonian (mk)`, `Madurese (mad)`, `Malagasy (mg)`, `Malay (Jawi) (ms-Arab)`, `Malayalam (ml)`, `Manx (gv)`, `Marathi (mr)`, `Marshallese (mh)`, `Meiteilon (Manipuri) (mni-Mtei)`, `Ndebele (South) (nr)`, `Occitan (oc)`, `Odia (Oriya) (or)`, `Oromo (om)`, `Ossetian (os)`, `Polish (pl)`, `Portuguese (pt)`, `Punjabi (pa)`, `Punjabi (Shahmukhi) (pa-Arab)`, `Quechua (qu)`, `Romanian (ro)`, `Rundi (rn)`, `Russian (ru)`, `Sami (North) (se)`, `Samoan (sm)`, `Sango (sg)`, `Sanskrit (sa)`, `Santali (sat)`, `Scots Gaelic (gd)`, `Sesotho (st)`, `Shan (shn)`, `Shona (sn)`, `Sindhi (sd)`, `Sinhala (si)`, `Slovenian (sl)`, `Somali (so)`, `Spanish (es)`, `Swati (ss)`, `Tahitian (ty)`, `Tajik (tg)`, `Tamazight (tzm)`, `Tamazight (Tifinagh) (zgh)`, `Tamil (ta)`, `Tatar (tt)`, `Telugu (te)`, `Thai (th)`, `Tibetan (bo)`, `Tigrinya (ti)`, `Tiv (tiv)`, `Tok Pisin (tpi)`, `Tongan (to)`, `Tsonga (ts)`, `Tswana (tn)`, `Turkish (tr)`, `Turkmen (tk)`, `Twi (ak)`, `Ukrainian (uk)`, `Urdu (ur)`, `Uyghur (ug)`, `Venda (ve)`, `Venetian (vec)`, `Vietnamese (vi)`, `Waray (war)`, `Wolof (wo)`, `Zulu (zu)` |
| SEO keywords (optional) | Text | No | Optional comma-separated keywords to include in the generated alt text. |
| Focus guidance (optional) | Text | No | Optional guidance for what the alt text should emphasize (e.g., product focus). |
| Additional instructions (optional) | Code | No | Optional additional instructions to override the default alt text generation instructions. If provided, this will replace the default prompt entirely. |
| Cloudinary AI Vision | Add-on subscription | Yes | Confirms the Cloudinary AI Vision add-on is registered for your product environment so this block can run. |

> **NOTE**: You must be [registered to the Cloudinary AI Vision add-on](cloudinary_ai_vision_addon) to use this block.

#### Example use case
Automatically generate accessible alt text for product images across multiple languages to improve SEO and accessibility.

---

### Google Image Tagging

Use this block to add tags to an image using the [Google Auto Tagging add-on](google_auto_tagging_addon).

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Confidence level | Text | Yes | Set the minimum confidence level (0.0–1.0) required for a tag to be applied to the image. Fewer tags are applied as the confidence level increases. |
| Google Auto Tagging | Add-on subscription | Yes | Confirms the Google Auto Tagging add-on is registered for your product environment so this block can run. |

#### Example use case
Automatically tag lifestyle photos in your Media Library for easier search.

> **NOTE**: You must be [registered to the Google Auto Tagging add-on](https://console.cloudinary.com/app/settings/addons) to use this block.

---

### Google Video Tagging

Use this block to add tags to a video using the [Google Automatic Video Tagging add-on](google_automatic_video_tagging_addon).

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Confidence level | Text | Yes | Set the minimum confidence level (0.0–1.0) required for a tag to be applied to the video. Fewer tags are applied as the confidence level increases. |
| Google Automatic Video Tagging | Add-on subscription | Yes | Confirms the Google Automatic Video Tagging add-on is registered for your product environment so this block can run. |
| Webhook URL (optional) | Text | No | Enter a URL to receive a webhook notification when processing completes. You can use this to trigger another flow in MediaFlows or notify an external system. |

#### Example use case
Enrich marketing videos with searchable tags like "beach" or "running".

> **NOTE**: You must be [registered to the Google Automatic Video Tagging add-on](https://console.cloudinary.com/app/settings/addons) to use this block.

## Integrations

MediaFlows has a number of useful blocks for specific integrations to Cloudinary. If there is an integration that you think should be added then please [let us know](https://support.cloudinary.com/hc/en-us/requests/new?request_custom_fields_360017815680=help_with_mediaflows).

> **TIP**: You can use the [Send HTTP Request](#send_http_request) block for generic API calls to any integration not listed here.

---

### Akeneo

> **NOTE**: You can use the Akeneo blocks only with Akeneo versions that support the Akeneo Asset Manager.

Use the Akeneo blocks to communicate with Akeneo's API, to create an asset, delete an asset, or get product information from Akeneo.

{info}
You must use a [Get Tokens From Akeneo](#get_tokens_from_akeneo) block before you can use one of the other Akeneo blocks that requires a valid token. The token returned from the block is valid for any and all Akeneo blocks that follow, so you only need to use the Get Tokens block once for the entire flow that follows.
{/info}

---

#### Get Tokens From Akeneo

Retrieves authentication tokens from [Akeneo](https://www.akeneo.com/) so that other Akeneo blocks can access the Akeneo API.

Make sure you're registered to Akeneo in order to use this block.

##### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Host URL | Text | Yes | The base URL of your Akeneo instance. For example: `https://my-site.cloud.akeneo.com/`. |
| Client ID | Text | Yes | Your Akeneo API client ID from the Connections page in the Akeneo dashboard. |
| Secret | Text | Yes | The secret key associated with your Akeneo client ID. |
| Username | Text | Yes | Your Akeneo API username for the connection. |
| Password | Text | Yes | The password associated with the Akeneo API user. |

> **TIP**: We recommend that you create a new connection, and use the new credentials to configure this block.

##### Example use case
Authenticate once at the start of the flow before using any other Akeneo block.

---

#### Create An Asset In Akeneo

Creates an asset in [Akeneo's Asset Manager](https://api.akeneo.com/concepts/asset-manager.html).

> **INFO**: To allow this block to communicate with Akeneo's API, you must include a [Get Tokens From Akeneo](#get_tokens_from_akeneo) block at some point in the flow before this block.

##### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Host URL | Text | Yes | The base URL of your Akeneo instance. For example: `https://my-site.cloud.akeneo.com/`. |
| Access token | Text | Yes | The token returned by the [Get Tokens From Akeneo](#get_tokens_from_akeneo) block. Required to authorize the request. |
| Media URL | Text | Yes | The direct URL of the media file to upload to Akeneo. |
| Asset code | Text | Yes | A unique identifier for the asset in Akeneo. You can use this code to link the created Akeneo asset to a product using Akeneo Product Link Rules. May contain only letters, numbers and underscores. |
| Asset family | Text | Yes | The asset family this asset belongs to. |
| Asset attribute | Text | Yes | The Akeneo asset attribute that stores the link to the Cloudinary asset. |
| Asset values | Code | No | Optional values to assign to asset attributes, such as labels, tags, or metadata. Use JSON format. For example: `{ "label": [{ "locale": "en_US", "data": "Main image" }] }` |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`). 

##### Example use case
Automatically push a newly approved product image from Cloudinary to Akeneo and attach it to a product by SKU.

##### Example asset values

You can add any additional values as key/values in the **Asset Values** field. See the [Akeneo documentation](https://api.akeneo.com/api-reference.html#patch_asset__code_) for more information and examples of passing these values. Note that you only pass the attributes as given in the `values` key.

The following example passes the `photographer` and `end_of_use_date` values:

```json
{
  "photographer": [
    {
      "locale": null,
      "channel": null,
      "data": "ben_levy"
    }
  ],
  "end_of_use_date": [
    {
      "locale": null,
      "channel": null,
      "data": "02/03/2027"
    }
  ]        
}
```

#### Example: Configuring a Product Link Rule The following example uses the Asset code to pass product information to Akeneo, and then adds a Product link rule to parse the attribute and link the asset. 

Set up the block in MediaFlows to use the Asset code field to pass your information to Akeneo where the `product_ref` is given in the first part of the string. You can then configure Akeneo to parse the string in the Product Rule Link Naming convention properties:

```json
{
  "source": {
    "property": "code",
    "channel": null,
    "locale": null
  },
  "pattern": "/(?<product_ref>.*)__(?<cloudinary_code>.*)/",
  "abort_asset_creation_on_error": false
}
```

Then, define the link rule for the asset family Product Link Rules properties as follows:

```json
[
  {
    "product_selections": [
      {
        "field": "sku",
        "value": "{{product_ref}}",
        "locale": null,
        "channel": null,
        "operator": "="
      }
    ],
    "assign_assets_to": [
      {
        "attribute": "images",
        "locale": null,
        "channel": null,
        "mode": "add",
        "sorting_direction": null
      }
    ]
  }
]
```

---

#### Delete An Asset In Akeneo

Deletes an asset from [Akeneo's Asset Manager](https://api.akeneo.com/concepts/asset-manager.html).

> **INFO**: To allow this block to communicate with Akeneo's API, you must include a [Get Tokens From Akeneo](#get_tokens_from_akeneo) block at some point in the flow before this block.

##### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Host URL | Text | Yes | The base URL of your Akeneo instance. For example: `https://my-site.cloud.akeneo.com/`. |
| Access token | Text | Yes | The token returned by the [Get Tokens From Akeneo](#get_tokens_from_akeneo) block. Required to authorize the request. |
| Asset code | Text | Yes | The unique identifier of the asset in Akeneo to delete. |
| Asset family | Text | Yes | The asset family this asset belongs to. |

##### Example use case
Remove deprecated product images from Akeneo when they're archived in Cloudinary.

---

#### Get Product Information From Akeneo

Fetches product information from [Akeneo's Asset Manager](https://api.akeneo.com/concepts/asset-manager.html) using a product UUID or identifier.

> **INFO**: To allow this block to communicate with Akeneo's API, you must include a [Get Tokens From Akeneo](#get_tokens_from_akeneo) block at some point in the flow before this block.

##### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Host URL | Text | Yes | The base URL of your Akeneo instance. For example: `https://my-site.cloud.akeneo.com/`. |
| Access token | Text | Yes | The token returned by the [Get Tokens From Akeneo](#get_tokens_from_akeneo) block. Required to authorize the request. |
| UUID | Text | No | The UUID of the product to fetch. You can find this in Akeneo's product detail URL or API response. |
| Identifier | Text | No | The Identifier of the product to fetch. This is either the SKU or internal code. |
| With asset share links | Toggle | No | Include public shareable links for associated assets, if available. |
| With quality scores | Toggle | No | Include the product's quality scores per channel and locale. |
| With completenesses | Toggle | No | Include product completeness information by channel and locale. |
| With attribute options | Toggle | No | Include option labels for attributes with predefined choices, such as dropdowns or multiselects. |
| With root parent | Toggle | No | Return the root parent product model code of a variant in the response. |
| With workflow execution statuses | Toggle | No | Return an array of workflow_execution_statuses directly associated with the requested entity (product or product model) in the response. |

##### Example use case
Retrieve product metadata and use it to set tags or metadata in Cloudinary.

---

### Upload To AWS S3

Uploads a file to an AWS S3 bucket.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| AWS region | Dropdown | No | Select the AWS region where your S3 bucket is located (default eu-west-1).**Options:** `us-east-2`, `us-east-1`, `us-west-1`, `us-west-2`, `af-south-1`, `ap-east-1`, `ap-south-2`, `ap-southeast-3`, `ap-southeast-5`, `ap-southeast-4`, `ap-south-1`, `ap-northeast-3`, `ap-northeast-2`, `ap-southeast-1`, `ap-southeast-2`, `ap-southeast-7`, `ap-northeast-1`, `ca-central-1`, `ca-west-1`, `eu-central-1`, `eu-west-1`, `eu-west-2`, `eu-south-1`, `eu-west-3`, `eu-south-2`, `eu-north-1`, `eu-central-2`, `il-central-1`, `mx-central-1`, `me-south-1`, `me-central-1`, `sa-east-1`, `us-gov-east-1`, `us-gov-west-1` Default: `eu-west-1` |
| AWS bucket | Text | Yes | The name of the destination S3 bucket. The bucket must be whitelisted and grant access to Cloudinary. |
| Root path | Text | No | The base directory within the bucket. |
| Prefix path | Text | No | An optional subfolder path within the root directory. Used to organize assets inside the bucket. |
| New asset name | Text | No | Optional name to assign to the uploaded asset in S3. If left blank, the original name will be used. Ensure the name includes the appropriate file extension (e.g., .jpg, .png). |

#### Example use case
Archive optimized images in a private S3 bucket for long-term storage or sharing with partners.

#### Allowlisting your S3 storage bucket

In order to enable uploading to your bucket, your S3 storage bucket must be allowlisted. This requires the following steps:

1. Grant full access permissions to Cloudinary's AWS account, using one of the following methods:
    * **AWS Console**: Set up the bucket policy using this JSON code. Make sure to replace `<your_bucket_name>` with your bucket's actual value:
     
    ```
    {
     "Version": "2012-10-17",
     "Id": "CloudinaryOriginPolicyId",
     "Statement": [
       {
         "Effect": "Allow",
         "Principal": {
           "AWS": "arn:aws:iam::747360636676:role/s3-lambda-exec"
         },
         "Action": [
           "s3:ListBucket",
           "s3:GetObject",
           "s3:PutObject",
           "s3:PutObjectAcl",
           "s3:DeleteObject"
         ],
         "Resource": [
           "arn:aws:s3:::<your_bucket_name>",
           "arn:aws:s3:::<your_bucket_name>/*"
         ]
       }
     ]
    }
    
    ```    
    * **AWS CloudFormation**: Use the following JSON within AWS CloudFormation to create the backup bucket. Make sure to replace `YourBucketName` with your bucket's actual value:
  
    ```
    AWSTemplateFormatVersion: '2010-09-09'
    Description: CloudFormation template to create an S3 bucket with a specified policy for cloudinary mediaflows.

    Parameters:
      BucketName:
        Description: Name of the S3 bucket.
        Type: String

    Resources:
      S3Bucket:
        Type: AWS::S3::Bucket
        Properties:
          BucketName: !Ref YourBucketName

      BucketPolicy:
        Type: AWS::S3::BucketPolicy
        Properties:
          Bucket: !Ref S3Bucket
          PolicyDocument:
            Version: "2012-10-17"
            Id: "CloudinaryOriginPolicyId"
            Statement:
              - Effect: "Allow"
                Principal:
                  AWS: "arn:aws:iam::747360636676:role/s3-lambda-exec"
                Action:
                  - "s3:ListBucket"
                  - "s3:GetObject"
                  - "s3:PutObject"
                  - "s3:PutObjectAcl"
                  - "s3:DeleteObject"
                Resource:
                  - !Sub "arn:aws:s3:::${YourBucketName}"
                  - !Sub "arn:aws:s3:::${YourBucketName}/*"
   ```
2. Add an empty file to your bucket with your cloud name as the filename, under the following folder structure: `.wellknown/cloudinary/<your_cloud_name>`
    * By adding this file, you indicate that you have access to this bucket and that you permit Cloudinary to access and modify this bucket's contents.
    * The file needs to be located in the **Root Path** as defined in the block.
    * If you want this bucket to be allowlisted for more than one Cloudinary product environment, you can add an appropriately named file for each cloud name.
  
> **NOTE**: If at a later point you need to update permissions on an existing S3 bucket, changes may take some time to propagate, and you may not see the changes taking effect right away.

---

### Dolby IO

Improves media quality using the [Dolby.io Media Enhance API](https://dolby.io/).

> **NOTE**: You need to register to [Dolby.io](https://dolby.io/) in order to use this block.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| API key | Text | Yes | Your Dolby.io API key. Found in your Dolby developer dashboard. |
| API secret | Text | Yes | Your Dolby.io API secret used for authentication. |
| Input | Text | Yes | The URL of the input audio or video file to enhance. Must be accessible by Dolby.io. |
| Output | Text | Yes | The destination URL where the processed file will be saved. Must point to a writable location. |
| Content | Dropdown | No | The type of media content. Used to optimize audio processing.**Options:** `studio`, `voice_over`, `conference`, `music`, `mobile_phone`, `voice_recording`, `podcast`, `lecture`, `interview`, `meeting` |
| Audio settings | Code | No | Optional advanced audio parameters in JSON format, such as noise reduction, speech leveling, or equalization. Example: `{ "noise": { "reduction": "medium" } }` |

#### Example use case
Clean up low-quality user-generated videos before publishing them in your product gallery.
  
---

### Upload To Dropbox

Uploads a file to Dropbox using a URL.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Dropbox app key (client ID) | Text | Yes | Your Dropbox app's client ID from the app settings (used with the app secret and refresh token to authorize uploads). |
| Dropbox app secret (client secret) | Text | Yes | Your Dropbox app client secret for authenticating requests. |
| Dropbox refresh token | Text | Yes | The Dropbox refresh token used to obtain access tokens. |
| URL | Text | Yes | The direct URL to the file to upload to Dropbox. Must be publicly accessible. |
| Path | Text | Yes | The Dropbox folder path where the file will be uploaded. Use "/" for root or specify subfolders like "/images/banner/". This can include a file name.  If the path ends with a "/", the file name from the URL will be used. |
| If already exists | Dropdown | Yes | Choose how to handle name conflicts: rename, overwrite, or skip the upload.**Options:** `Rename & upload (automatically)`, `Overwrite (delete first, then upload)`, `Skip (don't upload)` |

#### Example use case
Deliver final approved campaign images directly to a shared Dropbox folder for external agencies.

#### Set up a Dropbox app

Use this [Dropbox OAuth Guide](https://developers.dropbox.com/oauth-guide) to set up a Dropbox app. The main steps are as follows:

##### 1. Create a Dropbox app:

1. Head to the [Dropbox App Console](https://www.dropbox.com/developers/apps) and create an app.
1. Configure the app settings. 
1. Configure the permissions. Ensure you allow read and write access to your files and folders, including the content and metadata.
1. Submit your configuration.
   
##### 2. Authorize access to the app, generating an access code:

1. Navigate to `https://www.dropbox.com/oauth2/authorize?client_id=<APP KEY>&response_type=code&token_access_type=offline` (replacing `<APP KEY>` with the App key from the app's settings page).
1. Copy the access code that's generated.

##### 3. Generate a refresh token:

1. In a terminal, enter the following command, replacing the placeholders with your information:

    ```
    curl -X POST https://api.dropboxapi.com/oauth2/token \
      -d code=<GENERATED ACCESS CODE> \
      -d grant_type=authorization_code \
      -d client_id=<APP KEY> \
      -d client_secret=<APP SECRET>
    ```

1. Copy the **refresh_token** from the response.

##### 4. Configure the Upload To Dropbox block:

1. In the MediaFlows **Upload To Dropbox** block, set the **Dropbox app key** and **Dropbox app secret** with the values from your app settings, and the **Dropbox refresh token** that you generated. 
1. Test your flow and check that an image is uploaded to your Dropbox.

---

### Fal AI Virtual Photoshoot

Generates virtual photoshoot images from an existing person image using [fal.ai](https://fal.ai/).

Select a person image from a previous block and describe the desired photoshoot using seven structured fields: short description, pose, facial expression, clothes, scene, lighting, and camera positioning. The block composes these fields into a prompt and sends it with the person image to your selected fal.ai model (Gemini 3 Pro or GPT Image 1.5). The generated image is automatically uploaded to Cloudinary and can optionally be related to the original person asset.

The block outputs the uploaded asset's `public_id`, `secure_url`, `type`, and `resource_type` for use by downstream blocks.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use person image from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Person Public ID | Text | Yes* | The person image public ID. Required when **Custom** is selected. |
| Person Delivery type | Text | Yes* | The delivery type for the person asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Person Resource type | Text | Yes* | The asset type for the person image (typically `image`). Required when **Custom** is selected. |
| Fal API key | Text | Yes | fal.ai API key for authentication. |
| Model | Dropdown | Yes | Which fal.ai model to use for the virtual photoshoot.**Options:** `GPT Image 1.5`, `Gemini 3 Pro` |
| Short description | Text | Yes | Brief description of the desired photoshoot result.  |
| Pose | Text | No | How the model should be posed. Leave empty to try to preserve the original pose.  |
| Facial expression | Text | No | Desired facial expression and head orientation. Leave empty to try to preserve the original expression.  |
| Clothes | Text | No | What the model should be wearing. Leave empty to try to preserve the original clothing.  |
| Scene | Text | No | Scene, background, and framing. Leave empty to try to preserve the original scene.  |
| Lighting | Text | No | Lighting style for the scene. Leave empty to try to preserve the original lighting.  |
| Camera positioning | Text | No | Camera angle, height, and position. Leave empty to try to preserve the original camera angle.  |
| Output format | Dropdown | Yes | Output image format.**Options:** `PNG`, `JPG`, `WebP` |
| Destination folder | Folder selector | No | Cloudinary folder for the uploaded photoshoot image. If empty, uploads to Cloudinary's home folder. |
| Asset name | Text | No | Custom name for the uploaded asset. If empty, uses the input image name with a random 6-digit suffix. |
| Relate assets | Toggle | No | Relate the uploaded photoshoot image to the original person asset in Cloudinary. |

#### Example use case
After a model photo is approved in Creative Approval, generate alternate poses and backgrounds for e-commerce galleries and save each result to a dedicated Cloudinary folder.

---
### Fal AI Virtual Try On

Generates virtual try-on images and adds them to your Cloudinary library using [fal.ai](https://fal.ai/).

Choose from four fal.ai models (FASHN v1.5, FASHN v1.6, Leffa Virtual TryOn, or Cat-VTON) and select the person and garment images from previous blocks. The block generates the try-on image via fal.ai, uploads it to Cloudinary as a new asset, and optionally links that asset to the person and garment assets so they appear related in Cloudinary.

The block outputs the uploaded asset's `public_id`, `secure_url`, `type`, and `resource_type` for use by downstream blocks.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use garment image from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Garment public ID | Text | Yes* | The garment image public ID. Required when **Custom** is selected. |
| Garment delivery type | Text | Yes* | The delivery type for the garment asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Garment resource type | Text | Yes* | The asset type for the garment image (typically `image`). Required when **Custom** is selected. |
| Use person image from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Person public ID | Text | Yes* | The person image public ID. Required when **Custom** is selected. |
| Person delivery type | Text | Yes* | The delivery type for the person asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Person resource type | Text | Yes* | The asset type for the person image (typically `image`). Required when **Custom** is selected. |
| Fal API key | Text | Yes | fal.ai API key for authentication. |
| Model | Dropdown | Yes | Which fal.ai try-on model to use.**Options:** `FASHN v1.6`, `FASHN v1.5`, `Leffa Virtual TryOn`, `Cat-VTON` |
| Garment type | Dropdown | Yes | Type of garment.**Options:** `Upper body`, `Lower body`, `Dress` |
| Quality mode | Dropdown | Yes | Speed vs quality.**Options:** `Performance`, `Balanced`, `Quality` |
| Output format | Dropdown | Yes | Output image format. Only supported by FASHN and Leffa; Cat-VTON uses the model default.**Options:** `PNG`, `JPG` |
| Destination folder | Folder selector | No | Cloudinary folder for the uploaded try-on image. |
| Asset name | Text | No | Custom name (`public_id`) for the uploaded try-on asset. If no name is provided, one is auto-generated from the person and garment names. |
| Relate assets | Toggle | Yes | Relate the uploaded try-on image to the person and garment assets so they appear connected in Cloudinary. |

#### Example use case
Combine a flat-lay garment image with an on-model photo to produce try-on previews for PDPs, then upload the composite to Cloudinary and relate it to both source assets.

---

### Gemini Analyze Image By Prompt

Analyzes an image using Google's Gemini API and answers a question about it.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Image URL | Text | Yes | The URL of the image to analyze. |
| Gemini API key | Text | Yes | Your Google AI (Gemini) API key for authenticating requests. |
| Prompt | Text | Yes | Ask a question about the image, e.g., 'What is happening in this photo?' |
| Gemini model | Dropdown | Yes | The Gemini model to use for image analysis.**Options:** `gemini-2.0-flash`, `gemini-2.5-flash-lite`, `gemini-2.5-flash`, `gemini-2.5-pro` |
| Max tokens (optional) | Number | No | Specify the maximum number of Gemini tokens allowed to be consumed (impacts the response length, costs, processing time, etc). Default is 300. |
| Enable thinking | Toggle | No | Allow the model to think more before generating the response (uses more tokens). |

#### Example use case
Auto-generate alt text or summarize the visual content of an image using a prompt like "What is in this image?".

---

### Gemini Generate Image And Cloudinary Upload

Generates an image using Google's Gemini image generation API (aka Nano Banana) and automatically uploads the result to your Cloudinary product environment.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Gemini API key | Text | Yes | Your Google AI (Gemini) API key for authenticating image generation requests. |
| Prompt | Text | Yes | A text description of the desired image that should be generated. |
| Gemini model | Dropdown | Yes | The Gemini model to use for image generation.**Options:** `gemini-2.5-flash-image` |
| Image URL | Text | No | The image URL that should be included with the prompt - either for the image to be edited or as input for a new image generation. |
| Upload parameters (optional) | Code | No | Optional upload parameters of the Upload API method, in JSON format. See the [Upload API reference](image_upload_api_reference) for a full list of possible parameters. You can use [JSONLint.com](https://jsonlint.com/) to validate your JSON. |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`).
#### Example use case
Automatically generate product variations or marketing visuals based on existing product images and text descriptions, then store them in Cloudinary for further processing or delivery.

---

### Google Translate

Translates text from one language to another using the [Google Translate API](https://cloud.google.com/translate).

> **NOTE**: You must have a Google Cloud project with the Translation API enabled and a valid API key to use this block.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Google API key | Text | Yes | Your Google API key. |
| String to translate | Text | Yes | Enter the string to translate, or insert a variable from a previous block. |
| Translate from | Dropdown | No | The source language. Select Auto Detect to let Google detect the language. If setting a custom value, use the language code (e.g., "en" for English).**Options:** `Auto Detect`, `Afrikaans (af)`, `Albanian (sq)`, `Amharic (am)`, `Arabic (ar)`, `Armenian (hy)`, `Azerbaijani (az)`, `Basque (eu)`, `Belarusian (be)`, `Bengali (bn)`, `Bosnian (bs)`, `Bulgarian (bg)`, `Catalan (ca)`, `Cebuano (ceb)`, `Chichewa (ny)`, `Chinese - Simplified (zh-CN)`, `Chinese - Traditional (zh-TW)`, `Corsican (co)`, `Croatian (hr)`, `Czech (cs)`, `Danish (da)`, `Dutch (nl)`, `English (en)`, `Esperanto (eo)`, `Estonian (et)`, `Filipino (tl)`, `Finnish (fi)`, `French (fr)`, `Frisian (fy)`, `Galician (gl)`, `Georgian (ka)`, `German (de)`, `Greek (el)`, `Gujarati (gu)`, `Haitian Creole (ht)`, `Hausa (ha)`, `Hawaiian (haw)`, `Hebrew (he)`, `Hindi (hi)`, `Hmong (hmn)`, `Hungarian (hu)`, `Icelandic (is)`, `Igbo (ig)`, `Indonesian (id)`, `Irish (ga)`, `Italian (it)`, `Japanese (ja)`, `Javanese (jv)`, `Kannada (kn)`, `Kazakh (kk)`, `Khmer (km)`, `Korean (ko)`, `Kurdish - Kurmanji (ku)`, `Kyrgyz (ky)`, `Lao (lo)`, `Latin (la)`, `Latvian (lv)`, `Lithuanian (lt)`, `Luxembourgish (lb)`, `Macedonian (mk)`, `Malagasy (mg)`, `Malay (ms)`, `Malayalam (ml)`, `Maltese (mt)`, `Maori (mi)`, `Marathi (mr)`, `Mongolian (mn)`, `Myanmar - Burmese (my)`, `Nepali (ne)`, `Norwegian (no)`, `Pashto (ps)`, `Persian (fa)`, `Polish (pl)`, `Portuguese (pt)`, `Punjabi (pa)`, `Romanian (ro)`, `Russian (ru)`, `Samoan (sm)`, `Scots Gaelic (gd)`, `Serbian (sr)`, `Sesotho (st)`, `Shona (sn)`, `Sindhi (sd)`, `Sinhala (si)`, `Slovak (sk)`, `Slovenian (sl)`, `Somali (so)`, `Spanish (es)`, `Sundanese (su)`, `Swahili (sw)`, `Swedish (sv)`, `Tajik (tg)`, `Tamil (ta)`, `Telugu (te)`, `Thai (th)`, `Turkish (tr)`, `Ukrainian (uk)`, `Urdu (ur)`, `Uyghur (ug)`, `Uzbek (uz)`, `Vietnamese (vi)`, `Welsh (cy)`, `Xhosa (xh)`, `Yiddish (yi)`, `Yoruba (yo)`, `Zulu (zu)` |
| Translate to | Dropdown | Yes | The target language. If setting a custom value, use the language code (e.g., "en" for English).**Options:** `Afrikaans (af)`, `Albanian (sq)`, `Amharic (am)`, `Arabic (ar)`, `Armenian (hy)`, `Azerbaijani (az)`, `Basque (eu)`, `Belarusian (be)`, `Bengali (bn)`, `Bosnian (bs)`, `Bulgarian (bg)`, `Catalan (ca)`, `Cebuano (ceb)`, `Chichewa (ny)`, `Chinese - Simplified (zh-CN)`, `Chinese - Traditional (zh-TW)`, `Corsican (co)`, `Croatian (hr)`, `Czech (cs)`, `Danish (da)`, `Dutch (nl)`, `English (en)`, `Esperanto (eo)`, `Estonian (et)`, `Filipino (tl)`, `Finnish (fi)`, `French (fr)`, `Frisian (fy)`, `Galician (gl)`, `Georgian (ka)`, `German (de)`, `Greek (el)`, `Gujarati (gu)`, `Haitian Creole (ht)`, `Hausa (ha)`, `Hawaiian (haw)`, `Hebrew (he)`, `Hindi (hi)`, `Hmong (hmn)`, `Hungarian (hu)`, `Icelandic (is)`, `Igbo (ig)`, `Indonesian (id)`, `Irish (ga)`, `Italian (it)`, `Japanese (ja)`, `Javanese (jv)`, `Kannada (kn)`, `Kazakh (kk)`, `Khmer (km)`, `Korean (ko)`, `Kurdish - Kurmanji (ku)`, `Kyrgyz (ky)`, `Lao (lo)`, `Latin (la)`, `Latvian (lv)`, `Lithuanian (lt)`, `Luxembourgish (lb)`, `Macedonian (mk)`, `Malagasy (mg)`, `Malay (ms)`, `Malayalam (ml)`, `Maltese (mt)`, `Maori (mi)`, `Marathi (mr)`, `Mongolian (mn)`, `Myanmar - Burmese (my)`, `Nepali (ne)`, `Norwegian (no)`, `Pashto (ps)`, `Persian (fa)`, `Polish (pl)`, `Portuguese (pt)`, `Punjabi (pa)`, `Romanian (ro)`, `Russian (ru)`, `Samoan (sm)`, `Scots Gaelic (gd)`, `Serbian (sr)`, `Sesotho (st)`, `Shona (sn)`, `Sindhi (sd)`, `Sinhala (si)`, `Slovak (sk)`, `Slovenian (sl)`, `Somali (so)`, `Spanish (es)`, `Sundanese (su)`, `Swahili (sw)`, `Swedish (sv)`, `Tajik (tg)`, `Tamil (ta)`, `Telugu (te)`, `Thai (th)`, `Turkish (tr)`, `Ukrainian (uk)`, `Urdu (ur)`, `Uyghur (ug)`, `Uzbek (uz)`, `Vietnamese (vi)`, `Welsh (cy)`, `Xhosa (xh)`, `Yiddish (yi)`, `Yoruba (yo)`, `Zulu (zu)` |

#### Example use case
Automatically translate image captions or metadata into multiple languages for international product catalogs.

---

### InRiver

#### InRiver Add Media From URL

Adds a media resource to [InRiver](https://www.inriver.com/) using a URL. You can choose to add it as a hosted external link or upload the actual file. You can also link the asset to a specific entity such as a product.

##### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| InRiver API base URL | Text | Yes | The base URL of your InRiver instance. For example: `https://your-instance.productmarketingcloud.com`. |
| InRiver API key | Text | Yes | Your InRiver API key. |
| Media URL | Text | Yes | The URL of the media file to upload or process. |
| Add media method | Dropdown | Yes | Choose whether to store the file as an external reference or upload it directly to InRiver.**Options:** `Upload the file to InRiver`, `Add as an external URL string` |
| Override URL filename | Text | No | Optional filename to assign to the media in InRiver. If blank, the name is inferred from the URL. For example: `my-custom-filename.jpg`. |
| Link to entity ID | Text | No | Specify the ID of the entity (e.g., product or resource) to which the media should be linked. Leave empty to add as a media resource without linking to an entity. |

##### Example use case
Automatically upload a product image from Cloudinary to InRiver and link it to the corresponding product entity.

---

#### InRiver Delete Entity By ID

Deletes an entity from [InRiver](https://www.inriver.com/) by providing its ID.

##### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| InRiver API base URL | Text | Yes | The base URL of your InRiver instance. For example: `https://your-instance.productmarketingcloud.com`. |
| InRiver API key | Text | Yes | Your InRiver API key. |
| Entity ID | Text | Yes | The ID of the entity to delete from InRiver. |

##### Example use case
Remove outdated or orphaned media entries from InRiver when they're deleted or archived in Cloudinary.

---

### Mailchimp

#### Upload An Asset To Mailchimp

Uploads an asset to [Mailchimp's File Manager](https://mailchimp.com/).

##### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| API base URL | Text | Yes | The base URL for your Mailchimp API. Typically looks like `https://your-dc.api.mailchimp.com`, where `your-dc` is your data center (e.g., `us21`). Version 3.0 of the Mailchimp API will be used. |
| API key | Text | Yes | Your Mailchimp API key used to authenticate requests. Found in your Mailchimp account settings. |
| Asset URL | Text | Yes | The direct URL of the file you want to upload to Mailchimp's content manager. |
| Filename | Text | Yes | The name the file will have in Mailchimp. Include the file extension (e.g., `banner.jpg`). |
| Folder ID | Text | No | Optional Mailchimp folder ID to organize the uploaded file. Leave blank to upload to the root folder. |

##### Example use case
Upload a banner image to Mailchimp when a new campaign is launched.

---

#### Delete An Asset From Mailchimp

Deletes an asset from [Mailchimp's File Manager](https://mailchimp.com/).

##### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| API base URL | Text | Yes | The base URL for your Mailchimp API. Typically looks like `https://your-dc.api.mailchimp.com`, where `your-dc` is your data center (e.g., `us21`). Version 3.0 of the Mailchimp API will be used. |
| API key | Text | Yes | Your Mailchimp API key used to authenticate requests. Found in your Mailchimp account settings. |
| File ID | Text | Yes | The unique ID of the asset to delete from Mailchimp's content manager. |

##### Example use case
Automatically remove outdated PDFs or images from Mailchimp when a campaign ends.

---

### Marketo Create A File

Creates or uploads a file to [Marketo](https://marketo.com/) using the [Marketo API](https://developer.adobe.com/marketo-apis/api/asset/#operation/createFileUsingPOST).

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Base API URL | Text | Yes | The base URL for your Marketo instance's REST API. For example: `https://your-instance.mktorest.com`. See the [Marketo authentication documentation](https://developers.marketo.com/rest-api/authentication) for more information. |
| Client ID | Text | Yes | Your Marketo API client ID from your Marketo account's selected service. |
| Client secret | Text | Yes | The secret key paired with your client ID for Marketo API authentication. |
| File URL | Text | Yes | The direct URL to the file you want to upload to Marketo. |
| Name | Text | Yes | The name that will be assigned to the file in Marketo. |
| Folder | Code | Yes | The folder object (in JSON) where the file will be created. Must include an `id` and `type` (Folder or Program). Example: `{ "id": 10, "type": "Folder" }` |
| Description | Text | No | Optional description for the file in Marketo. |
| Insert only | Toggle | No | If enabled, the request will fail if a file with the same name already exists in the folder. |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`). 

#### Example use case
Push a product spec sheet or campaign image to Marketo to use in automated email templates.

---

### Monday Change Column Value

Updates a column value on a [Monday](https://monday.com) board.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Monday access token | Text | Yes | Your Monday.com API token. |
| Board ID | Text | Yes | The ID of the Monday.com board where the item is located. |
| Item ID | Text | Yes | The ID of the Monday.com item to update. |
| Column ID | Text | Yes | The ID of the Monday.com column to update. |
| New value | Code | Yes | Pass the new column value inside the "value" property of the object above (no need to JSON-encode it). See the column types reference on Monday's API docs for more info about the expected structure of each column type. |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`). 

#### Example use case
Update a "Status" column on a Monday board when a new product image is approved.

#### Example new values

The **New value** field requires the new value to be specified as either a string or an object, depending on the column type. 

##### String example

Change the column value to "Done":

```json
{
  "value": "Done"
}
```

##### Object example

Change the column value to {"label": "Done"}:

```json
{
  "value": {"label": "Done"}
}
```

Learn more about [changing column values](https://developer.monday.com/api-reference/docs/change-column-values).

---

### OpenAI Analyze Image By Prompt

Analyzes an image using OpenAI and answers a question about it.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| OpenAI API key | Text | Yes | Your OpenAI API key for authenticating requests. |
| OpenAI organization ID (optional) | Text | No | If you belong to multiple organizations, you can optionally specify the organization for API requests. |
| OpenAI project ID (optional) | Text | No | If you're using a legacy user API key or belong to multiple projects, you can optionally specify the project for API requests. |
| Image URL | Text | Yes | The URL of the image to process. |
| Prompt | Text | Yes | Ask a question about the image, e.g., 'What is happening in this photo?' |
| Max tokens (optional) | Number | No | Specify the maximum number of OpenAI tokens allowed in the response (impacts the response length, costs, processing time, etc). Default is 300. |
| Image detail level (optional) | Dropdown | No | Set the level of image analysis detail: low, high, or auto. Use high for richer responses.**Options:** `auto`, `high`, `low` |

> **NOTE**: Images must meet the requirements set out in the [OpenAI images and vision guide](https://platform.openai.com/docs/guides/images-vision?api-mode=responses#image-input-requirements).

#### Example use case
Auto-generate alt text or summarize the visual content of an image using a prompt like "What is in this photo?".

---

### OpenAI Generate Image And Cloudinary Upload

Generates an image using OpenAI's image generation API and automatically uploads the result to your Cloudinary product environment.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| OpenAI API key | Text | Yes | Your OpenAI API key for authenticating image generation requests. |
| OpenAI model | Dropdown | Yes | The OpenAI model to use for image generation.**Options:** `gpt-image-1`, `dall-e-3`, `dall-e-2` |
| OpenAI organization ID (optional) | Text | No | If you belong to multiple organizations, you can optionally specify the organization for API requests. |
| OpenAI project ID (optional) | Text | No | If you're using a legacy user API key or belong to multiple projects, you can optionally specify the project for API requests. |
| Prompt | Text | Yes | A text description of the desired image(s) that should be generated. |
| Create image parameters (optional) | Code | No | Optional OpenAI 'create image' parameters, in JSON format. See the [OpenAI API reference](https://platform.openai.com/docs/api-reference/images/create) for a full list of possible parameters. You can use [JSONLint.com](https://jsonlint.com/) to validate your JSON. |
| Upload parameters (optional) | Code | No | Optional upload parameters of the Upload API method, in JSON format. See the [Upload API reference](image_upload_api_reference) for a full list of possible parameters. You can use [JSONLint.com](https://jsonlint.com/) to validate your JSON. |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`).

#### Example use case
Automatically generate placeholder images or marketing visuals based on product descriptions, then store them in Cloudinary for further processing or delivery.

---

### Shopify

To use the Shopify blocks you need to create and install a custom app for your Shopify store. This allow access to the Shopify API.

#### Set up a custom app Use the [Custom apps guide](https://help.shopify.com/en/manual/apps/app-types/custom-apps) to create and install a custom app for your Shopify store.

The main steps are as follows:

1. Activate custom app development from the Shopify admin.
1. Create a custom app from the Shopify admin settings.
1. Select API scopes.  You need to assign **Admin API access scopes** to the app.
1. Install the app and get the Admin API access token.

---

#### Upload Image To Shopify

Uploads an image as raw bytes to a Shopify product.

##### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Shopify access token | Text | Yes | Your Shopify Admin API access token. |
| Store name | Text | Yes | Your Shopify store name (subdomain). For example, if your store URL is `https://my-store.myshopify.com`, enter `my-store`. |
| Product ID | Text | Yes | The ID of the Shopify product to which the image will be uploaded. |
| Image URL | Text | Yes | The URL of the image to upload to Shopify. |
| Alt text | Text | No | Alternative text description for the image (for accessibility). |
| Wait for upload to finish | Toggle | No | If enabled, the block polls Shopify until the media status is READY; otherwise, it returns immediately with the current status. |

##### Example use case
Add AI-generated alt text and image to a Shopify product automatically after editing in Cloudinary.

---

#### Update Metafield In Shopify

Updates a [metafield](https://help.shopify.com/en/manual/custom-data/metafields) value for a Shopify product.

##### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Shopify access token | Text | Yes | Your Shopify Admin API access token. |
| Store name | Text | Yes | Your Shopify store name (subdomain). For example, if your store URL is `https://my-store.myshopify.com`, enter `my-store`. |
| Product ID | Text | Yes | The ID of the Shopify product to which the metafield will be applied. |
| Metafield key | Text | Yes | The key/name of the Shopify metafield. |
| Metafield value | Text | Yes | The value to set in the metafield. |
| Metafield namespace | Text | Yes | Default: `custom` |
| Metafield type | Text | Yes | Default: `single_line_text_field` |

##### Example use case
Add the Cloudinary delivery URL of an optimized product image to a custom Shopify metafield.

> **NOTE**: If you're intending to deliver your images directly from Cloudinary using delivery URLs in product metafields, you also need to update your Liquid templates.  See [Access metafields](https://shopify.dev/docs/api/liquid/objects/metafield#metafield-access-metafields).

---

#### Update Variant In Shopify

Updates the image of a Shopify product variant or creates a new variant with an image.

##### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Shopify access token | Text | Yes | Your Shopify Admin API access token. |
| Store name | Text | Yes | Your Shopify store name (subdomain). For example, if your store URL is `https://my-store.myshopify.com`, enter `my-store`. |
| Product ID | Text | Yes | The ID of the Shopify product that contains the variant. |
| Variant ID | Text | No | The variant ID to add the image to. Leave empty to create a new variant. |
| Image ID | Text | Yes | The Shopify image ID to associate with the variant. |
| Option 1 | Text | No | The value for the first option of the variant. For example, if the option is Size, set this field to Small, Medium, or Large. |
| Option 2 | Text | No | The value for the second option of the variant. For example, if the option is Color, set this field to Blue, Red, or Green. |
| Option 3 | Text | No | The value for the third option of the variant. For example, if the option is Material, set this field to Leather, Fiber, or Denim. |

##### Example use case
Automatically create a new product variant with a custom image and metadata.

---

#### Get Shopify Variant

Fetches a Shopify product variant using a given identifier (e.g. SKU or barcode).

##### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Shopify store domain | Text | Yes | Your Shopify store domain. For example: `my-store.myshopify.com`. |
| Shopify access token | Text | Yes | Your Shopify Admin API access token. |
| Product variant field name | Dropdown | Yes | The variant field to search by.**Options:** `id`, `sku`, `barcode` |
| Product variant field value | Text | Yes | The value to match against the selected variant field (e.g., the actual SKU or barcode). |
| Include variant product fields | Text | Yes | Comma-separated list of variant-level fields to include in the response (e.g., `id`, `sku`, `barcode`). |
| Include parent product fields (optional) | Text | No | Comma-separated list of fields from the parent product to include (e.g., `title`, `vendor`). |

##### Example use case
Match a Cloudinary image to a product variant based on SKU to set metadata or publish updates.

---

### Upload To FTP~SFTP

Uploads a Cloudinary asset to a remote server using FTP or SFTP. Choose the protocol, provide connection details, and select the asset from a previous block.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Protocol | Dropdown | Yes | The file transfer protocol to use.**Options:** `FTP`, `SFTP` |
| Host | Text | Yes | The hostname or IP address of the remote server. |
| Port | Text | No | The port number. FTP default is 21, SFTP default is 22. |
| Username | Text | Yes | The username for authentication. |
| Password | Text | Yes | The password for authentication. |
| Remote path | Text | Yes | The destination path on the remote server, including the file name. If the path ends with /, the original file name is used. |

#### Example use case
Push resized marketing assets from Cloudinary to a partner's SFTP inbox each night so their DAM stays in sync without manual exports.

## Notifications

These blocks allow you to send alerts or updates via email, SMS, or messaging platforms like Slack when key events occur in your flow.

---

### Scheduled Email Report

Use this block to schedule a daily email that reports how many assets the flow processed in the last 24 hours, including links to those assets.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Recipients | Text | Yes | Enter one or more email addresses to receive the report. Separate multiple emails with commas. |
| Time | Text | Yes | The time (in UTC) to send the report each day. Format: HH:mm. |
| Report name | Text | No | A custom name for this report. This appears as the email subject line. |
| Description | Code | No | Optional summary shown in the email to describe the report contents. |

#### Example use case
Send a daily report to the content team on how many images were moderated or tagged.

> **NOTES**:
>
> * If a block processes two assets in one execution, they count as two in one email.

> * If two assets {valeExclude}are processed{/valeExclude} in different blocks during the same execution, each block sends its own email.

> * If the same asset {valeExclude}is processed{/valeExclude} in two different executions, it counts as two.

> * Emails are only sent from blocks that are actually executed (for example, you may have conditional branches in your flow).

---

### Send Message Using Twilio

Use this block to send an SMS or WhatsApp message using [Twilio](https://www.twilio.com/).

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Account SID | Text | Yes | Your Twilio account SID. Found in the Twilio Console. |
| Messaging service SID | Text | Yes | The SID of your Twilio messaging service. It determines which sender is used for the message. |
| Auth token | Text | Yes | Your Twilio authentication token. Keep this secret. |
| Destination phone number | Text | Yes | The recipient's phone number in E.164 format, e.g., +14155550101. |
| Message | Text | Yes | The body of the SMS or WhatsApp message to send. |

#### Example use case
Send a WhatsApp alert when someone uploads a high-priority asset.

> **NOTE**: You need to {valeExclude}be registered{/valeExclude} with Twilio to use this block.

---

### Send Email Using SendGrid

Use this block to send emails through [SendGrid](https://sendgrid.com/) using a dynamic template.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| SendGrid API key | Text | Yes | Your SendGrid API key. Required to authenticate the request. |
| From email address | Text | Yes | The email address that appears in the ‘From' field of the email. |
| From name (optional) | Text | No | Optional sender name that appears alongside the email address. |
| To email address(es) | Text | Yes | One or more recipient email addresses. Separate multiple addresses with commas. |
| Dynamic template ID | Text | Yes | The ID of the dynamic email template you want to use. Found in your SendGrid dashboard. |
| Template data (JSON) | Code | No | Provide key-value pairs (in JSON) to populate dynamic content in the template. Use jsonlint.com to validate your JSON. |
> **NOTE**: Variables inserted into JSON fields are identified by curly braces. If you're using curly braces in strings within JSON for any other purpose, escape the curly braces with a double backslash (e.g., `"text": "\\{\\{DATE(2017-02-14T06:08:39Z,SHORT)\\}\\}"`). 

#### Example use case
Send a branded confirmation email when a media asset passes moderation.

{note}
Make sure you're [registered](https://signup.sendgrid.com/) to SendGrid and have a [dynamic template](https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates) set up.
{/note}

---

### Send Slack Message

Sends a message to a Slack channel using the Slack API. Use simple mode to send text and media, or switch to advanced mode for full control with [Block Kit](https://api.slack.com/block-kit-builder) layouts. See the [Slack chat.postMessage documentation](https://api.slack.com/methods/chat.postMessage) for more information.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Bot token | Text | Yes | The Slack bot OAuth token. Requires the `chat:write` scope. |
| Channel | Text | Yes | The channel, private group, or DM to post to. Use a channel ID or name. |
| Message mode | Dropdown | No | Simple mode sends text with an optional image. Advanced mode lets you build rich layouts with Block Kit.**Options:** `Simple`, `Advanced` |
| Message text | Text | Yes | The message body displayed in the channel. |
| Rich message (JSON) | Code | No | Paste the full JSON from the [Block Kit Builder](https://api.slack.com/block-kit-builder). |
| Sender name | Text | No | Override the bot display name for this message. Requires the `chat:write.customize` scope. |
| Sender icon | Text | No | Override the bot icon. Use an emoji (e.g., `:rocket:`) or an image URL. Requires the `chat:write.customize` scope. |

#### Example use case
Post a concise status and thumbnail link to `#content-review` when automated tagging or moderation finishes, using simple text or a Block Kit layout from the advanced mode.

---

### Send Slack Notification

Send a customized message to Slack using a webhook URL.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Webhook URL | Text | Yes | Paste your Slack webhook URL to send the message to the desired channel. |
| Slack message (JSON) | Code | No | Define the Slack message payload in JSON format. Include a text field at minimum. |

#### Example use case
Post a summary in Slack when an asset is rejected during moderation.

---

### Send Teams Message Beta

Sends a message to a Microsoft Teams channel using an incoming webhook. Use simple mode to send text, or switch to advanced mode for full control with [Adaptive Card](https://adaptivecards.io/designer/) layouts. See the [Microsoft Teams incoming webhook documentation](https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook) for more information.

> **INFO**: Send Teams Message is currently in **Beta**. There may be minor changes to parameter names or other implementation details before the general access release. We invite you to try it out. We would appreciate any feedback via our [support team](https://support.cloudinary.com/hc/en-us/requests/new).

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Webhook URL | Text | Yes | The Microsoft Teams incoming webhook URL. Create one via the Workflows app in the target channel. |
| Message mode | Dropdown | No | Simple mode sends text. Advanced mode lets you build rich layouts with Adaptive Cards.**Options:** `Simple`, `Advanced` |
| Message text | Text | No | The message body displayed in the channel. Supports basic Markdown. |
| Adaptive card (JSON) | Code | No | The full Adaptive Card JSON payload (version 1.4 recommended for Teams compatibility). Build visually at the [Adaptive Cards Designer](https://adaptivecards.io/designer/). |

#### Example use case
Notify the marketing Teams channel when a batch of assets fails a quality check, attaching an Adaptive Card that lists public IDs and links back to the MediaFlows execution.

---
### Send To Airtable

Sends a value to an Airtable table. Use create mode to add a new record, or update mode to modify a field in an existing record. Supports text, number, currency/percent, and checkbox field types. Requires an Airtable Personal Access Token with the appropriate scopes. See the [Airtable API documentation](https://airtable.com/developers/web/api/introduction) for more information.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Personal access token | Text | Yes | The Airtable Personal Access Token. Requires `data.records:read` and `data.records:write` scopes. |
| Base ID | Text | Yes | The ID of the Airtable base containing the target table. Found in the base URL or API docs. |
| Table | Text | Yes | The name or ID of the table to write to. |
| Mode | Dropdown | No | Choose whether to create a new record or update an existing one.**Options:** `Create`, `Update` |
| Record ID | Text | Yes* | The ID of the record to update. Required when **Mode** is set to `Update`. |
| Field name | Text | Yes | The name of the field to write to. Must match an existing field in the table. |
| Field type | Dropdown | No | The type of the target field. Controls which value input is shown below.**Options:** `Text`, `Number`, `Currency ~ Percent`, `Checkbox` |
| Field value | Text or Toggle | No | The value to write to the field. The input type changes based on **Field type**: text input for `Text`, `Number`, and `Currency ~ Percent`; toggle for `Checkbox`. |

#### Example use case
When a video thumbnail is generated in Cloudinary, create or update an Airtable row with the campaign name, approval checkbox, and a link to the `secure_url` for reporting.

## Transformations

These blocks allow you to transform and enhance media in Cloudinary using actions like resize, overlay, effects, and generative AI.

> **NOTE**: Each of these blocks applies the transformation to the stored image, overwriting the original.

---

### Apply Background

Use this block to fill transparent areas of an image with a solid color or another image.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Mode | Dropdown | No | The type of background to apply, either a solid color or another image.**Options:** `Hex color`, `Background image` |
| Parameter | Text | Yes | Enter the hex color code (e.g., `FFFFFF`) or the public ID (e.g., `backgrounds/sample`) of the background image, depending on the selected mode. Default: `4287F5` |

#### Example use case
Add a white background to a product cutout before displaying it on your storefront.

---

### Background Removal

Use this block to [remove the background](background_removal) from an image.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Fine edges | Toggle | No | Enable improved edge detection for more accurate cutouts around hair, fur, or other soft details. |
| Foreground object (optional) | Multi-select | No | Optionally specify the main subject to focus on for background removal.**Options:** `potted_plant`, `bus`, `motorbike`, `sofa`, `tv`, `bicycle`, `chair`, `dining_table`, `cow`, `bottle`, `boat`, `horse`, `car`, `person`, `airplane`, `cat`, `bird`, `dog`, `sheep`, `train` |
| Wait for confidence result | Toggle | No | Wait until the confidence score is available before continuing. Useful if you need to evaluate background removal quality in later steps. |
| Webhook URL (optional) | Text | No | Send a webhook notification when background removal is complete. Can be used to trigger another flow or system. |

#### Example use case
Automatically isolate products for marketplace listings.

---

### Crop Media

Use this block to crop an image or video and focus on a specific region.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Width | Text | No | The width (in pixels) to crop the asset to. Leave blank to keep the original image width. |
| Height | Text | No | The height (in pixels) to crop the asset to. Leave blank to keep the original image height. |
| Gravity | Dropdown | No | Defines the focus point for cropping. Use auto for AI-based object detection or choose a fixed direction.**Options:** `Auto`, `Center`, `South_West`, `South_East`, `West`, `South`, `North_West`, `North`, `East`, `North_East` |

#### Example use case
Crop a hero image to fit a banner layout on your website.

---

### Drop Shadow

Use this block to add realistic shadows to objects in an image.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Azimuth | Text | Yes | The direction the light is coming from to cause the shadow effect. A value of 0 (north) means that the light is coming from behind the object and the shadow will be dropped towards the front of the object. Range: 0 to 360. Default: `215` |
| Elevation | Text | Yes | The height of the light source above the 'ground' to cause the shadow effect. Range: 0 to 90. Default: `45` |
| Spread | Text | Yes | The spread of the light source. A small number means 'point' light. A larger number means 'area' light. Range: 0 to 100. Default: `50` |

#### Example use case
Make isolated product images look more dimensional before publishing.

---

### Edit Media

Use this block to apply a custom transformation to a media asset using either [URL syntax](transformation_reference) or JSON format.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Transformation string | Text | No | A transformation in Cloudinary [URL syntax](transformation_reference), e.g., `c_fill,w_400,h_400`. |
| Transformation object | Code | Yes | A transformation in Cloudinary JSON syntax, using key-value pairs. |

> **NOTE**: If you provide transformations in both [URL syntax](transformation_reference) and object syntax, both {valeExclude}are applied{/valeExclude} - first the string and then the object. We recommend providing just one type of syntax.

#### Example use case
Apply a rounded-corner crop with specific scaling and radius settings.

      Either set the **Transformation string** to: 

      `c_fill,g_face,h_200,w_200/r_max`

      Or set the **Transformation object** to:

      ```json
      [
        {
          "width": 200,
          "height": 200,
          "crop": "fill",
          "gravity": "face"
        },
        {
          "radius": "max"
        }
      ]

      ```

---

### Generative Extend

Use this block to expand the dimensions of an image seamlessly with AI-generated pixels.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Gravity | Dropdown | No | Defines how the original image is positioned within the new extended canvas.**Options:** `south_west`, `north_east`, `east`, `north_west`, `south`, `center`, `north`, `south_east`, `west` |
| Width | Text | Yes | The final width of the extended image. Use fixed values (e.g., `1200`) or expressions like `iw_mul_1.5` to scale relative to the original width. |
| Height | Text | Yes | The final height of the extended image. Use fixed values (e.g., `800`) or expressions like `ih_mul_2` to scale relative to the original height. |
| Prompt | Text | No | Optional prompt to guide the AI-generated fill area. |

#### Example use case
Extend the background of a product shot to fit a vertical ad layout.

---

### Generative Recolor

Use this block to recolor part of an image using AI, while preserving shading and realism.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Prompt | Text | Yes | Describe the object or area to recolor. |
| Target color | Text | Yes | The desired new color. You can use a named color (e.g., `green` or `lightblue`), or a 3 or 6 digit RGB hex color (e.g., `F0A`, `FF4500`). |

#### Example use case
Recolor a t-shirt in a catalog image to show alternate colorways.

---

### Image Overlay

Use this block to place another image over the main asset.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Overlay URL | Text | Yes | The full URL of the image to overlay on the main asset. |
| Placement | Dropdown | No | The position where the overlay image will be placed on the main asset.**Options:** `south_west`, `north_east`, `east`, `north_west`, `south`, `center`, `north`, `south_east`, `west` |
| X offset | Number | Yes | Horizontal offset in pixels for the overlay image relative to the selected placement anchor. |
| Y offset | Number | Yes | Vertical offset in pixels for the overlay image relative to the selected placement anchor. |

#### Example use case
Add a logo overlay to social media thumbnails.

---

### Improve Image

Use this block to improve the brightness, contrast, and colors of an image using the [improve](transformation_reference#e_improve) effect.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Scene | Dropdown | No | Select the type of scene to guide the improvement.**Options:** `Outdoor`, `Indoor`, `Default` |
| Blend | Text | Yes | Set the intensity of the improvement (0–100). |

#### Example use case
Automatically improve user-uploaded photos before moderation.

---

### Optimize Media

Use this block to change an asset's format and quality.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Format | Dropdown | No | Select the output format for the media.**Options:** `jpg`, `wdp`, `original`, `gif`, `heic`, `png`, `webp`, `jp2`, `webm`, `mp4`, `mov`, `m3u8`, `avif` |
| Quality | Dropdown | No | Specify the output quality. Use auto to let Cloudinary balance quality and file size.**Options:** `25`, `50`, `75`, `90`, `auto`, `original` |

> **NOTE**: [Automatic format](image_optimization#automatic_format_selection_f_auto) isn't available as it depends on the requesting browser. This block overwrites the original asset, but ideally, you'd store assets in their original format and quality, and deliver them using [automatic format](image_optimization#automatic_format_selection_f_auto) and [quality](image_optimization#automatic_quality_selection_q_auto) on the fly.

#### Example use case
Store optimized media to save on storage costs.

---

### Resize Media

Use this block to resize a media asset by setting one dimension while keeping the original aspect ratio.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Dimension | Dropdown | No | Choose whether to resize by width or height. The other dimension will scale proportionally to maintain aspect ratio.**Options:** `Height`, `Width` |
| Value | Text | Yes | Specify the new size using a fixed pixel value (e.g., `800`) or a relative multiplier (e.g., `0.5` for 50% scale). |

#### Example use case
Scale down large images before uploading them to a partner system.

---

### Text Overlay

Use this block to add styled text onto an image or video.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Text | Text | Yes | The text string to draw on the asset (you can use values from previous blocks). |
| Font | Dropdown | No | The font family to use for the text overlay.**Options:** `georgia`, `open_sans`, `trebuchet_ms`, `helvetica`, `roboto`, `times_new_roman`, `montserrat`, `verdana`, `courier_new`, `arial` |
| Size | Text | Yes | The font size in pixels. |
| Style | Multi-select | No | Apply text styling effects. Select one or more styles to combine them.**Options:** `underline`, `bold`, `italic` |
| Color | Text | Yes | Hex code for the text color (e.g., `FF4500`). |
| Placement | Dropdown | No | The anchor point where the text is positioned.**Options:** `south_west`, `north_east`, `east`, `north_west`, `south`, `center`, `north`, `south_east`, `west` |
| X offset | Text | Yes | Horizontal offset relative to the placement anchor. It can be specified in pixels or as a percentage of the asset's width (e.g., `0.8` for 80%). Default: `0` |
| Y offset | Text | Yes | Vertical offset relative to the placement anchor. It can be specified in pixels or as a percentage of the asset's height (e.g., `0.8` for 80%). Default: `0` |

#### Example use case
Stamp an image with a dynamic label like "NEW" or "SALE".

## Cloudinary Video

These blocks provide video-specific functionality, interacting with the Cloudinary Video APIs.

### Export Video Transcription

Exports a Cloudinary `.transcript` file as an industry-standard `.srt` subtitle file.

> **NOTE**: You need to generate the `.transcript` file before using this block. You can do this with the [Video Transcription](#video_transcription) block.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Postfix | Text | No | Text to append to the public ID of the newly created .srt file. |
| Relate transcription to video | Toggle | No | Associate the generated .srt file with the original video asset. |

#### Example use case
Export transcriptions as `.srt` files to use as subtitles in external video players or editing software.

---

### Generate Video Details

Automatically generates and adds **Video Title** and **Video Description** contextual metadata to a video asset, and applies content-based tags.

> **NOTES**:
>
> * AI generates the title, description, and tags from the video transcript, therefore, for this block to be effective, the video must contain speech.

> * Cloudinary generates the transcript 'behind the scenes', so there's no need to generate a transcript in advance.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Wait for completion | Toggle | No | Whether to wait for processing to complete. Choose Yes if the result is needed for subsequent blocks. |
| Webhook URL (optional) | Text | No | Send a webhook when processing completes. Use this to trigger another flow or external system. |

#### Example use case
Automatically generate titles and descriptions that can be displayed by the Cloudinary Video Player, and tags to improve searchability and organization for user-uploaded videos.

> **TIP**: Refer to the [auto_video_details](image_upload_api_reference#auto_video_details) parameter of the Upload API for more details.

---

### Video Chaptering

Automatically generates chapter markers for a video, dividing it into meaningful segments with timestamps.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Wait for completion | Toggle | No | Whether to wait for the chaptering result. Choose Yes if the result is needed for downstream logic. |
| Webhook URL (optional) | Text | No | Send a webhook when the chaptering process is complete. Use this to trigger another flow or external system. |

#### Example use case
Automatically create chapters for educational or webinar videos to improve viewer navigation.

> **TIP**: Learn more about [video chapters](video_player_customization#video_chapters).

---

### Video Transcription

Generates a text transcript of the audio content in a video.

#### Configuration
{table:class=mf-config-table} Field | Type | Required | Description |
|-------|------|----------|-------------|
| Use the asset from | Asset selector | Yes* | Select an asset from a previous block, or click **Custom** to manually specify the asset details below. |
| Public ID | Text | Yes* | The asset public ID. Required when **Custom** is selected. |
| Delivery type | Text | Yes* | The delivery type for the asset (e.g., `upload`, `private`, `authenticated`). Required when **Custom** is selected. |
| Resource type | Text | Yes* | The asset type (`image`, `video`, `raw`). Required when **Custom** is selected. |
| Translate to (languages) | Multi-select | No | One or more language codes for translation (e.g., `en`, `es`, `fr`).**Options:** `Afrikaans (af)`, `Albanian (sq)`, `Amharic (am)`, `Arabic (ar)`, `Armenian (hy)`, `Azerbaijani (az)`, `Basque (eu)`, `Belarusian (be)`, `Bengali (bn)`, `Bosnian (bs)`, `Bulgarian (bg)`, `Catalan (ca)`, `Cebuano (ceb)`, `Chichewa (ny)`, `Chinese - Simplified (zh-CN)`, `Chinese - Traditional (zh-TW)`, `Corsican (co)`, `Croatian (hr)`, `Czech (cs)`, `Danish (da)`, `Dutch (nl)`, `English (en)`, `Esperanto (eo)`, `Estonian (et)`, `Filipino (tl)`, `Finnish (fi)`, `French (fr)`, `Frisian (fy)`, `Galician (gl)`, `Georgian (ka)`, `German (de)`, `Greek (el)`, `Gujarati (gu)`, `Haitian Creole (ht)`, `Hausa (ha)`, `Hawaiian (haw)`, `Hebrew (he)`, `Hindi (hi)`, `Hmong (hmn)`, `Hungarian (hu)`, `Icelandic (is)`, `Igbo (ig)`, `Indonesian (id)`, `Irish (ga)`, `Italian (it)`, `Japanese (ja)`, `Javanese (jv)`, `Kannada (kn)`, `Kazakh (kk)`, `Khmer (km)`, `Korean (ko)`, `Kurdish - Kurmanji (ku)`, `Kyrgyz (ky)`, `Lao (lo)`, `Latin (la)`, `Latvian (lv)`, `Lithuanian (lt)`, `Luxembourgish (lb)`, `Macedonian (mk)`, `Malagasy (mg)`, `Malay (ms)`, `Malayalam (ml)`, `Maltese (mt)`, `Maori (mi)`, `Marathi (mr)`, `Mongolian (mn)`, `Myanmar - Burmese (my)`, `Nepali (ne)`, `Norwegian (no)`, `Pashto (ps)`, `Persian (fa)`, `Polish (pl)`, `Portuguese (pt)`, `Punjabi (pa)`, `Romanian (ro)`, `Russian (ru)`, `Samoan (sm)`, `Scots Gaelic (gd)`, `Serbian (sr)`, `Sesotho (st)`, `Shona (sn)`, `Sindhi (sd)`, `Sinhala (si)`, `Slovak (sk)`, `Slovenian (sl)`, `Somali (so)`, `Spanish (es)`, `Sundanese (su)`, `Swahili (sw)`, `Swedish (sv)`, `Tajik (tg)`, `Tamil (ta)`, `Telugu (te)`, `Thai (th)`, `Turkish (tr)`, `Ukrainian (uk)`, `Urdu (ur)`, `Uyghur (ug)`, `Uzbek (uz)`, `Vietnamese (vi)`, `Welsh (cy)`, `Xhosa (xh)`, `Yiddish (yi)`, `Yoruba (yo)`, `Zulu (zu)` |
| Google Translate | Add-on subscription | Yes* | Confirms the Google Translation add-on is registered for your product environment so this block can run. Required when translation languages are selected. |
| Wait for completion | Toggle | No | Whether to wait for the transcription result. Choose Yes if the result is needed for downstream logic. |
| Relate transcripts to video | Toggle | No | Associate the generated .transcript files with the original video asset. *This will only work when "Wait for completion" is set to Yes. |
| Webhook URL (optional) | Text | No | Send a webhook when the transcription process is complete. Use this to trigger another flow or external system. |

#### Example use case
Generate transcripts for video content to improve accessibility and SEO.

> **TIP**: Learn more about [video transcription](video_transcription).