Skip to end of metadata
Go to start of metadata

Introduction

Notifications configured in Cloud Studio are triggered by an operation action or kicked off from a script. Email notifications can be used to automatically send an email upon success or failure of an operation or upon calling the script.

NOTE: If instead you are looking to configure an email notification that triggers when a Private Agent goes down or your Harmony password is about to expire, see Notifications (Management Console).

Creating or Editing an Email Notification

Email notifications can be created or edited from either the operation settings or from a script. Once an email notification is created, you can also access it from the project pane. After creating an email notification or opening an existing email notification to edit, see Configuring an Email Notification later on this page for configuration.

Operation Settings

Operation actions can be accessed from the operation settings that are accessible from the project pane in both the Workflows and Components tabs, and from the design canvas:

  • Project Pane: In the Workflows or Components tab of the project pane, hover over an operation name and click the actions menu icon  to open the actions menu. From the menu, select Settings to open the operation settings:

      

  • Design Canvas: In the top right of an operation, hover over the actions menu icon  to open the actions menu. From the menu, select Settings to open the operation settings:

Once the operation settings screen is open, select the Actions tab. To create a new email notification, click the link to Create New Email to open the email notification configuration screen:

To edit an existing email notification, make sure you have Send Email selected in the second dropdown. Then in the third dropdown, hover over the existing notification and click the edit icon  to open the email notification configuration screen.

Script

You may want to use a script instead of an email notification that can be configured on the operation to include advanced logic for when to send the email. For example, to check for a specific code or error state, you might use a script to provide more control over what happens when you have an error.

Within the script editor, open the Notifications tab of the script component palette:

To create a new email notification, click Add New:

If you already have an email notification you would like to edit, click the existing notification name, such as "Error Email," as shown here:

Accessing Menu Actions

After an email notification is created, menu actions for that notification are accessible from the project pane. In the Components tab of the project pane, hover over a notification name and click the actions menu icon  to open the actions menu:

Each of these menu actions is available:

Configuring an Email Notification

This section covers configuration of an email notification. After this is done, you can configure an email to be sent upon success or failure of an operation (see Operation Actions) or add the notification to a script (see Script Types and Creation).

When you create a new or edit an existing email notification, the email notification configuration screen will open:

TIP: Fields with a variable icon support using global variablesproject variables, and Jitterbit variables. Begin typing an open square bracket [ into the field or click the variable icon to display existing variables to choose from.

  • Name: Enter a name for the email notification. The name must be unique for each email notification and must not contain forward slashes (/) or colons (:).
  • SMTP Mail Servers (Comma-Separated List of Servers): Enter at least one SMTP server that you want to use to send the email. If entering multiple SMTP servers, use a comma to separate each one. The servers will be tried in the order that they are specified until one is found to accept the message.
  • To (Comma-Separated List of Email Addresses): Enter at least one email address to receive the email. If entering multiple recipients, use a comma to separate each one.

    TIP: If you don't know who the recipient(s) will be until after you have run an operation, you can define and use a global variable called, for example, [notify_email], that uses values returned by the function DBLookup() to look up the email address(es).
  • From: Enter the email address that you want the email to appear from when the recipient(s) read the email.
  • Optional Settings: Click to expand additional optional settings:

    • Use SSL/TLS: Select the checkbox to encrypt the email using SSL/TLS protocol.
    • CC (Comma-Separated List of Email Addresses): Enter one or more email addresses to receive a copy of the email. If entering multiple copied recipients, use a comma to separate each one.
    • BCC (Comma-Separated List of Email Addresses): Enter one or more email addresses to receive a blind copy of the email. If entering multiple blind-copied recipients, use a comma to separate each one.
    • Reply to: Enter the email address that you want replies to be sent to by default. This may be useful if you send the email from a common account but want replies to go to a personal email account.
    • Use Authentication: Select the checkbox if the SMTP server requires authentication. Upon selecting this option, the Account and Password fields below become enabled for you to enter your authentication credentials.
  • Subject and Message: Enter the subject and body to use for the email. To use global variablesproject variables, or Jitterbit variables within the Message, begin typing an open square bracket [ into the field to bring up a list of available variables.

    NOTE: Filename keywords such as [date] do not work in the Subject or Message fields if they are not first defined as global variables. To use date and time functions to populate a global variable, you can do so within a script. For example:

    // This sets the global variable equal to the current date and time
    $date = Now()
    // This sets the global variable equal to just the date
    $date = CVTDate(Now(),"yyyy-mm-dd HH:MM:SS","yyyy-mm-dd")
  • Test: Click this button to send a test email using the configuration. Sending a test email is recommended to ensure the configuration works properly and as expected. Note that if variables are used in the configuration, you may need to specify a default value to use for testing purposes (see Variables).
  • Save: Click this button to save and close the email notification configuration.
  • Discard Changes: After making changes, click Discard Changes to close the configuration without saving changes. A message will ask you to confirm that you want to discard changes.

Adding an Email Notification to an Operation or Script

Sending an email notification can be added to an operation as an action to take upon success or failure of the operation, or can be added to a script to run using advanced logic on when to send the email. This is configured either from the operation settings or from within a script.

Operation Settings

Open the operation settings for an existing operation and select the Actions tab. Then configure the operation action as follows:

  1. In the first dropdown, select the appropriate condition of the operation that should trigger the action (On Success or On Fail).
  2. In the second dropdown, select Send Email.
  3. In the third dropdown, select the configured email notification.
  4. Click Add Action to add the email notification to the operation.

For a more detailed explanation of options, see Operation Actions.

Linked email notifications are displayed directly on the design canvas connected to the operation they are associated with:

Script

Within the script editor, open the Notifications tab of the script component palette:

To add a notification and the function needed to execute it, drag the specific notification from the palette to the script to insert both the SendEmailMessage() function and the notification reference as a function argument.

To insert a notification reference by itself, either position the cursor after the opening parenthesis of the SendEmailMessage() function or begin typing the notification name, and then press Control+Space (or Command+Space on Mac) to bring up a list of autocomplete suggestions.

NOTE: At this time, there is no visual representation of the link on the design canvas.
On This Page

Last updated:  Aug 07, 2019

  • No labels