Click on a specific link in an email

I would like to have a macro which parses the body text (a lot of times with HTML) of an email and looks for any embedded links under a specific word (i.e. unsubscribe) and clicks on that link. I can easily copy the entire body of an email into a clipboard but I don't know how to do the "click on the HTML link under the word unsubscribe" part. Here is an example email body:

I want to click on that word "Unsubscribe".

Here is how that body copies to a clipboard:

Only while supplies last. Offer by artist, not Spotify. You will complete your purchase on a third party website. Any activity, including purchases made, on the third party website shall be governed by such third party's terms and conditions and privacy policy. Merch shown is the property of its respective owner. Links and information about this item, including pricing and currency, are from the merchandise seller and subject to change. Sellers may charge additional fees, which may vary. To learn more about reporting offensive, infringing or illegal content to Spotify, visit Support - Spotify.

Spotify Logo

Get Spotify for: iPhone iPad Android Other

This message was sent to. If you don't want to receive these emails from Spotify in the future, you can edit your profile or unsubscribe.

Terms of Use Privacy Policy Contact Us

Spotify USA Inc, 4 World Trade Center, 150 Greenwich Street, 62nd Floor, New York, NY 10007, USA

Rather than trying to click on a link, I think I would try the following.

  1. Copy to clipboard – which you have done.
  2. Search the clipboard for a suitable regular expression* and set that to a variable (in that same action).
  3. Open the URL that is in that variable.
  • Try (\S*?unsubscribe.*?) but it isn't easy to see from your post what the URL in your example is. If you want to post the relevant section of your example again, add a line with three backticks above and below the extract – this will ensure that it is presented as raw text.