Alteryx Designer Desktop Discussions

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

e-mail most recent file in folder

Jon_ct
7 - Meteor

Is there a way to select the most recent file in a directory and e-mail that file?  My goal is to create a file daily, save a copy with name_date, and e-mail that file to coworkers. 

 

I've been able to read into a workflow the most recent file, as well as create a workflow that e-mails an output, just looking to put the two together.  

 

Thanks,

Jon

5 REPLIES 5
grossal
15 - Aurora
15 - Aurora

Hi @Jon_ct,

 

when adding an attachment in the E-Mail tool you can select "File name from field value". Choose the right field and that's it!

 

grossal_0-1585774467169.png

 

 

Best

Alex

DavidP
17 - Castor
17 - Castor

I would use the Directory Tool to get a list of files in the folder, sort by Creation Date descending, Sample tool -> to keep 1st record only and use the fullpath as the filename field in your email tool.

Jon_ct
7 - Meteor

@DavidP Thanks, I was able to get this to work!  

 

If i wanted to send two files from two different folders (both the most recently created files) in one e-mail is there a way to do that?

 

fjlorenzo
8 - Asteroid

Hi @DavidP,

 

Can you send me a sample workflow using the Directory Tool and how can I add the latest file in the email tool. Thank you for your help.

 

Regards,

Florence Lorenzo

emilycantaberry
5 - Atom

This worked for me when adding it as an attachment, but I would like to have it as an image in the body of the email.

I was using the image tool, but I am unable to use it dynamically. It forces me to pick a static image file even after sorting through with my last process to select the most recent image file. Any suggestions?

Labels