Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

attach Alteryx outputted Excel file to the routine email distribution

LEXQ2005
8 - Asteroid

I used Alteyrx Designer to generate an Excel file, saved it in a shared folder. I also use the Alteryx server in my company.
Is that possible to auto-distribute an email to the users with the Excel attached to the email?
How to do that?

Thanks. 

6 REPLIES 6
jamielaird
14 - Magnetar

Hi @LEXQ2005,

 

You can send an attachment by providing the filepath of the Excel file to the Email tool.

 

Since you're already generating a file, make sure you have a field in your data that provides the filepath - in your case a location on your shared drive.

 

Add a Block Until Done tool before the tool that ouputs the Excel file.

 

Then add an Email tool after the Block Until Done tool, configured so that it will run after the Excel file is generated, and pass in the file path.

 

Hope this sets you on the right track.

ArtApa
Alteryx
Alteryx
LEXQ2005
8 - Asteroid

Let me describe the use case in further details:

I used Alteryx Designer to generate multiple worksheets in one Excel file. The Excel file is saved in a shared folder. The final reports for the customers are pivot tables with filters. The pivot tables are based on the worksheets Alteryx generated.

I use the pivot table instead of generating a report using Alteryx Designer directly because the users can customize their data using the pivot tables' filters.

I want to auto distribute an email routinely to the users with the Excel attached to the email. I hope the Alteryx output data and the Pivot tables in the Excel file all get updated automatically.

jamielaird
14 - Magnetar

Hi @LEXQ2005 


Thanks for the clarification.

 

There are two parts to this then, which I'll address seperately:

 

Outputting to multiple sheets within an existing Excel file

You mentioned that your final output contains a pivot table and I therefore assume that you will have created this file before running the Alteryx workflow (since Alteryx can't construct the pivot table for you). If that's the case, then all Alteryx needs to do is replace the data in the sheets that are used in your pivot table, which should be fairly simple:

  • Make sure that each row of your data has a column identifying the sheet name you want it to write to
  • Configure the Output Data tool to write to the location of the Excel file in which you have created your pivot tables and choose Overwrite Sheet or Range
  • Tick Take File/Table Name From Field and choose Change File/Table Name and the field containing the sheet name, and untick Keep Field in Output

Sending via email an Excel file that is saved in a shared folder

This is pretty simple - you just need to have the filepath for the file that you want to email, and for it to be in a location that Alteryx can access, and configure your Email tool with this filepath as an attachment.

LEXQ2005
8 - Asteroid

Is that possible you can attach a sample solution Alteryx Desinger file?

LEXQ2005
8 - Asteroid