Page 1 of 1

email notification flow

Posted: Mon Aug 07, 2017 5:59 pm
by whitey666
HI Guys
I'm pretty new to switch so please bare with me if i sound stupid lol
ok so we have an online storefront that constantly needs printed products adding like a 2pp A4 or 4pp A4 etc
but the customer would like an email notification to go to all staff when a product is uploaded.
I've built a flow that i can drop the thumbnail jpg (used for the storefront) on to an 'in' folder in switch, which it then takes the file name attaches the thumbnail to an email and adds the file name as per attachment.
The problem I've got is it does a separate email for each file so i added 10 products the other day and sent it to 140 email addresses.
so 1400 emails hit their server and i got marked as spam, and then their IT went nuts for sending so many emails.
So i guess what I'm needing is an assemble job?? with a timer that waits for the thumbnails and then adds them all to one email
The file name on this one was 'Off the mark.........

thanks in advance :)

Re: email notification flow

Posted: Mon Aug 07, 2017 6:19 pm
by gabrielp
Yeah, you can assemble on "arbitrary files" for a certain time period, then send the images as attachments as a zip. I'm not sure what happens if you send a folder as an email attachment.

Re: email notification flow

Posted: Wed Aug 09, 2017 10:56 am
by whitey666
Sweet!!
will have a play around now
thanks mate

Re: email notification flow

Posted: Wed Aug 09, 2017 11:58 am
by whitey666
ok so this now presents me with an other issue.
because the job is assembled it loses the names of each file which i have in the HTML file for the body copy in the email and the subject
I can change the subject to say 'The following files have been uploaded.....'
but then i need a list of the files uploaded in the body of the email
Ive attached a sample of what i have and how i need it to look
(not necessarily in red text but thats just showing the list etc)

The HTML file looks at [Job.Name:Space="trim",Before="_"] for the file name.
every file name ends ........._TN.jpeg

thanks in advance (if this is possible)

Re: email notification flow

Posted: Wed Aug 09, 2017 12:53 pm
by Padawan
If you want to get the files inside a jobfolder in Switch via variables, then you can use the Job.NestedName variable. So using this variable in your mail should fix your issue.

Re: email notification flow

Posted: Thu Aug 10, 2017 6:00 pm
by whitey666
Padawan,
Thanks this worked nicely
I did have to to make a slight adjustment which was to use separator <br> to get the names on to separate lines

[Job.NestedName:Separator="<br>",Space="trim",Before="_"]

thanks :)