We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Machine Learning Discussions

Find answers, ask questions, and share expertise about Alteryx Machine Learning.
Getting Started

Start your learning journey with Alteryx Machine Learning Interactive Lessons

Go to Lessons

Using the email tool

mitchsam
5 - Atom

Hello! I am trying to split an excel file by division and send out in an email to separate contacts based on their division. My current workflow splits out the divisions into seperate emails but sends all of them to everyone on the contact list I have in the email function. Would anyone know how to update my workflow so that each division gets their own excel sheet with just their divisions information on it? I have also included a picture of my current workflow below. 

 

Thank you!

3 REPLIES 3
abacon
12 - Quasar

@mitchsam Yes this is possible. Could you post the workflow with dummy data so we can do it?

 

What you need to do is have each record that gets an email have the table (excel file) they need assigned to the record. The email toll will send each email the assigned file in the table. Again, would be much easier if you posted the workflow.

 

Bacon

mitchsam
5 - Atom

Hi @abacon

I have attached some test data and what I need to do is break out the division column into separate excel sheets and then hardcode into alteryx who receives that email based on the division they are in 

abacon
12 - Quasar

@mitchsam Alright, here is what you do and i have attached a test workflow that details what to do - you will just have to update the file path and information to be applicable to your situation.

 

1. For the people receiving the email, they need a way to join to the base data. In this use case, I created a dummy table that included user name, email, and what division they apply to. This allows me to join the data to them so they can be 'assigned' a data file.

image.png

2. Before you join the 2 stream together - base data and your user master, you need to create a field that will create the output files by division (or whatever grouping field you need for other users out there).

image.png

 

3. Next step is to join the data together so the users receiving the emails have the correct file assigned.

image.png

4. Now you create the output files using the created file path field. The output data tool allows you to overwrite the file path in the tool with a field, use this option. Notice the Block Until Done tool. This ensures the files are created first, then the email will send out.

image.png

5. Next, I remove the fields from the base data for cleanliness, remove duplicates on all fields left from the user master and send this to the email tool. You will make the To field in the tool the Email field from the data, and you will add an attachment using a field from the data - use the created filename field. This will send each user an email with the file from the path in the field.

image.pngimage.png

 

Please note: you will need to update the filepath field with either a temp file path or an actual file path mapping to a location on the machine or shared drive.

 

This workflow assigns a file to each user based on the division, creates files based on the division, then sends an email to each user using the division they are assigned.

 

Let me know how this goes for you.

 

Bacon