By default, on success or failure of a Civis job (import, export, script, or enhancement) or workflow Civis will send an email notification to the job’s owner. If a service fails, Civis will send an email notification to the service author. However, services have no success emails, because a successful service is always running. These emails are useful in monitoring the status of jobs, so users don't have to continually check the progress of their job or workflow.
Default Settings
Platform offers users the ability to choose whether or not they want success and failure emails to be automatically enabled for all new jobs, workflows, and services. These defaults will not apply to pre-existing objects and they will not override settings applied at the individual object level.
Many users with numerous jobs running prefer to receive only failure notifications.
How to Update Default Notification Settings
- Open the initials menu and select Preferences
- Toggle Success and/or Failure Notifications on or off using the checkboxes.
- Note: This will only apply to new jobs going forward. Pre-existing jobs will be unaffected. Notification settings can still be customized at the individual job level as well.
- Click Done to save your changes.
Notification Customization
Individual object notifications can be configured using the API, or by navigating to the object’s detail page in the UI and clicking on the notifications icon (paper plane icon in the upper right of your object pane):
Success Notification Fields
- Email Recipients: free text field for email addresses.
- Email Subject: free text field for email subject. Defaults to “<Job State>: <Job Name>”, e.g. “Success: Data Import Part 1”.
- Email Body: markdown compatible field for body of the email.
- You can embed variables you’ve defined in your script in the email body. To leverage this feature, upload any values or tables you want to include in your email as a run output JSONValue named "email_outputs". Include {{variable}} in the Email Body text box, or {{md_table}} with line breaks before and after for a table.
- For SQL Scripts only: A link to the output of the script can be included in the email body via the text: `{{file_url}}`. This link is valid for 36 hours after the email is generated.
- You can embed variables you’ve defined in your script in the email body. To leverage this feature, upload any values or tables you want to include in your email as a run output JSONValue named "email_outputs". Include {{variable}} in the Email Body text box, or {{md_table}} with line breaks before and after for a table.
- Reply-To Address: customize the email address to direct replies, defaults to the author’s email address.
- From Name: change the name displayed in the from field of the success email. (API only.)
Failure Notification Fields
- Email Recipients: free text field for email addresses
- Stall Warning Minutes: Send alerts if job or workflow execution is running for longer than this many minutes. Alerts will be sent to the failure recipients above
Advanced fields
- URLs: URLs to receive a POST request at job completion.
- These URLs will receive a POST request regardless of whether the job completed successfully or not.
- The post request will receive a json object with the following keys: name, state, started_at, finished_at.
Turning Off Notifications for Existing Jobs & Workflows in Bulk
Civis provides a public script template that users can utilize to turn off both success and/or failure notifications for all their jobs. This script template can also be used to optionally turn off notifications for their workflows.
To utilize this script template, users will create a custom script from this script template.
Click here for details on how to create a custom script from a script template.
Comments
0 comments
Please sign in to leave a comment.