Alteryx Designer Desktop Discussions

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

Sending emails with dynamic number of attachments

Biko
7 - Meteor

Hey guys - need your urgent help on this 🙂 

 

I have a list of clients that have a single or multiple reports to be attached in each email. 

 

Client A has 2 fullpaths (2 xls file)

Client B has 2 fullpath (2 xls file)

Client C has 1 fullpath (1 xls file)

 

What I did:

 

1. Summarize - group by client and concatenate fullpath.

2. Text to column - unconcatenate fullpath by 5 columns (as max reports are 5).

3. Autofield - everything.

4. Dynamic select - Null is represented as boolean. So I uncheck that. This will delete the null columns 3, 4, and 5. I am left with 2 columns: concat_fullpath1 and concat_fullpath2 (second pic below).

5. Email - I added concat_fullpath1 and concat_fullpath2 as attachment. I was thinking if either of the value is null then it probably won't attach anything. 

 

Now client A and B are ok because they have 2 attachments. 

Client C is giving the email tool an error because concat_fullpath2 is null. 

 

How can I avoid this?

 

Input.jpegDynamic Select.jpegEmail.jpeg

6 REPLIES 6
RobertOdera
13 - Pulsar

Hi, @Biko 

 

Hard to say without a workable sample file...

However, have you checked out this post in the Community?

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-Email/ta-p/32129

If the resource works for you, please give credit to @MattD versus marking my response as a Solution.

Good Luck!

Biko
7 - Meteor

Unfortunately my company doesnt allow uploads and I don't have any windows laptop at the moment 😞

Not sure how to provide you with the sample file. Sorry about that. 

Biko
7 - Meteor

@RNO2 - I think the solution is similar to this post https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Email-Batch-Macro-With-Varying-of-Atta.... However need to integrate it with multiple client level? Been tinkering but can't get it to work. Do you know have any idea?

Biko
7 - Meteor

After a day of tinkering using Claje's macro I was able to integrate to utilize it to my purpose. 

RobertOdera
13 - Pulsar

Just seeing this today @Biko 

Glad you were able to tweak it out.

Can you share conceptually what modifications you made?

Thanks!

Cfdiaz2103
8 - Asteroid

Hi @Biko !

 

In order to sending dynamically those emails with their corresponding attachments, you need to separate all records by identifying which clients have 2 attachments. Try to do that with a Filter Tool, followed by this parameter: !IsNull([Concat_FullPath2]). In that case, Client A and Client B should output theirselves from the True Anchor, while the Client C should output itself from the False Anchor. Next, drag a Select Tool to the False Anchor, and deselect the [Concat_FullPath2] field. Finally, copy and paste the Email Tool you previously configured and drag it to the Select Tool, and deselect the attachment Field: [Concat_FullPath2].

 

Hope it works! 😉

Labels