Send Notification using Chain If Else step in ETL

This entry will show you how to send an email notification using the Chain If Else step whenever there is an issue running the external command in your chainset.


Attached contains batch files and the ETL chainset used for this guideline. It is advisable to configure the email account in application.conf first prior doing this guideline.

1/ Add the batch files to your working directory and revise the application.conf e.g below my working directory is at “C:/app/external command”. Then create a text file called TextDocument.txt in the same directory. Edit the path in each of the .bat files provided.

ambience.etl {
  external {
    run-command {
      commands {
        # full path required in some cases
        # phantomjs:"/usr/local/bin/phantomjs-2.1.1-macosx/bin/phantomjs"
		housekeeping:"C:/app/external command/removefile.bat"
		echoSuccess:"C:/app/external command/echoSuccess.bat"

2/ Run command executes the housekeeping batch file:

3/ Array Length derives the value from errors field. [0=No Errors, >1=Have Error(s)]:

4/ Equal Value derives a boolean from length, 0 = True, greater or equals 1 = False

5/ Chain If Else executes either chain #02 or #03 based on the result value

6/ The message in row 2 under the output field depends on either chain #2 or #3

Chain #2 If the External Command is successful

Chain #3 If the External Command is not successful it will send a alert / notification to your email.

7/ You may revise the message and the subject in the email notification inside the chain #3 (1.2 KB)