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
Newsletter
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
  • Idempotency Under Concurrency: Why Your Application Check Isn't the Last Line of Defense

Trending

  • A Non-Expiring AKS Deployment Token Could Read Secrets Across Three Namespaces
  • After the AI Commit: What Eight Retrospectives Taught Me About Working With Coding Agents
  • Why Spark Executors Leave Cores Idle on YARN: A Packing Model for Executor Sizing
  • Genkit Flows on Kubernetes, Routed by a Decision Model: senro + jev in Go

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

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
·
Jul. 27, 20 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
10.4K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

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
  • Idempotency Under Concurrency: Why Your Application Check Isn't the Last Line of Defense

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • 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