Mail Notification

In the Adeptia Connect, Notification is used to send mail to users about the execution status of a process flow. You can add the Mail Notification activity anywhere in the process flow. You can add more than one Mail Notification activities in a process flow.

The Mail Notification activity is of two types:

  • User Defined Message: This type of mail notification is used to send custom email message to any user during execution of a process flow. Any file can be attached to the mail.

  • Process Flow Summary: This type of mail notification is used by the Connect Server to dynamically send summary of a process flow execution.

Creating Notification to Send User Defined Message

Prerequisites

Steps to create User Defined Message Notification

  1. Click Configure > OTHERS > Mail Notification.

  2. Click Create Mail Notification.



  3. Enter the name and description for Context Upload in the in the Name and Description fields.
  4. Select User Defined Message from the Notification Type field.
  5. Enter subject for the email message in the textbox Mail Subject.
  6. Select the user(s) to whom you want to send the notification email from the textbox To User(s).
  7. Enter the recipient(s) email address in the textbox To Email Id(s) (comma separated).

    You can select the recipient of the notification mail either by selecting user from To User(s) or by specifying email address in To Email Id(s) (comma separated) field.
    When you select user, the notification mail is sent to the email address specified while creating the user.

  8. Enter the email message in the textbox Message.

    You can format your messages and also send images (Web URL) and links with it by using HTML tags in Message textbox. Formats that are supported by html work here as well.
    For e.g., following are the code snippet to add image and link into mail notification message:

    For image:

    <html>
    <body>
    <h1>heading</h1>
    <img src="http://blog.newrelic.com/wp-content/uploads/java-logo.jpg" alt="some_text" width=200 height=200>
    </body>
    </html>


    For Link:

    <html>
    <body>
    <h1>heading</h1>
    <a href="https://www.google.co.in">Visit our Site</a>
    </body>
    </html>|

  9. Select the type of authentication from the Authentication Type field. The available options are Basic and OAuth 2.0.
  10. Select one of the available OAuth accounts from the OAuth Account field. It is available only when you select OAuth 2.0 as an authentication type.
  11. Select the Attachment check box to send the file(s) as attachment.
  12. Enter the file path and file name(s) in the textboxes File Path and File Name respectively.

    To send multiple files as attachment, separate the name of files with commas in the File Name field. All these files must be placed in the same specified folder.
  13. Expand the Advanced Properties section and select the Project from Project drop-down list.

  14. Click Save.

Creating Notification to Send Process Flow Summary

Steps to create Process Flow Summary Notification

  1. Click Configure > OTHERS>Mail Notification.

  2. Click Create Mail Notification.



  3. Enter the name and description for Context Upload in the in the Name and Description fields.
  4. Select Process Flow Summary from the Notification Type drop-down list.
  5. Enter subject for the email message in the textbox Mail Subject.
  6. Select the user(s) to whom you want to send the notification email from the textbox To User(s).
  7. Enter the recipient(s) email address in the textbox To Email Id(s) (comma separated).

    You can select the recipient of the notification mail either by selecting user from To User(s) or by specifying email address in To Email Id(s) (comma separated) field.
    When you select user, the notification mail is sent to the email address specified while creating the user.

  8. Select one of the criteria from the Notification Criteria field. All criteria are explained in the below table.

    Notification Criteria

    Description

    Running or Executed Successfully

    Email is sent only when the process flow is running or executed successfully.

    Failure

    Email is sent only when the process flow execution is failed. However, if any activity before the mail notification fails, then all activities (including Mail Notification activity) are skipped and no email is sent. Thus, it is recommended to use the Mail Notification activity with the End Event of process flow.

    Always

    Email is sent whether the process flow execution is successful or failed. However, if any activity before the mail notification fails, then all activities (including Mail Notification activity) are skipped and no email is sent. Thus, it is recommended to use the Mail Notification activity with the End Event of process flow.

  9. Select the type of authentication from the Authentication Type field. The available options are Basic and OAuth 2.0.
  10. Select one of the available OAuth accounts from the OAuth Account field. It is available only when you select OAuth 2.0 as an authentication type.

    OAuth Account field displays only those OAuth Accounts for which you have selected Use In Mail Activity check box while creating the account. Click here to know how to create an OAuth Account.
  11. Expand the Advanced Properties section and select the Project from Project drop-down list.

  12. Click Save.

Adding custom email headers in a Mail Notification activity

You can add custom email headers to a Mail Notification activity. While creating a Mail Notification activity, you’ll be able to see the Custom Email Headers section wherein you can add the email headers based on your choice.

Follow the steps below to define custom headers in a Mail Notification activity.

To know what types of custom headers can be defined in these activities, refer to this page.
  1. In the Custom Email Headers section,

    • In the Header Name field, enter the name of the header.
    • In the Header Value field, enter the value for the corresponding header.
    By clicking Add Row you get more rows to add custom email headers and their values.
  2. Complete the fields that follow, and then click Save.