Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Alteryx is here to help you solve your biggest data challenges. Read about the new Virtual Solution Center here.
SOLVED

Automated Email Attachment (*.xlsx file) sends as corrupt file

8 - Asteroid

I have a workflow which generates an xlsx file.  The file opens without an issue locally.

 

I initially attempted to add a piece to the workflow where the file path for the attachment was passed along to the email tool, and the email sent out an email including this newly created file.  All seemed to work until I tried to open the file and it was corrupt.  I thought maybe it was a timing issue where it was trying to send the file while it was still being saved.  I used CrewMacros Parallel Block Until Done tool so that stream one generated the file and stream two emailed the file.  This did not work.  I then added a 10 second wait after the file was created to begin the output of stream two which is the email.  File still corrupted.

 

I then created a unique workflow and ran it after the other workflow was complete.  Still an issue.

 

Any idea what could cause file corruption on an emailed xlsx file when locally the file is fine?

Highlighted
8 - Asteroid

To test, I created a new workflow, only used the email tool, and manually enter all parameters.

 

File still sends as corrupt.

Highlighted

I am having the exact same problem. 

Highlighted
6 - Meteoroid

I am having the same problem.  Some workflows work just fine and others do not.  The files are stored in a network share and then the email tool sends them as an attachment.  The files in the network share are fine (readable), but the ones that are sent as an attachment are corrupted. 

 

If I open the one in the network share and the one from the email message in Notepad++, they both start off the same and end the same, but the body in the middle is different. 

 

This started with the 2019.3.5.17947 upgrade. 

Highlighted
Alteryx
Alteryx

Does the workflow save the file in a network share and then turn around and send that file as an attachment? 
If you open the file directly from the network share, does it opens fine? 

The Secure Network part may be the clue. Some networks attach code to files to attachments to either track the file or disrupt any malicious code. It's possible that these security measures could be causing the issues.

Highlighted
6 - Meteoroid

This is what the workflow looks like.  It has worked for over a year for many workflows.  After the upgrade to 2019.3.5.17947, some of them have the corrupted files.  If I open the files directly from the network share, it is fine.  If I change the output file from Excel to CSV, it works. 

Highlighted
Alteryx
Alteryx

You are running into a known Defect: "DE22485 - workflow runs and sends out the email message with the attachment, but the attachment is corrupted".  

 

This Defect is still Open and being reviewed by our development team. 

 

Workaround: 
It seems if the body of the email is hardcoded, this will send out a corrupted attachment. However, if you use a field for the body, this will work. So, add a field for body rather than using text in the text box.

Highlighted

Great, thanks for the easy workaround! It worked for me.

Highlighted
5 - Atom

I was running into this same problem! Thank you for asking about it and thank you @ntobon for the workaround

Highlighted
5 - Atom

Hi,

 

I am facing the same problem. Can you share the snapshots of what your email configuration looks like.

 

Regards,

KP10

Labels