Hi,If is possible to send the email with excel (which contain few sheets) attachment?
I need to send the email to several recipients.
Example:
each excel file should go to the person from the list:
I would appreciate any advice
Hi @Neffri
Just replace both by any file that you have access. These files doesnt really matter since the macro will do the job of replacing these parameters.
Hi @Neffri , you are welcome 😊
Maybe it is a good idea for you to take a look at an introduction to macros, it is really useful to undestand how they work for a lot of different problems: https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Macros
This tool of the main workflow is a batch macro. On this case, this means basically that you can pass columns as parameters to it, and the macro will run 1x for each row that you pass. We are passing to it each email and attachments associated with it, and we have 3 rows, so it will run 3 times:
Inside of the macro, you can see this 'gear' tool. This is the input of the parameter Concat_XML_attach column of the image above (and the other one of the email column):
And finally, the update tool will pick the data from the 'gear' and update this value inside of the email tool, so for each run the email tool will know exactly to who send the email and which attachment is associated with it. The replaced value is the clicked value:
The tricky part of this macro is that for the email you can just replace the value (email1@company.com, email2@company.com...), but for the attachment, you need to replace the XML code. This is a little more advanced, but you can see that for attachments you have multiple values, and as you have a variable number of values (attachments), the trick of replacing values will not work here and you will need a more advanced trick.
But dont worry too much about the XML construction part right now, most macros will work just by replacing the value, like we did for the email column.
@NeffriIt's possible and shouldn't be too difficult. You need one row per email address you want to send the email to, and there's a configuration option to add an attachment as well.
You can find a workflow to download and look at, as well as read more on the topic on the Alteryx Email Tool Mastery Page:
https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-Email/ta-p/32129
Do you think that will work for excel with contains few sheet?
because I don't know how to prepare the input tool for that.
@Neffri Are you trying to send the Excel file as an attachment, or extract the data from it to use in the email? If you're sending as an attachment it won't matter how many sheets are in the workbook, just select it as an attachment in the email tool, no need for an input tool
If you want to extract the data and include it somehow that will still be possible, but the steps you need to take will depend on the format of the data in the workbook.
A workflow like the attached one should do the job for you. The list is a separated file, this ID/Email data is not inside of the files that you need to send, right?
If yes, you dont need to import the data inside Alteryx, just pointing the fullpath of them to the email tool will be enough.
*Disable the email tool to test it some times before sending, once you send the emails you will not be able to cancel it.
I've tried all these solutions but the problem is that I have diffrent numbers of attachment for the diffrent recipients. I don't want to send several e-mails with only one attachment to one person
to send a different number of attachments to each person, the best way that i know is by using this macro from CharlieS (https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Send-email-even-if-attachment-doesnt-exist/m-p/194446#M49570)
Try the attached workflow.
@Felipe_Ribeir0 Thank you very much, could you please help me with understanding the macro? I'm not sure what I should but in Attachment section in the email tool.
Inside of the macro configure everything but the To: / Attachments field. These fields will be handle by the macro.
If you look at the Xml View of the email tool, you will see there the files/xml code that will be replaced by the macro.
I'm receiving this error: Error: Email (2): Record#1: Error Opening file: C:\Program Files (x86)\Alteryx\DataProducts\AlteryxMap\TomTom_US_2017_Q2\Data\us_ft.yxdb: The system cannot find the path specified. (3)
@Felipe_Ribeir0 thank you very much Can you please explain me why we need to give 2 dummy files in the attachment? Which part of the workflow is responsible to switch these two dummy attachments to what we want to have there? Is it XML_Attach formula?THANK YOU!!!
@Felipe_Ribeir0 YOU'RE MY HERO!