Last updated: Dec-16-2024
As explained in Building a Flow, 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 every time a webhook is sent to a specific URL or use the Scheduler block to trigger the flow on a predefined schedule.
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:
- Click the block to open its configuration sidebar.
- Click the copy button to copy the block's webhook URL.
- Navigate to the desired application, locate the webhook settings (the steps may vary depending on the application), and paste the block's webhook URL.
You also have the option to add custom parameters that will be available in the following connected blocks. In the block's configuration sidebar, you can add any of the values sent to this flow, that will then also be made available as dynamic values to all blocks connected after this block in the flow.
In the example below, every message received by the flow is automatically sent using SendGrid.
Cloudinary Folder Changed
Use this block to catch the notification sent when someone moves an asset to a different folder.
This block isn't supported for product environments using the legacy fixed folder mode.
In the legacy fixed folder mode, moving an asset to another folder in the Media Library changes the public_id
value, and thus triggers a rename notification.
This block is similar to the Catch Webhook block, but with the advantage that the Dynamic Parameters are automatically populated with values from the Cloudinary move
notification, ready for use in subsequent blocks.
To configure Cloudinary to trigger the flow when an asset is moved, click the block to open its configuration sidebar and click the Set Webhook button to automatically add the webhook to your Cloudinary product environment.
You can change the webhook manually, if required, by clicking Change, once you've set it.
Cloudinary Notification
Use this block to catch any Cloudinary webhook notifications.
This block is similar to the Catch Webhook block, but with the advantage that the Dynamic Parameters are automatically populated with values from the Cloudinary webhook notification, ready for use in subsequent blocks.
To configure Cloudinary to trigger the flow on receiving certain notifications, click the block to open its configuration sidebar, specify which notifications you want to catch in the Webhook Trigger field (you can choose multiple options from the list), and click the Set Webhook button to automatically add the webhook(s) to your Cloudinary product environment.
You can change the webhook manually, if required, by clicking Change, once you've set it.
Cloudinary SMD Changed
Use this block to catch Cloudinary Structured Metadata Changed notifications.
This block is similar to the Catch Webhook block, but with the advantage that the Dynamic Parameters are automatically populated with values from the Cloudinary metadata
notification, ready for use in subsequent blocks.
To configure Cloudinary to trigger the flow when metadata is changed, click the block to open its configuration sidebar and click the Set Webhook button to automatically add the webhook to your Cloudinary product environment.
You can change the webhook manually, if required, by clicking Change, once you've set it.
Cloudinary Tags
Use this block to trigger a flow whenever a tag is added to or removed from an asset in Cloudinary.
This block is similar to the Catch Webhook block, but with the advantage that the Dynamic Parameters are automatically populated with values from the Cloudinary tags
notification, ready for use in subsequent blocks.
To configure Cloudinary to trigger the flow when a tag is added/removed, click the block to open its configuration sidebar and click the Set Webhook button to automatically add the webhook to your Cloudinary product environment.
You can change the webhook manually, if required, by clicking Change, once you've set it.
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 with the advantage that the Dynamic Parameters are automatically populated with values from the Cloudinary upload
notification, ready for use in subsequent blocks.
To configure Cloudinary to trigger the flow when an upload occurs, click the block to open its configuration sidebar and click the Set Webhook button to automatically add the webhook to your Cloudinary product environment.
You can change the webhook manually, if required, by clicking Change, once you've set it.
DAM App
Use this block to trigger a flow from your Cloudinary Media Library. This is done using Cloudinary's DAM Apps. 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:
- Head to Cloudinary's media library.
-
Select the media on which you want to execute the flow, and select Run MediaFlows from the menu.
In the MediaFlows DAM App, click the flow you want to trigger.
Periodic Search Media
Similar to the Scheduler block, use this block to trigger recurring flows that start with a search expression. The flow then processes only the assets returned by the search, up to a configurable limit.
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.
- The timezone used is UTC.
- The minimum scheduling interval is one hour.
Flow Logic
These blocks can be used by any flow to implement logical flow functionality.
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 dynamic values.
You also have the option to add custom parameters that will be available in the following connected blocks. In the block's configuration sidebar, you can add any values that will then also be made available as dynamic values to all blocks connected after this block in the flow.
For example, you could split a string and add all items as tags to an asset.
Complex Condition
Evaluate JSON data against JSONLogic conditional expressions to determine which blocks will be executed. See the JSONLogic documentation for more information.
This block has two paths (two blue dots).
- If
true
, then the block linked to the upper blue dot will be executed. - If
false
, then the block linked to the lower blue dot will be executed.
Condition
Use this block to determine which blocks will be executed based on a comparison between two variables using a specified operator.
This block has two paths (two blue dots).
- If
true
, then the block connected to the upper blue dot will execute. - If
false
, then the block connected to the lower blue dot will be executed.
For example, the filter could test if the asset is an image, and if it is, add a text overlay, otherwise send an email:
Wait For All
Use this block to wait for all other blocks that are connected to this block to complete before continuing the flow.
This block is especially useful after using an Apply On Each block in your flow.
Developer Tools
Add To Logs
Use this block to display a message in the Execution logs. It's good practice to use this block when creating flows for debug purposes, and for displaying messages in MediaFlows logs.
Delay
Use this block to delay the execution of the next block by a set number of seconds.
Join Strings
Use this block to concatenate two strings with an optional separator.
JQ Processor
Get the result of a JQ expression on the JSON data. Use the JQ Cheatsheet and Playground to learn and experiment with JQ syntax.
JSON to Array
Use this block to convert a JSON object into an array, adding a specified key to each item in the array.
JSONPath Query
Use this block to select parts of a JSON response using JSONPath expressions. See the JSONPath documentation for more information.
Search and Replace
Use this block to replace all occurrences of a specified string or regular expression with a specified replacement string.
Send HTTP Request
Use this block to communicate with other services and APIs. For example, send the media output to a marketing automation system.
Split String
Use this block to split a string using a predefined separator.
Cloudinary APIs
These blocks interact with Cloudinary APIs.
Account Usage
Use this 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:
Apply Actions
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 these parameters in the Optional Parameters field.
For example, when media is uploaded to Cloudinary, if the media is a video, apply video optimizations:
Change Display Name
Use this block to change the display name of an asset in Cloudinary. This block calls the explicit method of the Upload API with the new display name.
Change Public ID
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 asset is uploaded to Cloudinary, if its size is larger than 3MB, move the asset to the large_files
folder:
Create Structured Metadata
Use this block to create new structured metadata on a media asset in Cloudinary. This block calls the metadata_fields method of the Admin API.
Delete Media
Use this block to delete media in Cloudinary. This block calls the destroy method of the Upload API.
Duplicate Media
Use this block to duplicate a media asset in Cloudinary. This enables you to make modifications without affecting the original media file. This block calls the upload method of the Upload API to upload another copy of the asset, with a new public ID.
Get Asset Information
Use this block to get information on a media asset 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 a Cloudinary asset, get the secure URL of the asset and send it to Akeneo.
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.
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.
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.
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.
Move To Folder
Use this block to move an asset from one folder to another folder in Cloudinary. This block calls the explicit method of the Upload API with the new folder.
Set Access Control
Use this block to control access to 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 or update methods.
Search Media
Use this block to find media assets 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.
Universal
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. Select the method and specify all required and optional parameters in JSON format.
Learn more about the methods in the Upload API and Admin API references.
Update Contextual Metadata
Use this block to update contextual metadata on media assets in Cloudinary. This block calls the context method of the Upload API.
Update Structured Metadata
Use this block to update structured metadata on media assets in Cloudinary. This block calls the metadata method of the Upload API.
Update Tags
Use this block to update tags on media assets in Cloudinary. This block calls the tags method of the Upload API.
Upload Media
Use this block to upload content from an FTP, HTTP, or HTTPS URL into your Cloudinary product environment.
You can include 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:
Upload from HTTP
Use this block to send an HTTP request to a target URL, and then automatically upload the response's media binary to your Cloudinary product environment. You can configure the Request Method, Request Header and Request Body to send in the indicated fields.
Cloudinary add-ons
AI Content Analysis Get Tags
Use this block to analyze media and automatically add tags to a video with the Cloudinary AI Content Analysis add-on. See the model documentation for details on the capabilities and strengths of each model.
AI Vision Analyze by Prompts
Use this block to analyze an image through open ended questions or instructions. You can make up to ten enquiries about the image at a time and receive a detailed response for each (within one JSON structure). If you specifically want a yes/no answer, use the AI Vision Moderate By Prompts block.
This block uses the Cloudinary AI Vision add-on. Make sure you're registered to this add-on in order to use this block.
Learn more about this mode of the add-on.
AI Vision Moderate By Prompts
Use this block to analyze an image by asking questions to which you expect a yes/no answer. You can ask up to ten questions at a time and receive a "yes", "no" or "unknown" response for each (within one JSON structure).
This block uses the Cloudinary AI Vision add-on. Make sure you're registered to this add-on in order to use this block.
Learn more about this mode of the add-on.
AI Vision Tag By Prompts
Use this block to return tags based on the truth of a statement or an affirmative answer to a question. In the Tag Definitions field enter the tag and the prompt separated by a pipe. For example "face|The image contains a face", or "cat|Does the image contain a cat?".
This block uses the Cloudinary AI Vision add-on. Make sure you're registered to this add-on in order to use this block.
Learn more about this mode of the add-on.
Note that this block doesn't add the tags to the image. To add the tags, connect an Apply On Each block, then an Update Tags block.
- Set the Input List field in Apply On Each to
{{$.AI_Vision_Tag_By_Prompts.result.tags}}
. - Set the Tag field in Update Tags to
{{$.Apply_On_Each.result.item.name}}
.
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 in order to use this block.
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 in order to use this block.
Cloudinary Image Captioning
Use this block to automatically generate a descriptive caption for an image file in Cloudinary.
This block uses the Cloudinary AI Content Analysis add-on. Make sure you're registered to this add-on in order to use 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 in order to use 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 in order to use 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
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.
Akeneo
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.
Get Product Information From Akeneo
Use this block to get information about a specific product from Akeneo's Asset Manager.
This block can be used only with Akeneo versions that support the Akeneo Asset Manager.
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 can be copied from the Akeneo Connections page.
Dolby io
Use this block to improve the quality of your media with the Dolby.io Media Enhance API.
Fill in the required fields with your API key, API secret (available on the Dolby.io Applications Dashboard), and specify the URL locations of the Input and Output files.
You also have the option to specify a category for the type of Content in the input file, which helps determine the processing settings most suitable for improving the quality.
Mailchimp
Delete An Asset From Mailchimp
Use this block to delete an asset from Mailchimp's File Manager.
Upload An Asset To Mailchimp
Use this block to upload an asset to Mailchimp's File Manager.
Marketo Create A File
Use this block to create a file on Marketo.
Fill in the fields including your Base API URL, Client ID, Client Secret, File URL, Name, and Folder.
Monday Change Column Value
Use this block to change a column value on a Monday board.
OpenAI Analyze Image by Prompt
Analyzes an image using OpenAI and answers a prompt question about it.
Fill in the fields including your OpenAPI API Key, Image URL, and question.
Shopify
Shopify Get Variant by
Use this block to get a Shopify product variant by a Given Identifier.
Update Metafield (Shopify)
Use this block to update a metafield value of a product in Shopify.
Upload Image (Shopify)
Use this block to add an image to a product in Shopify.
You also have the options to specify the Image Position (set to 1 for the main image) and Alt text for the image.
Update Variant (Shopify)
Use this block to create or update a Shopify product variant. To create a new variant, leave the Variant ID empty.
Fill in the values for each variant option (e.g., if the first option of the variant is Size, set the value to Small, Medium, or Large).
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 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.
Send Slack Notification
Use this block to send messages to Slack using the Slack API.
Blocks can be made using the interactive Block Kit Builder.
Transformations
Apply Background
Use this block to add a background to transparent regions of a Cloudinary image. This block sets the background to either a specified color or an image using the Transformation API.
Crop Media
Use this block to crop a Cloudinary asset and set the region to focus on (gravity). This block crops using the Transformation API.
Drop Shadow
Use this block to add a shadow to the object(s) in a Cloudinary image. This block applies the dropshadow effect using the Transformation API.
Edit Media
Use this block to apply a custom transformation to a Cloudinary asset using the Transformation API. The transformation parameters can be given as either a comma-separated string or in JSON format.
Enhance Image
Use this block to automatically improve the colors, contrast and brightness of a Cloudinary image. This block applies an improve effect using the Transformation API.
Generative Extend
Use this block to extend an image's dimensions, filling in the extra areas with AI generated realistic pixels. The original image, specified by the public ID, is overwritten with the new image. This block applies a generative fill transformation using the Transformation API.
Generative Recolor
Use this block to recolor a specified region of a Cloudinary image while maintaining the relative shading. This block applies a gen_recolor effect using the Transformation API.
Image Overlay
Use this block to add an image overlay to a Cloudinary asset. This block applies an image layer using the Transformation API.
Optimize Media
Use this block to optimize the format and quality of a Cloudinary asset. This block sets the format and quality using the Transformation API.
Resize Media
Use this block to resize a Cloudinary asset. This block resizes using the Transformation API.
Text Overlay
Use this block to add a text overlay to a Cloudinary asset. This block applies adds a text layer using the Transformation API.