Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Email Report to Multiple Recipients -

Sidey1978
8 - Asteroid

Hi all

 

I have a report which I now would like to automatically email to the appropriate recipients.

 

Ideally I would like recipient to only see the data for which the are the owner - owner is a field within the data.

 

I have searched and read various topics on this but so far haven't had any success making it work.

 

I have attached a sample of my data. Could anyone please point me in the right direction?

 

Thanks! 

16 REPLIES 16
grossal
15 - Aurora
15 - Aurora

Hi @Sidey1978,

 

I'd use a Batch Macro here. You'll need a simple two step process like this:

 

grossal_0-1590049040361.png

 

The Summarize Tool gives you a list of all Owners: 

grossal_1-1590049067026.png

 

You can than use this list as a control parameter in your Macro:

 

grossal_2-1590049087528.png

 

The Macro will first filter all the data to "Joe Bloggs" and than to "John Smith" - both in separate iterations. This will allow you to send each person only the data they need.

 

I have attached the workflow and macro for you to check out. Let me know if this solved your problem.

 

 

Best

Alex

 

 

 

Hannah_Lissaman
11 - Bolide

Hi @Sidey1978 

 

You will need to generate a separate file for each recipient, then you can attach a separate file for each person.

 

First, you need to generate a file path for your attachments as a text field. Remember to add "|||Sheetname$" at the end.

Hannah_Lissaman_0-1590049145959.png

 

Then you can use this in an output tool to generate separate Excel files for each.

Hannah_Lissaman_1-1590049187821.png

 

Finally, you can use the filepath again in your email tool to attach the files you have generated to the emails to their corresponding person.

Hannah_Lissaman_2-1590049275486.png

 

I also used a Block Until Done tool to make sure the files were all generated before the email tool started to work.

 

My example workflow is attached.

Sidey1978
8 - Asteroid

Hi @Hannah_Lissaman 

 

Thanks for your help. I've downloaded and tried the workflow. However, the email tool is giving me an error - "The filename, directory name, or volume label syntax is incorrect. (123)". Any idea what might be causing that?

 

Thanks!

Jonathan

Hannah_Lissaman
11 - Bolide

Hi @Sidey1978 

 

My mistake! Obviously we don't need to specify the sheet name when we are attaching a whole file. The sheet name is needed when we create the file, but we then need to trim it back off again before we connect to the email tool. 

 

I used a Formula tool with Left([Output Filepath], FindString([Output Filepath], "|")) to remove it. 

 

While testing I also realised that we need to consolidate down to just one row per person we want to email. I used a Summarize tool to keep just one row per person to avoid sending them multiple emails. 

 

Updated workflow attached. 

Sidey1978
8 - Asteroid

Hi @Hannah_Lissaman 

 

Thats brilliant! Thank you so much for your help with this 🙂

 

Cheers

Sidey1978
8 - Asteroid

Hi @Hannah_Lissaman 

 

Side note to this issue, is there any way to output the report to PDF? The output contains a URL which isn't functional by default when outputting the report to .xlsx. I have tried to change the report options but pdf wasn't a choice?

 

Any help would be greatly appreciated!

 

cheers

Jonathan 

Hannah_Lissaman
11 - Bolide

Hi @Sidey1978 

 

To create a PDF report you will need to build this using the reporting tools - I would recommend looking through the relevant training materials for how to get started: https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Reporting%...

txjohnnypops79
8 - Asteroid

Life saver! Will you marry me please?  hahaha

 

nice!!

txjohnnypops79
8 - Asteroid

Hi Hannah, your solution worked but i have three records in a file and its one file but its sending it three times, do you know how to fix this??

 

thanks in advance

 

-Johnny

Labels