Alteryx Designer Desktop Discussions

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

Dynamic Email - Email even if certain attachments not present

Chris_Waspe
7 - Meteor

Hello Alteryx Community

 

I am trying to create a workflow which creates files from un-joined data. I would like to attach these files to an email at the end of the workflow. However, some files may not get created, depending on the success of the join. I would still like the email to be sent if only one file is created, or both files are created. The email does not get sent if there are no files created ie all joins were successful. I have created an obviscated workflow if you require it. Please see attached. Thank you very much for the assistance.

8 REPLIES 8
grossal
15 - Aurora
15 - Aurora

Hi @Chris_Waspe,

 

can you attach the macro? It isn't part of the package you provided.

 

grossal_0-1587637376870.png

 

Best

Alex

Chris_Waspe
7 - Meteor

Sorry about that

grossal
15 - Aurora
15 - Aurora

First of all, I like your XML approach but I am sadly not really familiar with the Alteryx XML and update XML function in the action tools. I really hope someone else will provide a way with the update XML, I would love to see this in action.

 

Anyway. Alteryx has several options and I'd choose a different but more easy route (at least for me).

grossal_1-1587638777545.png

 

I would create three E-Mail tools and configure them to handle

- Only 1st file

- Only 2nd file

- Both files

 

You could than wrap everything in a container and activate/deactivate the containers based on the amount of files you have. This would require an additional column with the information what files are available.

 

I know that's a hacky workaround, but I wanted to share it anyway. Let me know what you think.

 

Chris_Waspe
7 - Meteor

Thanks @grossal 

It does the trick after a little playing around. Nothing wrong with a 'hacky workaround'. As long as it does the trick.

 

Chris_Waspe
7 - Meteor

Hi @grossal 

 

Just to let you know I managed to resolve the issue with the Xml. There is an ampersand (&) in my file path (bad folder naming, I know) and in Xml this is represented as '&'. I therefore needed to include this in the Xml to be updated.

yunpeng
8 - Asteroid

Hi Christopher_Waspe,

 

I've got a similar use case where I got the macro to be able to send dynamic number of email attachments. That's fine.

 

Now, in the same data stream, I need to load the emailbody which is a dynamic field in the incoming stream. I've not figure out how to use another control parameter + action tool to update value. the email body is dynamic so i couldnt direclty build it out in the macro part itself. Any idea how the same macro tool can dynamically load that? Thanks. 

grossal
15 - Aurora
15 - Aurora

Hi @yunpeng,

 

why don't you use a formula and build the logic which column to use in it and than reference that newly created field in the E-Mail tool?

 

Best

Alex

Link86
8 - Asteroid

Any chance you still have the completed workflow that you can share. I am doing the same thing but am unfamiliar with the control parameter and would love to see how you are using it to update the file paths.

Labels