Skip to main content
Version: 7 - Gugelhupf

Notifications

Notifications will send emails to Cloudomation users when executions succeed or abort.

Use Cases

Use notifications to

  • Inform Cloudomation users about failing executions.
  • Inform Cloudomation users about finished executions.

Concept

The notification feature is implemented as a Wrapper.

Importing the Wrapper bundle will provide you with a wrapper called notify.

When the notify wrapper is attached to a flow, it will monitor the execution status of the flow and send a notification on success and/or on error to a list of configured Cloudomation users.

As all wrappers, the notify wrapper can be statically attached and configured. Please refer to Static Wrappers for more information.

Alternatively, the notify wrapper can be dynamically attached and configured. Please refer to Dynamic Wrappers for more information.

note

The most common usage is to statically attach and configure the notify wrapper to a flow or connector. This way all executions of the flow or connector will notify about an error.

note

The notify wrapper provided by Cloudomation is considered an example which can be extended or modified to your needs.

Parameters

The notify wrapper accepts the following parameters:

NameTypeDescriptionRequiredDefault value
notify_on_successbooleanIf to send a notification when the child succeeds.noFalse
notify_on_errorbooleanIf to send a notification when the child fails.noTrue
tolist[str]A list of Cloudomation user names which will be notified.yes
subjectstrThe subject line of the notification. Supports several replacement placeholders.no{child_name} {child_status}
bodystrThe body of the notification. Supports several replacement placeholders.no<p>Execution <a href="{self_url}/execution/{child_id}">{child_name}</a> ended with status <strong>{child_status}</strong></p><pre>{child_message}</pre>

Replacement Placeholders

NameDescription
child_nameThe name of the child execution
child_idThe ID of the child execution
child_statusThe end status of the child execution
child_messageThe status message of the child execution
self_urlThe URL to the workspace

Examples

example

Starting a flow which has the notify wrapper statically attached

import flow_api

def handler(system: flow_api.System, this: flow_api.Execution):
# we start the flow normally.
# the definition of the flow has the wrapper and its configuration statically attached.
this.flow('<name-of-a-flow>')
return this.success('all done')

Please refer to Wrapper for more information about wrappers and how to statically attach them to resources.

example

Starting a flow which has the notify wrapper dynamically attached

import flow_api

def handler(system: flow_api.System, this: flow_api.Execution):
# we start the flow with the notify wrapper dynamically attached and specify the configuration here.
this.using(
'notify',
to=['user1'],
).flow('<name-of-a-flow>')
return this.success('all done')

Learn More

Wrappers
Wrapper bundle
Email Integration
Import / Export and Upload