- This line was added.
- This line was removed.
- Formatting was changed.
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 on success or failure of an operation or upon on 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 the project pane, the operation settings, or a script. After creating an email notification or opening an existing email notification to edit, see Configuring an Email Notification later on this page for configuration.
From the project pane in the Components tab, to create a new email notification, hover over the category Emails and click the actions menu icon to open the actions menu. From the menu, select Create newNew:
To edit an existing email notification, hover over the email notification name, then click the actions menu icon to open the actions menu. From the menu, select View/Edit. This and other actions in this menu are covered under Email Notifications Actions Menu later on this page.
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. Select the Condition and for the Action select " Send Email Notification. " To create a new email notification, click the link to Create New Email Notification to open the email notification configuration screen:
To edit an existing email notification, make sure you have Send Email Notification selected as the Action. Then in the Email Notification dropdown, hover over the existing notification and click the edit icon to open the email notification configuration screen.
You may want to use a script that can be configured on the operation to include advanced logic for when to send the email notification. 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:
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:
- View/Edit: This opens Opens the email notification configuration screen for you to configure the notification. For details, see Configuring an Email Notification later on this page.
- Delete: This is used to permanently delete Permanently deletes the email notification (see Component Dependencies, Deletion, and Removal).
- Rename: This positions Positions the cursor on the component name in the project pane for you to make any edits as necessary.
- View Dependencies: This changes Changes the view in the project pane to display any other parts of the project that the email notification is dependent on (see Component Dependencies, Deletion, and Removal).
- Deploy: This deploys Deploys the email notification and any components it is dependent on (see Component Deployment).
- Configurable Deploy: This opens Opens the deployment screen, where you can select project components to deploy (see Component Deployment).
- Add to Group: This opens Opens a prompt to create a new custom group or to add the component to an existing group. Custom groups are an organizational tool to help organize a project (see Component Groups).
- Duplicate: This creates Creates a copy of the email notification as a new, unreferenced component. Upon After creating the component copy, the cursor is positioned on the component name within the project pane for you to rename the component.
This section covers configuration of an email notification. After this is done, you can configure an email to be sent upon on 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 openscreen opens:
TIP: Fields with a variable icon support using global variables, project variables, and Jitterbit variables. Begin typing an open square bracket
- Email Notification 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 Email Server(s): 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 are tried in the order that they are specified until one is found to accept the message.
To Email Address(es): Enter at least one email address to receive the email. If entering multiple recipients, use a comma to separate each one.
Tip TIP: If you don't know who the recipient(s) will be are 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 Email Address: 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 Email Address(es): 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 Email Address(es): 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 Email Address: 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 On 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 variables, project variables, or Jitterbit variables in the Message, enter them manually or begin by typing an open square bracket
[into the field to display a list of existing variables to choose from.
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")
TIP: You can use HTML in the Message. Variables can be used inside HTML tags using square brackets, as demonstrated with the variable
Code Block language xml
<html> <head> <title>Page Title</title> </head> <body> <h1>This Is a Heading</h1> <p>This is a paragraph.</p> <p><a href="https://www.example.com/html/message/">Visit our HTML tutorial.</a></p> <p>Send me an email at [email_address].</p> </body> </html>
- 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 click to close the configuration without saving changes. A message will ask asks 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 on 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.
Open the operation settings for an existing operation and select the Actions tab. Then configure the operation action as follows:
- In the first dropdown, select the appropriate condition of the operation that should trigger the action (On Success or On Fail).
- In the second dropdown, select Send Email.
- In the third dropdown, select the configured email notification.
- 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:
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 to display a list of autocomplete suggestions. Select a notification to insert the notification reference into the script.
|NOTE: At this time, there is no visual representation of the link on the design canvas.|