Question

Download URL from email


Hi Guys,

 

Hopefully someone can help me here. 

 

I am looking into a potential automation to download URL from email.

Essentially I run a photo service company. A third party company will email me with a online URL link in email that sends me to a file delivery service to download the photos. Usually, when I do this, it normally downloads a zip file. 

I am wondering if I can use an email parser tool to extract the URL from the email and automatically download and save somewhere (i.e. dropbox/google drive) 

Would this be possible? 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

12 replies

Userlevel 4
Badge +6

Hi @Cheecam 

Yes, you can try the email parser by Zapier app to get the URL from the email and if you run into issues, you can go back here and ask questions.

So, i have email forwarding set up that sends the email to the email parser app. 

I have the URL in the email.


If I set up a zap from Email parser to Google Drive, what action task would it be? 

 

Would it be “upload file” or what would it be? 

Also, 

 

The URL is in the main message of the email, 

 

right now zapier cannot retrieve the URL. How should I do this? 

Userlevel 7
Badge +6

Hey @Cheecam,

The Email Parser app should return all of the necessary data when set up correctly in Email Parser. One of our Community Members ran into a similar problem, and here’s how they found a solution:

Also, I suggest using the Upload File action in Google Drive if you want to automatically download the files and save them somewhere.

This is the email I get. I want to take the URL they provide and be able to “download” it.

The email parser was able to get the URL and I was able to use extract URL feature. The issue is most of the time it is just passing the URL on and not actually “downloading”

I checked out the other thread of the community member and it was actually the one I followed earlier and couldn’t figure it out.

Userlevel 7
Badge +11

Great question, @Cheecam! 🙂

It won’t be possible to get the download URL for the file itself from the email. But, I know it’s possible to get the contents of a Google Document using a webhook, so I’m thinking that in a similar way you could use a webhook to “visit” the downloads page and get the source code for the page returned. Then you could potentially extract the download link that you need from the code that’s returned using Formatter to extract it.


It would be a similar setup to how the GET (Webhooks by Zapier) action was, but instead of putting a file in the URL field, you’d put the download page URL that is parsed from the email. I don’t know the URL of that download page so I’m unable to double-check whether you’d definitely get the link for that download button. The source code would likely be truncated so that part may be cut off from the response, but may be worth trying out just in case it’s not.

If the link isn’t cut off in the source code that’s output for the webhook then you’d need to use a Formatter (Text > Extract Pattern) action to pull out the download URL for the file from the source code. Happy to help figure out the regex pattern you’d need to use for that if you run into any trouble.  

One thing I should mention is that Webhooks by Zapier isn’t available on a Free plan so depending on what plan you’re on this may not be an ideal solution here. If you do give that a try or find a different workaround here please let us know. Eager to know how you get on with this!

I checked the download link and it looks like it is using API / Gets? 

https://1011.filemail.com/api/file/get?compressedfilekey=(other numbers that I removed)

 

So, i’m not sure how to get this URL. How could i “visit” a page and get it from the source code?

Userlevel 3
Badge +4

Hi @Cheecam

When you click on the “FTP” option does it automatically download the file? Or does it route you to a page where you can download the file?

Also, where would the file be saved in case all this is possible?

Looking forward for your response!

Userlevel 4
Badge +6

Hi @Cheecam 

I want to clarify, what do you mean by “downloading”? Are you expecting the file to be downloaded to your device?

If that’s the case, it isn’t possible because we can only send the file to an online storage services like Google Drive, OneDrive, dropbox, etc.

Also, is the actual link a publicly downloadable file or is it pointing them to a page?

I would like it to be downloaded and sent to dropbox.

I am not sure if it is a public link. My guess is it is not since they send it to me privately. 

Userlevel 4
Badge +6

Hi @Cheecam 

Zapier doesn’t download the data, we only pass them from the trigger to the action step.