Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Attach all files from a directory and email it

jepalteryx
5 - Atom

I've been looking for a clear solution for this but haven't found one so I'm putting a new post out....

 

I want to be able to build a process that goes and reads a directory and pulls all the files from the directory and emails it to email address based on a list of email 

Second function is to pull a file from a directory - read the file in an input - then output it to a database

3 REPLIES 3
TomHH
Alteryx Alumni (Retired)

Hi @jepalteryx ,

 

You can use the Directory Tool to read in the file paths from a given folder. Once you have the file paths you can configure the email tool to attach files from the field value from your input.

Let me know how you go.  

 

TomHH_0-1679894129716.png

 

 

jepalteryx
5 - Atom

I just tried and it did send the email with the attachement but if I have more than one file in there it sends a separate email for each attachment. How do I send all the attachments in one email?

TomHH
Alteryx Alumni (Retired)

Hi @jepalteryx , to send out all the attachments in one email you'll need separate columns for each attachment - so one record has the email address and n attachments. This is pretty straight forward when you have a fixed number of attachments but a little bit more complex when you want to dynamically update the attachments. 

 

If you're comfortable building macros with xml you can use the first solution, however you can try the solution at the end which sorts and then sends the emails based on the number of attachments - https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Email-Batch-Macro-With-Varying-of-Atta...

 

Hope that helps!

Labels