Cloudinary Trigger
Cloudinary is a robust image and video management tool that covers uploading, storage, optimization, and delivery.
Using the Cloudinary trigger, you can effortlessly automate workflows and streamline asset management by automatically responding to file changes within your Contentstack environment.
Prerequisites
Start with adding your Cloudinary account by following the steps given below:
Connect your Cloudinary Account
- Navigate to your project and click Automations in the top navigation panel.
- Click + New Automation and from the dropdown options, click Create New. Enter a Name and an optional Description. Click Create.
- Click Configure Trigger from the left navigation panel.
- Within the Configure Trigger, click the Cloudinary connector.Click to enlarge
- Under Choose Trigger tab, select the Asset Trigger.Click to enlarge
- On the Configure Trigger page, click the + Add New Account to add your Cloudinary account.Click to enlarge
- In the Authorize pop-up window, provide details such as Cloud Name, API Key, and API Secret.
To generate Cloud Name, API Key, and API Secret, log in to the Cloudinary dashboard and perform the following steps:
- Click the Dashboard tab in the left navigation.Click to enlarge
- Under the “Product Environment” section, you will see the Cloud Name. Click Go to API Keys, and click the + Generate New API Key button to create a new API key.
You will see the API Secret. Click the Eye icon and provide the login password. Click Approve to view the API Secret.
For more information, refer to the Admin API reference document.
Click to enlarge
- Click the Dashboard tab in the left navigation.
- Once done, click Authorize.Click to enlarge
Set up the Cloudinary Trigger
Perform the following steps to set up the Cloudinary Trigger:
- From the left navigation panel, click Configure Trigger.
- Within the Configure Trigger, click the Cloudinary connector.Click to enlarge
- Under the Choose Trigger section, select Asset Trigger.
Note After successfully configuring a trigger, if you re-configure any other trigger you will be prompted to revert to the previously configured trigger. You can revert back to the last trigger configurations by clicking the Revert Changes button.
Let’s look at it in detail.
Asset Trigger
The Asset Trigger event lets you trigger an automation when you perform asset related activities in your Cloudinary account.
Let’s look at the steps to set up the trigger event.
- Under the Choose Trigger tab, select Asset Trigger.
- On the Asset Trigger Configure Trigger page, enter the details given below:
- Click + Add New Account button to connect your Contentstack account as shown in the Connect your Cloudinary Account step.
- Select the trigger event from the drop-down, i.e., Asset Uploaded.
For Asset Trigger, you will find the following events:
- Asset uploaded: Triggered when a new asset is added.
- Asset renamed (public ID changed): Triggered when an existing file’s identifier is changed.
- Asset deleted: Triggered when an asset is removed.
- Tags modified: Triggered when the labels/tags of an asset are updated.
- Context modified: Triggered when the contextual information of an asset is changed.
- Metadata modified: Triggered when the descriptive metadata of an asset is edited.
- Display name changed: Triggered when the visible name of an asset is updated without altering the actual file.
- Folder created: Triggered when a new folder is created.
- Asset moved between folders: Triggered when an asset is transferred from one folder to another.
- Asset folder moved/renamed: Triggered when a folder’s path changes due to renaming or relocation, affecting all included files.
- Folder deleted: Triggered when a folder is removed.
- Access control changed: Triggered when the permissions or access settings of an asset are updated.
- All: Triggered when any of the above actions occur. Click to enlarge
- Click Proceed.
- Click Test Trigger to execute and test the trigger that you configured.
- If successful, you will see an output as follows. If it looks appropriate, click Save and Exit.Click to enlarge
This sets the Cloudinary trigger.