Attach file conditionally
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
Solved! Go to Solution.
- Labels:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Email with data:
Email without data:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks a lot, guys! They both work.
![](/skins/images/1A7F54316481E10DBCA4A87A32E06CC6/responsive_peak/images/icon_anonymous_message.png)