Hello everyone.
I would like to set up an automatic mail dispatch in which a mail with attachment is sent weekly. (Workflow with the node "Send e-mail" and a scheduler in the web interface).
The attachment is always the same file, but the file name sometimes changes from "Testfile 1.xlsx" to "Testfile 2.xlsx" etc. I have tried "Testfile*.xlsx", but the * is not accepted.
Do you have any tips?
Thanks a lot!
Jan
Mail with attachment
Re: Mail with attachment
Hi,
Sorry i am a little bit confused about this because you say it is always the same file but the filename changes... If the filename changes (and i assume the content changes too), in which way is it "always the same file" then?
My first thought however is that there is the files find plugin processor, it is kind of best friend with the job scheduler feature![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
In this case, files find would set the variable s_temp (you can use s_source instead of course) to the FIRST found file that matches the include filter:
Sorry i am a little bit confused about this because you say it is always the same file but the filename changes... If the filename changes (and i assume the content changes too), in which way is it "always the same file" then?
My first thought however is that there is the files find plugin processor, it is kind of best friend with the job scheduler feature
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
In this case, files find would set the variable s_temp (you can use s_source instead of course) to the FIRST found file that matches the include filter:
emcodem, wrapping since 2009 you got the rhyme?
Re: Mail with attachment
Good morning and sorry for the confusion. Of course it is not the same file, because the name and content changes.
And sorry, I completely overlooked the plugin processors. There is still a lot for me to discover.
Thanks for your help, emcodem, I'll look into it!
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
And sorry, I completely overlooked the plugin processors. There is still a lot for me to discover.
Thanks for your help, emcodem, I'll look into it!
Re: Mail with attachment
Sorry, but I don't get it.
I installed the plugins and configured the "Find Files" with %s_temp%. But the e-mail-processor keeps sending mails with the attachment "s_temp.txt", not "testfile.xlsx".
I installed the plugins and configured the "Find Files" with %s_temp%. But the e-mail-processor keeps sending mails with the attachment "s_temp.txt", not "testfile.xlsx".
- Attachments
-
- Unbenannt2.png (3.47 KiB) Viewed 4849 times
-
- Unbenannt.png (36.14 KiB) Viewed 4849 times
Re: Mail with attachment
Hehe ok so sending "not the same file" makes a lot of sense, altough you could just use the normal watcholder for this maybe
But i guess you have your reasons why you want to schedule this, so lets go on.
So you want to make sure that files find works as expected, e.g. %s_temp% has been filled with a valid filename.
While you build your workflow you can just connect a populate vars processor after files find and let it set %s_success% to %s_temp% so you can see in the "outcome" field of the jobmonitor what the variable contained. Did you actually "create" the user variable s_temp in the variables window (it might not work to use "non existing" variables)?
Once you are convinced that s_temp contains the filename, you can test if it now sends the email as expected, this should work.
After that, if you like you could insert a conditional after the files find and check if
$exists("%s_temp%") = 1
You could then insert a second email processor at the end, rightclick it's input pin and set it to execute on error, then connect the output of conditional to the 2 email processors (one for success path, one for error path)
Error handling is e.g. explained in the sticky thread:
viewtopic.php?p=3582#p3582
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
So you want to make sure that files find works as expected, e.g. %s_temp% has been filled with a valid filename.
While you build your workflow you can just connect a populate vars processor after files find and let it set %s_success% to %s_temp% so you can see in the "outcome" field of the jobmonitor what the variable contained. Did you actually "create" the user variable s_temp in the variables window (it might not work to use "non existing" variables)?
Once you are convinced that s_temp contains the filename, you can test if it now sends the email as expected, this should work.
After that, if you like you could insert a conditional after the files find and check if
$exists("%s_temp%") = 1
You could then insert a second email processor at the end, rightclick it's input pin and set it to execute on error, then connect the output of conditional to the 2 email processors (one for success path, one for error path)
Error handling is e.g. explained in the sticky thread:
viewtopic.php?p=3582#p3582
emcodem, wrapping since 2009 you got the rhyme?
Re: Mail with attachment
Thank you for your explanations. I could see that the problem was due to missing permissions. Now it works as desired. ![Smile :)](./images/smilies/icon_e_smile.gif)
![Smile :)](./images/smilies/icon_e_smile.gif)