Page 1 of 2

How to email all file names processed together in single email?

Posted: Sun Sep 29, 2019 8:20 am
by smsimonk
Hi,

I process batch of multiple files through watch folder in one workflow. And I have to inform those processed files and destination paths to my friend by email. I could do the emailing of that result without a problem. BUT if I process 10 files, it generates 10 emails. Which I want to avoid and send all 10 processed file information in 1 single mail every 3 hours. Could someone help ?

Your help is very much appreciated

Thanks
Simon

Re: How to email all file names processed together in single email?

Posted: Sun Sep 29, 2019 12:32 pm
by emcodem
Hey smsimonk,
The webinterface (see sticky thread) can schedule a job e.g. every 3 hours for you.
you could append all your files to one text file, e.g. c:/temp/files.txt.
Then, set up one workflow that just reads the file, sends the contents by email and deletes the file.
In the webinterface, set up a schedule that starts the email workflow every 3 hours...

Re: How to email all file names processed together in single email?

Posted: Mon Sep 30, 2019 10:16 am
by smsimonk
Thank you I will look into webinterface

Simon

Re: How to email all file names processed together in single email?

Posted: Mon Sep 30, 2019 10:43 am
by smsimonk
I tried to understand and solve my problem using the webinterface, but not smart enough to figure out anything related to my need. As I happen to know and start to use the FFAStrans just 4 days back, everything looks WOW, but don't know how to solve my problem. I am poor in coding also. So I will be so thankful if someone can help.

Another problem:
I could set the Loudness Node and process the output in a way I want as MP3 file. But if the input file is Wave format, then the output file comes as 0kb mp3 file. So if I use A/V Media node in between then error comes. When I place A/V Media node and remove the Loudness Node, then output comes ok, but level not processed.

Re: How to email all file names processed together in single email?

Posted: Mon Sep 30, 2019 11:54 am
by emcodem
Hey,
i am totally interested where is your problem with the scheduled jobs on the webinterface, i want to make it easy for beginners too. You don't need any coding at all, just these steps:
-) in ffastrans ui, create a workflow that reads text file and sends email, then deletes text file. No Watchfolder processor needed, the first processor can be e.g. a populate variables processor that reads the text file using the $read(___FILENAME___) function
-) on the webui, go to scheduled jobs (calendar symbol on the left), add a new job, set frequency to 3 hours and select the email workflow -> voila, the email workflow will be started every 3 hours. No coding needed

Regarding the loudness issue you reported, it is likely that you hit some kind of bug, i'll need to reproduce this. What encoder are you using, can you upload your workflow? The correct processor order would be like: A/V Media->loudness->encode

Re: How to email all file names processed together in single email?

Posted: Mon Sep 30, 2019 4:53 pm
by smsimonk
Thank you so much. Your words helped me figure out things very well. I learned to make the list of files processed in text file. I need to test webinterface to schedule to email. Meanwhile I have another question, How to read the Destination File name with extension, that is what I need to store in text file and email every 3 hours

Regarding Loudness....today it worked well without adding A/V Media node. Only change I made in the watch folder to filter incoming files for *.wav

Re: How to email all file names processed together in single email?

Posted: Mon Sep 30, 2019 7:31 pm
by emcodem
Sorry, your initial question sounded for me like you already know how to do the stuff but only have the problem about the 3 hour based stuff.
Write the destination filename after a "deliver node" to a text file using the generate text file processor. Use Variables in the "text content" input field of the generate file processor.

%s_source% will contain the destination Folder and File name with extension of the delivered file (after the deliver processor)
%s_source% is the most important variable, explained here:
viewtopic.php?f=5&t=849&p=3549&hilit=beginners#p3550

On every processor like the generate text file processor, there is a button with an ">" symbol, hit it to get the variable selection, it is explained well.

Re: How to email all file names processed together in single email?

Posted: Tue Oct 01, 2019 5:41 am
by smsimonk
Thanks a lot. I learned to populate the text file but I am stuck at "workflow that reads text file"

Re: How to email all file names processed together in single email?

Posted: Tue Oct 01, 2019 7:22 am
by emcodem
Check out this small workflow for you.
File_to_Email.xml
(10.24 KiB) Downloaded 395 times
Doublecklick the first processor "Populate Variables" to change the input file name. The input filename should be the filename that your encoding workflow writes. It should be always the same filename. Currently it is set to "C:\Temp\V0.txt"

Test this workflow by right clicking the Populate variables processor and submit any file, it does not matter which file you submit as the "submitted" file will not be processed at all. This is because the Populate variables processor does set %S_source% to "C:\temp\V0.txt".
Change c:\temp\V0.txt to your filename.

When testing is done and the email is sent successfully, set up a scheduled job on the webinterface to start the "File_to_Email" workflow every 3 hours... Take care: The input file will be deleted by the Command processor but only if the email was sent successfully.

I hope you have some SMTP Server, otherwise you need to tell me about how you want to automate sending your email by telling me which public Email provider you want to use.

Let me know your questions :-)

Re: How to email all file names processed together in single email?

Posted: Tue Oct 01, 2019 8:13 am
by smsimonk
Thanks again for helping me with each step. It was successful in ffastrans ui and webinterface. Only thing is, it generates the file log.txt in perfect format with line breaks. But the generated email comes without line-break.

I am using gmail only. Email reaches me without any problem when triggered from ffastrans ui or webinterface