Do you receive a lot of emails that contain an URL address to download a file? Are you currently going through every email, clicking on the link and picking a location to save the file? Wouldn’t it be great if you could automate that process and have your files directly saved into a folder on your system without any clicks?
Enfocus Switch can do just that—it makes it easy to automatically download files from a URL address in your email!
Enfocus Switch is compatible with Mac and Windows, and with its user friendly “workflow” builder, it will take you less than 30 minutes to create an automation flow to grab files from links, giving you extra time to focus on new prospects and other work.
How Does it Work?
There are multiple ways to automatically download files from a URL address in your email using Enfocus Switch. This can be accomplished by using the Execute Command element (which requires Configurator Module) and a system command (or a console application), using the HTTP request element (included in Switch Core Engine), or using the Enfocus Switch Scripter scripting environment.
We are going to focus on the Execute Command element option in this article. The Execute Command element is a tool that executes a system command or a console application with the specified command-line arguments and output mechanisms. As of Switch 2019 Fall the Execute Command tool is included in the Switch Core Engine.
If you’d like to know more about the HTTP request or other options, please contact us.
Flow Configuration (Mac)
Let’s imagine that our email content contains the following URL that we want to automatically click on and download: https://s3-us-west-2.amazonaws.com/pressbooks-samplefiles/MetamorphosisJacksonTheme/Metamorphosis-jackson.pdf
First, we create a flow as follows in Enfocus Switch:
Next, select the Execute Command element and go to the properties.
Execute Command Configuration
We are going to use a Curl Command in our Execute Command element. cURL is available on both Mac and Windows.
For the Command or path add the following, which is where cURL is located on our Mac.
The “Arguments” is where we put our command. Please click on the > and choose “Define single-line text with variables”.
Type the following into the “Text with variables field” (see picture below):
Then select Email>Body in the top part of the panel (see above picture) and in the search field on the right hand side type:
This is our regular expression. Now we are going to look into the email body for the URL. Of course if your email body looks different, or you have a http (not https) link, then you will have to adjust the regular expression. You can find more information on regular expressions here.
Don’t forget to click on “Insert variable” to add the variable into our “Text with variables” field.
Next step, make sure you have a straight quote mark before and after the variable. Your result should look like this:
There’s one more thing to configure in the Execute Command properties: the Output. As we will be getting a file from the server, we choose “File at path”. The other options are No and Automatic.
The Execute Command element is now configured.
For the Mail Receive element, make sure to configure all the properties that are colored red. To be able to use the variable “Email.Body”, which we have used in the Execute Command element, set the property “Attach email info” to Yes.
For the “Out” folder, select the Path property and browse to any folder on your system. All the files will end up in the selected folder.
That’s it! You are now ready to automatically download files from a URL address in your email.
Imagine the hours you can save by running this little flow! Not having to deal with all the different clicks, downloads and filing will allow you to use your precious time for more complex processes in your work.
If you would like Enfocus Switch to save the files into a folder with the date or with the name of the person sending the file, you can add that to the flow as well. If you’d like to learn more, please contact us today.