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 Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Event Email did not fire but other after events did

Susoeffl
7 - Meteor

I have one bat file after event and 4 email after events.The bat file and 3 email events worked, one email did not get sent (The first one). There were no errors

 

I did not edit that event, then disabled all other events, restarted the flow and that email sent.  

 

TLDR Below are details of what I am trying to achieve if that is helpful:  

 

The problem I am trying to solve, is that a report must get sent as a PDF to some important end users.  I write out the report as a static PDF name. so I can attach it to an email event.  I have not found a way to attach final output as a PDF to the email tool.  If there is knowledge would be much appreciated. 

 

Once i write it out.  I use and event to copy it to an archive where it is named dynamically in the bat file with the date.

 

I then send the emails.  I have 4 because the "to" field was not long enough to hold all the important end users.  so I send off an after event email with the PDF attached to all people.

 

if there is a way to do this differently I am open to that too. 

 

I don't know how to ensure this won't happen in the future. 

 

Also open to a way to notify me it does so I can correct it once its on a schedule

10 REPLIES 10
MichalM
Alteryx
Alteryx

@Susoeffl 

 

If you specify an attachment file in the Email tool, it will wait for the attachment to be created before it's sent out. Not specifying the full path in this case means that the attachment will be saved in the location of the workflow file.

 

attach.pngattach1.png

 

In order to send the same email to multiple addresses, you can feed these into the Email tool one per row and it will work as a batch macro - an email will be sent to each email address in your data set. 

 

send-to.png

 

Example attached.

Susoeffl
7 - Meteor

Thank you MichalM.  That sounds much better!   When I do this it doesn't seem to wait until the PDF is written.  I get the email, but the PDF attached is blank.  Is there a specific thing that makes it wait?  When I try to open the attachment I get that there is an error reading the stream

 

Susoeffl_0-1576003833773.png

 

 

MichalM
Alteryx
Alteryx

Could you attach your workflow please? 

Susoeffl
7 - Meteor

I'm new to my field and we deal with a lot of private data. The flow is most likely alright, but I would have to run that by others since i'm so new.  I'm talented at building broken ones it seems (lol), so I might be able to build a dummy one. If i get it to work, I may have solved my problem if it breaks i will load it up. In the mean time one difference i noticed is you are using the layout tool, and I am using the visual layout tool.  would that make a difference?

Susoeffl
7 - Meteor

I have made a dummy workflow that i have attached.  With this one, I don't get an error. Instead I just get a blank page. I put in Dummy Emails and Dummy SMTP, but everything else is as I ran it.  

MichalM
Alteryx
Alteryx

@Susoeffl 

 

I've just tested with your workflow and everything works as expected. I even added one of the CReW macros (Wait a second) to force a 15s delay on the Render step and the email tool still waits for the attachment. 

 

 

Are there any warnings/errors when you run the workflow?

 

  

Susoeffl
7 - Meteor

I do get two warnings: 

 

Susoeffl_0-1576018311890.png

Did you receive these as well?

MichalM
Alteryx
Alteryx

Just added a video of the run. I only get one of those warnings but that shouldn't affect the actual behaviour.

Susoeffl
7 - Meteor

I did a bit more digging, and i can't believe i didn't try this earlier.  I tried to attach an existing PDF with the email tool and it still sent a weird not full PDF.  so I'm still not sure what is going on.  But it seems the issue is between the email tool and the attachment of the PDF. 

 

Did more digging.  this is the result of  known Defect: "DE22485 - workflow runs and sends out the email message with the attachment, but the attachment is corrupted".  

 

The work around is to make the body of the email a field instead of text written in.

Labels