Downloading links from Emails

Post Reply
Paul@9ish
Newbie
Posts: 5
Joined: Wed Jan 13, 2016 7:25 pm

Downloading links from Emails

Post by Paul@9ish »

I am trying to create a flow that will monitor an email address, when an email that contains a hyperlink comes in it automatically downloads the hyperlink to separate folder. I'm fairly new to Switch so any basic help will be appreciated.
User avatar
gabrielp
Advanced member
Posts: 577
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: Downloading links from Emails

Post by gabrielp »

Someone did something similar here: http://forum.enfocus.com/viewtopic.php? ... 207&p=4117

You might be able to do some regex on the email body to find multiple links based on the key 'href="'. But, I don't know if this is such a great idea. It seems like a big security problem to have any link get downloaded by your system when spam is so prevalent these days. Not to mention, people have so many hyperlinks in their emails, you might download their webpage and whatnot.

Anyways, once you get your link, you'll pull it through the HTTP configurator with the type set to GET and it will download the file. So your challenge is parsing the email to find the link. If you want to support more than one link, you might need the scripting module to accomplish this.

If you'd like to expand some more on the business reason for doing this, I bet we can help you come up with a better way.
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Paul@9ish
Newbie
Posts: 5
Joined: Wed Jan 13, 2016 7:25 pm

Re: Downloading links from Emails

Post by Paul@9ish »

Thank you for your response. Here is a little background on what we are trying to accomplish.

We receive emails from a StoreFront account where the customer files out all the needed info and it generates a PDF file, sets it into an email as a hyperlink and then sends us the email as an order. Right now we are manually opening up the emails, downloading the hyperlink, changing the name of the PDF, and placing the PDF into a folder onto a server.

We would like to automate this process so that we can drop the renamed PDF into a hot folder for the NexPress.

What I can not seem to get is how to make Switch look for the email and download the hyperlink.

I am not versed in scripting. And we are fairly new to automation.

Paul
User avatar
gabrielp
Advanced member
Posts: 577
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: Downloading links from Emails

Post by gabrielp »

Paul, what storefront software are you using? We have a similar workflow for PageDNA. But instead of pulling links from the emails that go out, we instead found that PageDNA could deliver to an FTP directory which is much simpler and more robust. I think you should explore other file delivery methods from your storefront vendor, besides email.

That said, do you have the scripting module? It's a paid addon for Switch.
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Paul@9ish
Newbie
Posts: 5
Joined: Wed Jan 13, 2016 7:25 pm

Re: Downloading links from Emails

Post by Paul@9ish »

The email that we receive is from a third party and they use Printable. And yes we have the Scripting module. If it would help I could send you a sample email that comes to us.
User avatar
gabrielp
Advanced member
Posts: 577
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: Downloading links from Emails

Post by gabrielp »

Paul@9ish wrote:The email that we receive is from a third party and they use Printable. And yes we have the Scripting module. If it would help I could send you a sample email that comes to us.
If you send me a sample of the email, I should be able to help you out.

But I'm 100% sure Printable has a better way of automating jobs. You might want to ask your third party if they can go directly to printable to see if there are other file delivery options.
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Post Reply