Hi ,
I have a workflow that has batch macro that generates around 10 PDFs.
and then I have a macro to send email attaching those 10 PDFs.
Issue is when I used Block until Done tool, after every iteration (after generating every PDF), it hits to email macro.
But I want it to hit the email macro once all Pdfs are generated.
Any trick or solution will be highly appreciated.
Thanks in advance!
Solved! Go to Solution.
Do you have AMP Engine turned on? I would turn it off if so - it can make Block Until done tools moot
@alexnajm , its off
@Paridhi_Agrawal thanks for confirming - I would also confirm that for the macro just to be safe!
Do you have 2023.1 or later? If so, I would recommend Control Containers instead - yes, AMP Engine has to be turned on but it's a more robust way to control the flow of what executes first, second, etc.
Control Container Tool (alteryx.com)
Control Containers: Take Control of Your Workflow - Alteryx Community
Email tools always run after all other tools have finished running.
Email tools will also send an email for each record in the input dataset. If you want to have the email sent just once with all the attachments, use a sample tool to select only the first record in dataset. If the attachments are always maned the same, your job is done. If the attachments that you send are dynamic, you'll have to have a way to change the attachments in the email tool. You can crosstab the list of attachments and use each of the resulting fields as attachment fields.
Dan
Why do you have the block until done tool?
Thanks everyone, I have modified my workflow so that only one record will be inputted into email tool. and it works.