Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

Email Events to notify on Start or Finish

AndrewL
Alteryx
Alteryx
Created

Question

Is it possible to have Alteryx notify me when a workflow kicks off/completes?

Answer

You bet!

You can set up a workflow event to send an email either before or after a workflow runs. If choosing after, there are multiple options to choose from depending on what you want.

To set up the Event:

Click anywhere on the blank workflow canvas to open the Workflow Configuration menu. From there, click over to the Events tab and make sure the "Enable Events" box is checked:

EventsTab.png

Click the Add button and select Send Email:

SelectEmail.png

When the next dialog box comes up, select when you want the Event to run:

WhenToRun.png

Before Run: sends email before beginning the run of the workflow. Can be helpful when the Scheduler queue is backed up and you want to know when the workflow starts

After Run: when the workflow completes regardless of success/failure

After Run With Errors: Only sends the email if the workflow fails due to an error

After Run Without error: Only sends email if the workflow completes without any errors.

Disabled: No emails will send until enabled

Finally, fill out the rest of the information. The most common issue with the remaining set up is the SMTP settings. It is often necessary to check with IT to ensure you have the correct information entered:

RemainingConfig.png

The subject and body sections are auto filled with commonly desired information including workflow name (Subject) and the output log (Body), You can add/edit the items included to suit your needs for each event.

Comments
ashkhan
7 - Meteor

This is great but where it doesnt work well is when there is an error and the wf failed to complete, no email is sent in that case which is not useful because i would want to know if my wf didnt run at all due to some issue. 

 

It would be great if an email is sent regardless of the completion of the wf.

jonriddle
8 - Asteroid

Is it possible to dynamically specify to whom the email is sent?  I have a long running app that others in my organization will be using and I would like to notify the person running the app when it completes so that he/she knows to retrieve the results rather than waiting for it to complete or checking back periodically.

andrewdatakim
12 - Quasar
12 - Quasar

Hi @jonriddle,

 

You can set a workflow up to where it will email when a job has completed, you will want to use the Email tool and you can combine this with a Block Until Done tool (connected to the output), which will notify the end user when the output has been created. If it is already designed as an app you will just use an action to substitute the email within the To: in the email or pipe it from a field.

 

 

brij
7 - Meteor

How can i create custom subject line like i want successful message along with WF name thats it?

jm_idm
7 - Meteor

1. Is there a list of the variables that can be included in the body of the email?  Are these the only ones? 

%AppName%

%Module%

%NumErrors%

%User%

%ComputerName%

%WorkingDir%

%NumErrors%

%NumConvErrors%

%Warnings%

%OutputLog%

 

2. Can you include more in the %OutputLog% than what is currently there?  I have found that there are tools that don't output to the log file.  For instance, sorts and selects.  I'm trying to find the time hogs in my processes and having the execution times for each tool would be useful.   

andrewdatakim
12 - Quasar
12 - Quasar

Hi @jm_idm,

 

I would recommend turning on the Performance Profiling. It will help you identify some of the aspects you are discussing. It is more costly in terms of processing but it is good to do on occasion for temporary insight.

 

Enabling Performance Profiling to track Selects and Sorts.Enabling Performance Profiling to track Selects and Sorts.

kwilkins
7 - Meteor

Hi @jm_idm - Did you ever get a response to your "variables" question above?

CesarAccardi
5 - Atom

Hi @andrewL,

I see the Email Tool now supports authentication in 2019.3, are there any plans to implement that on the workflow events aswell?

SeanAdams
17 - Castor
17 - Castor

Thank you for publishing this @AndrewL - it may be worth doing a small refresh on this now that events have addition options for login and encryption?

AndyEllis
7 - Meteor

Is there a way to pass the workflow name in a user friendly way? When i do so now it comes across as a File location.

The reason I ask : Many of our designers currently send email alerts when their workflows error, but many of our teams are switching to slack. I have set up a slack channel with an email address, and have set that email address as one of the recipients of an "email on error" workflow event. It works, and you can use the customization features in Slack to make it look pretty good, but the %Module% variable produces an absolute location, which is not very helpful for jobs run on the server. 

See attached image. I would love to be able to clean up the module

AndyEllis_1-1648768466894.png

 

SeanAdams
17 - Castor
17 - Castor

Hey @AndyEllis - we've not found a way to improve the variables available in the automated notifications, and there don't seem to be many ideas on this in the ideas board (you should definately submit your thoughts on this under ideas - many of the ideas that we've logged over the years have gone on to make it into the product).

 

What we do instead is to run a secondary process that looks at the underlying MongoDB and looks for workflow errors - we run this every hour or so - and then we have a lot more lattitude about how to construct this message  - for example we can look up additional details in our own data set like

  • Backup Developer
  • Business Owner
  • Control / risk officer
  • Workflow name & detailed description
  • Risk / urgency categorisation.

Based on this we can then send a far more customised message via multiple channels since we now control the messaging.

 

If you're interested to look into this - the Mongo Schema is here; AlteryxService MongoDB Schema | Alteryx Help and the Server Discussion group has a lot of lively conversations about how to do helpful tasks with the data in Mongo

 

 

manojmcpd
5 - Atom

Is there a way to check if %output% contain specific text or ToolID so that we can conditionally change the email body in Event.

Shiva_Reddy
5 - Atom

can we send an email when error occurs without using the events?