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.

When workflow fails, send an email notification of workflow error messages

WayneWooldridge
Alteryx Alumni (Retired)
Created

Interested in getting an email notification whenever a workflow is executed and fails? This is particulary handy if you have created a workflow, published it to a gallery (Alteryx cloud solution) and you've enabled other users with the ability to run your workflow from the gallery so you have the option of following up to offer assitance. What follows are step-by-step instructions for setting up an email event in your workflow.

Click anywhere on the canvas, away from your workflow so you see the Workflow Configuration window.

Error Email 1.png

Click on the ‘Events’ tab. Make sure ‘Enable Events’ is checked.

Error Email 2.png

Click on the ‘Add’ dropdown and select ‘Send Email’.

Error Email 3.png

A new widow, ‘Edit Event’, will open. On the ‘Run Event When:’ drop down, select ‘After Run With Errors’. Notice other options are available as well - 'Before Run' and 'After Run', for example. Add your email address to the ‘From:” and “To:” Lines. The email will be automatically pull in information regarding your workflow errors in the Subject and Body of the email.

Error Email 4.png

Even if you save this workflow to the Gallery (public or private), the settings will be retained. In other words, if this workflow is executed from the Gallery - even if another user executes it - whoever your specificed as the email recepient will continue to get an email. Notice you are not just limited to getting emails if a workflow has errors. You can set it up so you get an email before run, after run, or when a workflow run without errors. You can also include an attachment to the email so if your workflow produces an output, you can attached that output file to the email.

Comments
cbridges
11 - Bolide

This rocks!!

hflinn
6 - Meteoroid

Is it possible to configure the "To" address for a workflow email event using a textbox entry from the user? I've tried passing my texbox named EmailAddress with the %Question.EmailAddress% reference in the "To:" field, but doesn't seem to work.

 

Alternately, I've tried using the email tool to send an email to the address the user specifies, but I'd like to send the workflow Output Log and haven't figured out how to do that outside of the workflow events feature.

 

Any ideas?

oliver_huber
7 - Meteor
Hi, great piece of information! One question though: The setting "autodetect SMTP" should use the SMTP server as defined in the Gallery settings, correct? This does not seem to work for me; getting "not authorized error" as the answer from the server using SSL (I have verified the correct SMTP using SSL connection using the Gallery settings test for this, all fine). Any hint? Thanks, Oli
aMac
8 - Asteroid

Thanks for posting this! Is there a way to trigger a JSON payload from the gallery to a desired endpoint if this workflow is being run via gallery?

McClelland
6 - Meteoroid

I have had great success with this when running a *yxmd file; however, when running packaged workflow in Scheduler (*yxzp file) the e-mails don't appear to be sending.  Do you know if something different needs to be done to enable this event in a packaged workflow?

kirkpoucher
6 - Meteoroid

I've been able to run this in designer with no problems, but can't seem to get it to work from the Gallery.  I think the issue is related to the fact that we are using Amazon SES webmail (server is running in AWS) and we can't authenticate via the event email.  Anybody run into this?

brucks
7 - Meteor

Is there a list of all of the variables names that can be used in the "Body" section?  I'd like to customize that information if at all possible so it would help if there were a listing of all the available variables and the contents of those variables when accessed.

ashishkhurana
7 - Meteor

Thanks for this post! This is really amazing

DavidBaker84
6 - Meteoroid

Hi

Does anyone know of a way to dynamically choose who this email goes to.

We want to ask the user to provide their email address, so that if the workflow fails, we can send them a troubleshooting guide.

 

Thanks

David

kvn
5 - Atom

Hello,

 

I have tried setting up the event to send email after run and after run with errors. But I do not get any errors after the workflow has completed successfully or if there has been an error.

 

I am unable to figure out why emails are not being sent. How can we investigate the issue?

 

FYI, I am specifying the value for my organization's SMTP server.

jeneir
8 - Asteroid

In the body text, can you display just the errors in the log? Like %Errors% ? (not working)

Is there a list of % fields somewhere of valid codes?

Husama
5 - Atom

is there a way to get IP address in email notification of computer/gallery from which the workflow was run?

kcollado
7 - Meteor

I've tried send email after run with errors. I've purposely made an error in the workflow to check, but the event doesn't work for me. It says "Couldn't find host name". Does anyone has an idea on this please?