domino logo
4.5
  • Tech Ecosystem
  • Get Started
  • Domino Cloud
  • Collaborate
  • Projects
  • Work with Data
  • Workspaces
  • Environments
  • Executions
  • Deploy Models and Apps
  • Organizations
  • Security and Credentials
  • Notifications
  • Search
  • Domino CLI
  • Troubleshooting
  • Get Help
domino logo
About Domino
Domino Data LabKnowledge BaseData Science BlogTraining
User Guide
>
Executions
>
Execution Notifications
>
Set Custom Execution Notifications

Set Custom Execution Notifications

You can create a custom email to be sent after a successful execution.

Format a success email

For Domino File System (DFS) projects, create a file named email.html in the root of your project folder as part of your run.

For Git-based projects, create a file named email.html in the `/mnt/artifacts/` directory as part of your run.

The HTML in email.html can be used as the body and subject of the email sent on success.

Tips and tricks:
  • To include images, reference the path to the image from the root of the folder. The image can be anywhere in your project. For example, to include an image in plots/plot1.png, write <img src="plots/plot1.png">.

  • Put all CSS styles in inline style attributes. Most email clients ignore <style> blocks in HTML emails.

  • Use tables for complex layouts. Most email clients ignore CSS positioning.

  • Include the <head> and <title> tags at the start of the HTML file to customize the subject. For example: <head><title>Custom Subject</title></head> creates an email with the subject "[Domino] Custom Subject".

  • To explicitly define the files that are sent with your success email, create a file named .dominoresults and write a filename per line in the .dominoresults file.

    Caution
  • For Git-based projects, write job results to the /mnt/artifacts/results/ directory. This allows the files to be included as attachments to the email and appear as results in the Job UI. See Save Artifacts to the Domino File System for more info.

Example of an R script and the resulting email:
# generate and save plot png("pressure.png") plot(pressure) dev.off() # generate HTML in a string html_string <- paste0(" <head> <title>",Sys.Date()," - Pressure report","</title> </head> <body> <h2>Exponential pressure growth! </h2> <h3>",Sys.time(),"</h3> <img src='pressure.png' /> <p>Caption goes here</p> </body> ") # write string to file write(html_string, "email.html")
# generate and save plot
png("pressure.png")
plot(pressure)
dev.off()

# generate HTML in a string
html_string <- paste0("
<head>
  <title>",Sys.Date()," - Pressure report","</title>
</head>
<body>
  <h2>Exponential pressure growth! </h2>
  <h3>",Sys.time(),"</h3>
  <img src='pressure.png' />
  <p>Caption goes here</p>
</body>
")

# write string to file
write(html_string, "email.html")

notification result email

Domino Data LabKnowledge BaseData Science BlogTraining
Copyright © 2022 Domino Data Lab. All rights reserved.