In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

Attach file conditionally

GustavoTagli
5 - Atom

I want to attach a file in the email only if this file has records, anyway, with attachment or not, the email will be sent. Is that possible?

3 REPLIES 3
binuacs
21 - Polaris

@GustavoTagli You can check the file has any records with the help of the count record tool , based on that you can attach the file or not in the email. Attaching a sample workflow for your reference

 

binuacs_0-1673551167595.png

 

Felipe_Ribeir0
16 - Nebula

Hi @GustavoTagli 

 

I use this macro built by CharlieS (https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Send-email-even-if-attachment-doesnt-e...) to do this job, it can attach 0 to N files dynamically depending on how the logic is built. It will change the XML of the email tool based on each condition.

 

Felipe_Ribeir0_0-1673552036180.png

 

Email with data:

 

Felipe_Ribeir0_1-1673552076522.png

Email without data:

 

Felipe_Ribeir0_2-1673552107999.png

 

 

GustavoTagli
5 - Atom

Thanks a lot, guys! They both work.

Labels
Top Solution Authors