I set up a test for File Monitor with an email notification.
When the task is triggered it runs a prompt to concatenate the *csv files and moves the cat file to a processed folder.
Then an email notification is sent. All that works great, the only issue I have is it sends an email for every file that gets concatenated.
Is there a way now or possibly in an update to control or limit it to one email notification?
This is currently not possible but you could to it with two additional dummy tasks.
Create a new file monitoring task “trigger task”, triggered by a file (new and modify) e.g. trigger.txt. This one includes a simple CMD or PowerShell script. The script only checks whether your *.csv files folder is empty and the trigger file trigger.txt still exist. In case yes just copy your concatenated *.csv file to another folder and delete the trigger.txt file. Note: In this task you have to configure a delayed execution, I guess 5 or 10 seconds should be enough.
Create a second new file monitoring task “send mail task”, triggered by your copied concatenated *.csv file, see above. In this task you run just a dummy FlowHeater definition that creates a new CSV file from the origin CSV file. In this task you send now your desired email just once
In your original task you have to add an additional step at the end. The Step should just append a line into the trigger.txt file. e.g cmd.exe /C “echo dummy >> C:\Temp\trigger.txt”. With this you trigger the “trigger task”, see above.
Thanks for the help. For the most part I used option two. I removed the notification from the original task and created a new task, monitoring the processed folder. When a new file is detected it performs this task running command:
REM DUMMY TRIGGER FOR EMAIL NOTIFICATION WHEN AN ORDER FILE IS READY TO IMPORT
The command does nothing. But, it satisfies the task performance, then the one and only email notification is sent.