Alteryx Designer Desktop Discussions

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

Attach Only Available Files Using Email Tool

kkkim
8 - Asteroid

Hi, Everyone!

 

Looking for some ideas here ....

 

I have 7 templates. 1 will always be generated but of the rest of 6, some maybe generated on a particular day while others will generate on another day. File name for all files are dynamic with today's date appended at the end. 

 

Is there a good way to attach "only" available files to email tool? When I spelled out all file names in the attachment section of the email tool, it generated an error saying that certain un-produced files were missing.

 

Appreciate your thoughts and feedback.

 

Thank you!

8 REPLIES 8
Felipe_Ribeir0
16 - Nebula

Hi @kkkim 

 

The email tool has a option to select the files to attach from a column. In your case, it is possible to provide a column with only the available files to this tool?

Felipe_Ribeir0_0-1663875036403.png


Considering what i understood, i think that this is a possible way to deal with this problem :).

kkkim
8 - Asteroid

Yes so i can pass through field values but field 1 maybe available one day and no another day so if I list out all fields - email tool will send out an error saying that certain files are not available.

 

Is there a way to make this dynamic so that only available files get attached?

 

Thank you!!!

Felipe_Ribeir0
16 - Nebula

How do you know that the file is available?

 

If you know how, you probably can build some logic using formula tool/filters so you will pass the field 1 in a dynamic way to the email tool.

kkkim
8 - Asteroid

yes i can filter out only available fields to be passed through to email tool but the field names in the email tool under attachments are hard coded and cannot be formatted to be dynamic. Is my understanding correct? So since all 7 files names are hard coded in the email tool under attachment section, it is sending an error when some files are not available.

Felipe_Ribeir0
16 - Nebula

Hi @kkkim , sorry, i underestimated your problem

 

It would be easy as i was thinking if you had different files to send but always in a fixed number, like 5 files per email.

 

With this dynamic number of files, i found and tested a solution provided by @CharlieS. It is necessary to modify the XML of the email tool. It is working fine. Please test it. As you can see on the screenshoot, it was able to adapt to a situation where i provided 3 files (first test) or 4 files (second test) to attach automatically.

 

Felipe_Ribeir0_0-1663879494500.png

 

 

Solved: Send email even if attachment doesnt exist - Alteryx Community

 

Observation: Dont forget to properly configure the login parameters of the mail tool inside the macro.

 

Felipe_Ribeir0_0-1663879728519.png

 

kkkim
8 - Asteroid

Thank you! Really excited to see your solution but unfortunately, I can't open your file due to version differences. Are you able to screenshot your workflow? Thank you so much!!!!

Felipe_Ribeir0
16 - Nebula

What is your current version? Can you download the one (Build XML for Email Macro.yxzp) inside this topic? (The screenshot will not help you so much, there is some specific XML changing that you need to get from the file)

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Send-email-even-if-attachment-doesnt-e...

 

kkkim
8 - Asteroid

Thank you!!! This worked perfectly!!!

Labels