DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Mule CloudHub Connector: Part 1
  • MuleSoft Integration With RabbitMQ
  • How to Use Mulesoft VM Connector
  • A Spring Boot App With Half the Startup Time

Trending

  • I Built a VS Code Extension to Debug Azure AI Foundry Agents Without Leaving My Editor
  • Building AI-Powered Java Applications With Jakarta EE and LangChain4j
  • Implementing the Planning Pattern With Java Enterprise and LangChain4j
  • Data Pipeline Observability: Why Your AI Model Fails in Production

Email Notification Using Anypoint Runtime Alerts and Cloudhub Connector

This article demonstrates how to create an email notification using the Cloudhub connector create-notification operation and Anypoint Runtime Alerts.

By 
Vikalp Bhalia user avatar
Vikalp Bhalia
·
Jul. 27, 20 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
10.3K Views

Join the DZone community and get the full member experience.

Join For Free

Email notification is the most common non-functional requirement in the integration projects and MuleSoft has an inbuilt capability to achieve this and no need to go for the SMTP server.

Below are the steps to create an email notification.

Create Notification

We can create a custom notification from any application using the Cloudhub connector's create-notification operation. Refer to the MuleSoft documentation for the Cloudhub connector configuration and operation details.
https://docs.mulesoft.com/cloudhub-connector/1.0/ 

The message field will contain the notification message and you can define the priority depending on the message.

Notification message

Once the notification is created, it will be visible on the runtime manager - click on the bell icon in the right corner.Runtime manager

Create Alerts

We can create alerts from the Alert tab present in the Runtime Manager.

Create alert

Click on the + sign present on the right corner to create an alert. You will see below window.

Create an alert

Select the condition as a "Custom application notification."

Refer the Alerts documentation on the MuleSoft documentation to create an alert depending on the business requirement.

You can create a generic alert for all applications or create separate alerts based on a logical grouping or any other criteria.

After completing the above 2 steps, you will start receiving an email whenever a notification is created for the configured application in the alert.

Notification

Looking at the email you may want to remove the header "Anypoint Platform Alert Notification" from the email.

To remove the header, you need to send HTML content in the message field of the create notification operation in step 1.

Heading

You can create an HTML template and use a parse-template to populate all the fields and pass it in the message field of the create notification operation. Refer parse template documentation:

https://docs.mulesoft.com/mule-runtime/4.3/parse-template-reference 

Limitations

  • Custom application notification is available only for the cloudhub applications.
  • Rate limiting on the Cloudhub APIs. Refer the documentation:
    https://docs.mulesoft.com/runtime-manager/alerts-on-runtime-manager#rate-limits-on-alerts 
Connector (mathematics) application

Opinions expressed by DZone contributors are their own.

Related

  • Mule CloudHub Connector: Part 1
  • MuleSoft Integration With RabbitMQ
  • How to Use Mulesoft VM Connector
  • A Spring Boot App With Half the Startup Time

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook