Alteryx Designer Desktop Discussions

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

Email Tool | Sent Multiple Mails with Excel File attached

maier_alexander_MO
8 - Asteroid

Hi all,

 

I am struggling with the option to send one email per company with the respective Excel File attached. 

 

In my workflow I am creating one table per Company which is then Rendered to a network drive. Each Excel file contains either one or two sheets.

 

Now i want to send each file with the same email text to the respective email address which are already in my data. 

 

The workflow works as far as that the emails with the Excel attachments get sent. However, i receive the following error when trying to open the file form the mail:

maier_alexander_MO_0-1585320067330.png

 

In the workflow I used a 2nd Render Tool that does exactly the same as the first Render tool, except for creating the Excel files in the same folder as the workflow. Do i need the 2nd Render tool at all or is there another way? Without the 2nd Render tool i receive the following error in Alteryx:

 

maier_alexander_MO_1-1585320266158.png

 

I would really appreciate your help on this since this functionality would be key for several Apps.

Thank you so much and kind regards,

 

Alex

 

9 REPLIES 9
DavidP
17 - Castor
17 - Castor

You don't need 2 Render tools, you can remove the 2nd one.

 

What might be happening is that the email tool tries to email files that have not been created yet, so use a Block Until Done tool after the last formula tool to ensure the Render tool completes its business first before the Email tool tries to email the files.

 

You should define the full path in [file] or [filename] and change the Render tool to change entire file path and use the same field in the email tool. This is to ensure that the the files are in the place where the email tool will be looking for them.

 

Hope this helps. Let me know if you have any further problems.

grossal
15 - Aurora
15 - Aurora

Hi @maier_alexander_MO,

 

As @DavidP said, you could use a Block-Until tool that uses Output 1 for the rendering and Output 2 or 3 for the e-mail, but that shouldn't be needed. As Email Tool documentation states that "The Email tool is always the last tool to run in a workflow". 

 

This is my guess what's wrong:

1) You should add a ".\" in front of the filename if you want to use the way with the second render tool.

2) Unless it's required, I would remove the second output and just add your already hardcoded full path from the first render tool and add it to a formula tool and use this as an Input for the Email Tool. You could also do a test run with the fully hardcoded setting in the Email tool and change it. 

 

Let me know if it helps.

 

Best 

Alex

 

 

maier_alexander_MO
8 - Asteroid

Hi @DavidP  & @grossal 

 

thank you so much for you quick replies and your help on this! I tried to remove the second Render and added the full file path as a field (column "Filename"). The workflow now looks like this:

maier_alexander_MO_3-1585417877176.png

 

The file path "Filename" then serves as Input for the Render Tool:

maier_alexander_MO_1-1585417722772.png

And in the next step also serves as the source for the respective attachment:

maier_alexander_MO_0-1585417686612.png

 

The emails are all sent but the attached files within the emails still cannot be opened and show the following error:

maier_alexander_MO_2-1585417796823.png

 

The files on the network drive itself however can be opened perfectly... Do you have any idea what might still be wrong here? 

Thanks in advance for your time on this!

Kind regards,

 

Alex

 

 

grossal
15 - Aurora
15 - Aurora

Let's try to localize the problem and build a minimal workflow.

 

grossal_0-1585418833933.png

 

Let's try to go step by step:

 

1) First build a workflow with only a Text Input Tool (one cell with data) and output / e-mail tool and see if this works

2) Just load the right Excel (saved on a local drive) into the E-Mail tool and leave the rest the same

3) Just load the right Excel from the network-share (still hardcoded into the E-Mail Tool)

4) Save the network-path in the Text Input Tool and try to load the path from a field

 

Let's see at what point the error comes into place.

 

Best

Alex

 

 

maier_alexander_MO
8 - Asteroid

Hey @grossal ,

 

thank you very much for your tips - i will definately go for the error source later today. 

I would still have a general question before doing this. Could the issue be connected to the fact that Excel is not installed on our Alteryx Server? 

I already had workflows in which i could not open Excel files via the RunCommand tool for example..

Kind regards,

 

Alex

grossal
15 - Aurora
15 - Aurora

Hi @maier_alexander_MO,

 

you shouldn't need Excel to be installed on the server for loading the file, but you would need it for the RunCommand.

 

I have talked to one of my colleagues. There is a chance that the file isn't fully written. In fact the E-Mail Tool will be started last in the workflow, but it's possible that the writing of the Excel is still in process while the E-Mail Tool tries to catch it. (There are ways to work around this too)

 

Please try all four steps, even if earlier steps fail.

 

maier_alexander_MO
8 - Asteroid

Hi @grossal thx so much for your help already! 🙂

 

I tried all four varations, however only the first one did succeed as expected. For the varations 2)-4) i did receive the same error as above which asks me to repair the Excel file.

 

I also tried to just attached .xlsx files that are already created to the email tool which shows the same error as well...

 

Do you have any other idea what might trigger this?

 

Kind regards,

 

Alex

 

 
 
grossal
15 - Aurora
15 - Aurora

Hi @maier_alexander_MO,

 

we are a bit speechless why this isn't working when using the Excel on a local drive. If you are allowed/able to send the Excel, we could inspect what might be wrong with the file (DM if you don't want to share it public).

 

I don't see other ways to further help and my colleague and I are pretty sure it's a bug and you should contact support@alteryx.com.

 

 

Kind regards,

 

Alex

 

 

maier_alexander_MO
8 - Asteroid

Hi  @grossal ,

 

after many hours of testing and looking through countless Discussion posts I found that there is an ongoing bug that can occur when a hard-coded body is used. 

 

I now used a Report-Text as the input for the body of the mail and the attached Excel files can be opened:

maier_alexander_MO_0-1585586776795.png

 

So in the end it actually is a bug..thank you so much for your help on this! 

Have a great day and kind regards,

 

Alex

 

Labels