One of the basic features of the Sitecore Content Hub is the ability to set triggers and actions for entity changes. In this article, we will show you how to set up triggers and actions.
![](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F6PISzApOgTBitHOi71W3yJ%2Ff285b74470a438a834f28a2d54cbb661%2Fautotagaction.png&w=3840&q=75)
What is a Trigger?
The tool for setting Triggers can be accessed from the administration screen.
![triggerhome.gif](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F70eTOXqI0W6FRhBLpmoRt3%2F0c714d82bc7129bc2b4395557b8f621d%2Ftriggerhome.gif&w=3840&q=75)
In some cases, Triggers include standard settings by contract. In this screen, you can see that the triggers used by CMP are set.
Creating a new trigger screen is as follows. and then set the action associated with it.
![triggercreate-2.gif](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F1osy2QHsTW67j5qJmzVN5F%2Fd479de8a8c2e814491ff275e9047f4da%2Ftriggercreate-2.gif&w=3840&q=75)
What is Action?
An action is defined as a process that you want to execute. Actions can also be accessed from the administration screen.
![actionhome.gif](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F5xYajnj9ESkCwaTz4O5M79%2Fe78d5c96e515ed098f2f0059c3bbd79c%2Factionhome.gif&w=3840&q=75)
When creating a new action, the following dialog appears
![actioncreate.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F4o1PchBwHkCMioaBVYwMKN%2F32122ea7c7d0cfa47058a847ccb5eb90%2Factioncreate.png&w=3840&q=75)
The format in which the action can be executed is as follows
- API Call
- Azure Event Hub
- Azure Service Bus
- M Azure Service Bus
- Action Script
- Insights on Entity Generation Jobs
- Start of state machine
- Report Channel
One of the things we will be discussing frequently on this blog will be the integration with Azure Service Bus.
Triggers and Actions
The setup procedure is as follows. First, set the conditions in the trigger. Here we are creating a trigger when an automatic tag is generated for an asset.
![autotagtrigger.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F6XLmq4C1UJEBzbQp6W6kjo%2F5f4a7bb187a474ede1ca9cab67712bb7%2Fautotagtrigger.png&w=3840&q=75)
The action that this trigger is calling is defined as follows
![autotagaction.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F6PISzApOgTBitHOi71W3yJ%2Ff285b74470a438a834f28a2d54cbb661%2Fautotagaction.png&w=3840&q=75)
When a message is sent to the Azure Service Bus, a Logic App application is run to automatically change the English information set in the tag to Japanese using machine translation (how to make this will be introduced at a later date).
Summary
In this way, we have shown how a combination of triggers and actions can be used to perform automated processing in accordance with changes to entities in the Sitecore Content Hub. In the future, we will provide samples and other information using this mechanism.