Block reference

As explained in Learn about blocks, flows are composed of a set of blocks that you connect, 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

Triggers are special blocks that are used to start the flow execution. For example, use the Catch Webhook block to trigger the flow when a specific event occurs or use the Scheduler block to trigger the flow on a predefined schedule.

Tip Every flow must start with a trigger block.

Catch Webhook

Webhooks are a simple way for applications to send messages to one another. This is how, for example, your Shopify store can send a message to Slack to notify you of a new order.

Use this block to trigger a flow from any application.

The block is configured with a specific web address (also known as a webhook URL). When the block receives an HTTP request at the webhook URL, it triggers the flow. The triggered flow can then perform a series of actions, such as uploading an image, updating metadata, or calling an API.

To configure any application to trigger the flow:

  1. Click the block to open its configuration sidebar.

  2. Click the copy button to copy the block's webhook URL.

  3. Navigate to the desired application, locate the webhook settings (the steps may vary depending on the application), and paste the block's webhook URL.

Parameters included in the HTTP request are available to all blocks in the flow using Dynamic Parameters. In the block's configuration sidebar, add the parameters sent to this flow. This will allow you to access them easily in the Dynamic Parameters menu in all blocks in the flow.

Important The webhook is not automatically verified. Please take all possible precautions to ensure your data remains secure and protected. This includes verifying the source of the webhook whenever possible, testing the flow in a development or staging environment, and monitoring its activity closely.

In the example below, every message the flow receives is automatically sent using SendGrid.

Cloudinary Upload

Use this block to trigger a flow whenever an asset is uploaded to Cloudinary.

This block is similar to the Catch Webhook block, but the Dynamic Parameters of Cloudinary upload webhooks are already pre-populated.

To configure Cloudinary to trigger the flow when an upload occurs:

  1. Click the block to open its configuration sidebar.

  2. Click the copy button to copy the block's webhook URL.

  3. Navigate to Cloudinary's Webhook Notifications page, add a new notification to be sent to the copied webhook URL, and set the notification type to upload.

Cloudinary Tags

Use this block to trigger a flow whenever a tag is added or removed in an asset in Cloudinary.

This block is similar to the Catch Webhook block, but the Dynamic Parameters of Cloudinary resource tags changed webhooks are already pre-populated.

To configure Cloudinary to trigger the flow when a tag is added/removed:

  1. Click the block to open its configuration sidebar.

  2. Click the copy button to copy the block's webhook URL.

  3. Navigate to Cloudinary's Webhook Notifications page, add a new notification to be sent to the copied webhook URL, and set the notification type to resource tags changed.

Scheduler

Use this block to trigger recurring flows. Trigger an action every day of the month, every day of the week, or every single day. This is similar to a crontab, cronjob, or cron.

Tip Head to crontab.guru to easily create a cron schedule expression.

Notes

  • The timezone used is UTC.

  • The minimum scheduling interval is one hour.

DAM App

Use this block to trigger a flow from your Cloudinary Media Library. This is done using Cloudinary's Apps for DAM. Click the block to configure its appearance and behavior.

To use the MediaFlows DAM App, make sure the app is enabled in your DAM App Marketplace.

To execute the flow, follow the following steps:

  1. Select the media on which you want to execute the flow, and select Run MediaFlows from the menu.

  1. In the MediaFlows DAM App, click the flow you want to trigger.

Flow Logic

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

Condition

Use this block to determine how to proceed based on a condition.

This is the only block that has two happy paths (two blue dots).

  • The block connected to the upper happy path is executed if the condition is met (returns true).

  • The block connected to the lower happy path is executed if the condition is not met (returns false).

For example, the filter could test if the asset is an image, and if it is, process the image, otherwise send an email:

Note In the Condition block settings, you must set the Key field to a Dynamic Parameter.

Apply On Each

Use this block to run the next connected block on each item in a list.

In each of the next connected blocks, you can refer to the relevant item and index using the Dynamic Parameters menu.

For example, you could split a string and add all items as tags to an asset.

Cloudinary APIs

These blocks interact with Cloudinary APIs.

Account Usage

Use the block to get information about your account usage. This block calls the usage method of the Admin API.

For example, you could schedule a daily email to be sent if a specific quota is exceeded in your usage:

Rename Media

Use this block to rename an asset in Cloudinary or move it to a different folder. This block calls the rename method of the Upload API.

For example, when a media is uploaded to Cloudinary, if its size is larger than 3MB, move the asset to the_/large_files_ folder:

Upload Media

Use this block to upload files from any source to Cloudinary.

Use the optional upload parameters in the Optional Parameters (Advanced) field to fine-tune your upload.

For example, when media is uploaded to an S3 bucket, upload it to Cloudinary and add the tag from_s3, so it will be searchable in your Media Library:

Process Media

Use this block to apply actions on assets in Cloudinary. For example, to convert a video to multiple formats up front, so the different formats of the video will not need to be generated on the fly when first accessed by users. This block calls the explicit method of the Upload API.

Read the documentation on the explicit method to get ideas on what you can achieve with this block. You can include optional parameters in the Optional Parameters (Advanced) section using.

For example, when media is uploaded to Cloudinary, if the media is a video, apply video optimizations. Otherwise, apply image optimizations:

Get Asset Information

Use this block to get information on a media in Cloudinary such as the width, height, version, secure URL, and more. This block calls the explicit method of the Upload API.

For example, when a tag is added to an asset in Cloudinary, get the secure URL of the asset and send it via email to your co-worker.

Manual moderation

Use this block to send media to a manual moderation process. The assets can then be moderated using the Admin API or the Cloudinary Console. Rejected assets are automatically invalidated on the CDN within approximately ten minutes.

Search Media

Use this block to find media in Cloudinary that meet a given criteria. This block calls the search method of the Search API. The block returns a maximum of 50 results in each search.

Get Tags

Use this block to get the tags of a media asset in Cloudinary. This block calls the resources method of the Admin API.

Update Tags

Use this block to update tags on a media asset in Cloudinary. This block calls the tags method of the Upload API.

Get Contextual Metadata

Use this block to get the value of a contextual metadata field of a media asset in Cloudinary. This block calls the resource method of the Admin API.

Update Contextual Metadata

Use this block to update contextual metadata on a media asset in Cloudinary. This block calls the context method of the Upload API.

Get Structured Metadata

Use this block to get the value of a structured metadata field of a media asset in Cloudinary. This block calls the resource method of the Admin API.

Update Structured Metadata

Use this block to update structured metadata on a media asset in Cloudinary. This block calls the metadata method of the Upload API.

Create Structured Metadata

Use this block to create a new structured metadata on a media asset in Cloudinary. This block calls the metadata_fields method of the Admin API.

Cloudinary add-ons

Note Before using a block that’s associated with a Cloudinary add-on, make sure you're registered for the add-on.

Cloudinary Background Removal

Use this block to automatically and accurately remove the background of an image.

This block uses the Cloudinary AI Background Removal add-on.

Make sure you're registered to this add-on before using this block.

Amazon Image Moderation

Use this block to automatically and accurately moderate your images.

This block uses the Amazon Rekognition AI Moderation add-on.

Make sure you're registered to this add-on before using this block.

Google Image Tagging

Use this block to automatically add tags to an image.

This block uses the Google Auto Tagging add-on.

Make sure you're registered to this add-on before using this block.

Google Video Tagging

Use this block to automatically add tags to a video.

This block uses the Google Automatic Video Tagging add-on

Make sure you're registered to this add-on before using this block.

For example, when the flow is executed using the DAM App, if the selected asset is an image, automatically add tags to the image using the Google Image Tagging block. If the selected asset is a video, automatically add tags to the video using the Google Video Tagging block.

Integrations

Get Tokens From Akeneo

Use this block to retrieve Akeneo tokens. The retrieved tokens can later be used by other Akeneo-related blocks to communicate with Akeneo's API.

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

The connection information required for this block can be copied from the Akeneo Connections page.

Create An Asset In Akeneo

Use this block to create an asset in Akeneo's Asset Manager.

To allow this block to communicate with Akeneo's API, use the tokens retrieved by the Get Tokens From Akeneo block.

Use Akeneo’s Product Link Rule to automatically link the created Akeneo asset to a product.

This block can be used only with Akeneo versions that support the Akeneo Asset Manager.

Delete An Asset In Akeneo

Use this block to delete an asset from Akeneo's Asset Manager.

To allow this block to communicate with Akeneo's API, use the tokens retrieved by the Get Tokens From Akeneo block.

This block can be used only with Akeneo versions that support the Akeneo Asset Manager.

Notifications

Send a Message using Twilio

Use this block to send an SMS or a WhatsApp message using Twilio.

Make sure you're registered to Twilio in order to use this block. The account information required below can be copied from copy the Twilio console.

Send Email Using SendGrid

Use this block to send an email using SendGrid.

Make sure you're registered to SendGrid and have a Dynamic Template available in order to use this block.

Developer Tools

Send HTTP Request

Use this block to communicate with other services and APIs. For example, send the media output to a marketing automation system.

Search and Replace

Use this block to replace all occurrences of a specified string or regular expression with a specified replacement string.

Join Strings

Use this block to concatenate two strings with an optional separator.

Split String

Use this block to split a string using a predefined separator.

Add To Logs

Use this block to display a message in the Execution logs. It's a good practice to use this block when creating flows for debug purposes, and for displaying messages in MediaFlows logs.

Last updated