We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Pick files from folder and add as attachments in email

Lakshmikanth_2021
8 - Asteroid

I have below worksheet, where file 1, file 2 .... are the files places in a specific folder. 

 

For section 1, I need to send an email by attaching the files, where it is marked as yes.

Here in this example, for section 1, I need to attach the files File 9 and File 10.

                                  for section 2, I need to attach the file 2. 

                                    for section 3, I need to attach the files, file1, file 2 file 3 file 4 file 5 file 6 and so on..

 

 File 1File 2File 3File 4File 5File 6File 7File 8File 9File 10
Section 1        YesYes
Section 2 Yes        
Section 3YesYesYesYesYesYes    
Section 4  Yes       
Section 5  Yes       
Section 6  Yes       
Section 7  Yes       
Section 8     YesYes   
Section 9       YesYes 
Section 10          
9 REPLIES 9
DylanDowrick
9 - Comet

Do they need to be in the same email? Or can Section 3, for example, be sent as 6 separate emails?

FinnCharlton
13 - Pulsar

Hi @Lakshmikanth_2021,

To do this, you should transpose your data and then add a file path based on the file to be attached. You can then configure the email tool to attach that file using the FilePath field:

FinnCharlton_0-1674572235437.png

Hope this helps

 

Lakshmikanth_2021
8 - Asteroid

Yes you are right. I need separate emails for every section 

Taylor_S
8 - Asteroid

Hello! This can be done a couple of ways depending on how you want it to work. If you want to just build the workflow and have it run on command, the below should work. You would just need a filter for each Section and then a corresponding email tool. 

 

Taylor_S_1-1674574293994.png

 

 

But if you want to simplify the workflow so you don't need all the filters, you COULD turn this into an analytic app that sends the emails when you select them from a drop down as well. 

 

Taylor_S_2-1674574400549.png

 

 

 

Lakshmikanth_2021
8 - Asteroid

Thanks a lot for the quick solution. 

Actually in my scenario, the number of files like file 11, file 12 might keep extending and also sections might keep extending, is there a way that I can loop

Taylor_S
8 - Asteroid

Do all of the files and/or sections have similar naming conventions?

Lakshmikanth_2021
8 - Asteroid

File names are 'file1', 'file2', 'file'3 ....

Taylor_S
8 - Asteroid

In that scenario you likely could make a macro out of it given the fact that the naming conventions remain the same. Are they all located within the same folder? So that in the file path the only thing that might change is the number in the file name?

Lakshmikanth_2021
8 - Asteroid

Yes. All files are placed in same folder. Is it possible can you please help me out on batch macro ? 

Labels
Top Solution Authors