I want to set up a Zap that extracts a URL from an email, downloads the pdf (from the public URL), and uploads it to Google Drive.
The problem is that there are multiple URLs in the email body so I can't use the Extract URL option. I was thinking I could use the Extract Pattern first to find the text that belongs to the URL.
So my Zap would be:
- Email matching search
- Extract pattern from email body
- Extract URL from the pattern
- Download pdf from URL & upload it to Google Drive.
In the email, there's a text link: "Click here to download a PDF of this order (URL)"
In Zapier, I've selected Customize Text and Extract Pattern. However, I have no idea how I need to define the pattern in Zapier. Can anyone help me with this?
Answer
Get specific url from an email
Best answer by Celine
I played around with a few settings and found another way to extract the URL.
Instead of having to write a script for Extract Pattern, I used Split Text.
So now the Zap goes:
- Email matching search
- Split Text email body (just before the specific URL I need)
- Extract URL from the split text
- Download pdf from URL & upload it to Google Drive.
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.



I need to see the pattern or the potential variants of the pattern before I can help, I think.
- The reason it’s important, is because there will normally be a set pattern