Custom Notification through Cloudhub Connector
MuleSoft provide Cloudhub connector to connect with Anypoint Platform from MuleSoft application. Using this we can also send custom notification through Cloudhub connector. So think if you have to send an email notification to group of users, where notification can be just FYI info or Warning or Actual error within the API on which you want the user to work on.
Let’s see how we can achieve the same in MuleSoft
Create Custom Alert in Anypoint
https://anypoint.mulesoft.com/cloudhub/#/console/home/alerts/

Provide the details
- Name of the Alert
- Severity level – Critical, Info and Warning
- Source – Application or Server level
- Application type – Cloudhub Application
- Applications – Application for which we want to generate the notification
- Condition – Custom Application Notification
- Priority – Any, Info, Warn and Error
- Subject and Message – disabled for us
- Recipients – Email id of recipient whom we want to send email

Alert will look like below

Let’s configure the connector in Mule application
Create a listener

Add the Cloudhub connector create notification activity – please see how we can add the module

Click on adding Connector configuration
- Username – Anypoint platform username
- Password – Anypoint platform password
- Environment id – this is the environment where the alert is created
We get the environment details from Anypoint platform; if name doesn’t work then change it with environment id.

Test the connection

Add the domain – it’s an application name in the environment
Set the message and priority

Run the application and test the endpoint – http://localhost:8081/cloudhub

Now we can see the notification in our email box

Sample application: cloudhub-services
Hi,
How can we read custom properties set in Create Notification in cloudhub alert?
Thanks
Raj
Hi,
How can we read custom properties set in Create Notification in cloudhub alert?
Thanks
Raj
After the MFA was required for the users, the basic authentication mechanism does not work anymore. A Connected App must be setup in order to auth and create custom notifications from the app.
Hi,
if possible can we add this for multiple applications as well how can we define here which application is getting critical