Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Send dynamic number of attachments using Email tool in Alteryx along with custom Body

ssripat3
8 - Asteroid

Hello Alteryx community,

 

I am currently working on generating a flow to send multiple attachments using the email tool. I was able to test out a macro which I created based on a community post. Using that I was able to send multiple attachments, but I was unable to send the Body of the email which I generate using Message, Table and Layout tools.

 

Below is the sample body (Value in Layout). I would be sending that in the email tool and the XML files should be attached to this email. There might be two files or 10 files in some scenarios. I would like to attach all the files and send only a single email in all instances.

 

Please find the packaged workflow I generated below, please let me know if you need any additional information.

 

Thank you

 

Sample_Email_Body.png

 

7 REPLIES 7
OTrieger
12 - Quasar

@ssripat3 
You are using the wrong tool to create the Body text for the email, you should use Report text tool and then you can select it as the variable for the Email Body text.

ssripat3
8 - Asteroid

@OTrieger . I have been using the same set of tools to create a body of the email without the attachments and been using it to generate the body of the email for a long time. It works when the Layout is generated outside of the macro. 

I am able to send the attachments without using a macro. But, in that scenario for each unique attachment an email is being sent with the body shown in the image. But, I want to attach x number of attachments to a single email.

OTrieger
12 - Quasar

@ssripat3 
Bad me, I did not understand what was the issue.

You can do it by modifying the XML code of the email tool.
What you will need to do is to have the full path for each of the attachments and insert it to the XML coding and then update the XML code in a batch macro.

att.PNG

For each attachment you will need to have it in that format.

OTrieger
12 - Quasar

By doing it you will have multiple attachments in one email

ssripat3
8 - Asteroid

Email_Without_Custom_Body.png

 

I am able to send the attachments using the suggestion you have made which I referred from another post on the community, and it is being displayed in the Workflow Package I shared earlier. Now, I would like to add a Custom Layout built as displayed in the image shared earlier which I am building in the macro as the Email Body which is not happening and throwing an error.

 

Can you please assist me with that @OTrieger?

ssripat3
8 - Asteroid

Can anyone help me with this logic?

ssripat3
8 - Asteroid

Does anyone know if there is a way to update Layout using either XML tags or directly using Macro? I tried it and it shows File_2 is missing.

Labels