app.loshadki

How to open Reddit links on macOS in Apollo app

    • openin
    • reddit
    • apollo
    • productivity
  • modified:
  • reading: 4 minutes

Apollo is a great alternative Reddit application for iOS. And the developers allow us to install it on macOS. Sometimes I find it way better to browse Reddit using Apollo on macOS than to use a browser.

If you are like me and use email for most notifications and communications, you might have subscribed to have all Reddit notifications go to your email.

I have decided to play with OpenIn and figure out how I can open Reddit links from emails right in the Apollo app.

Just a note, you need to be using OpenIn version 3.0.3 or above, which is available on App Store and SetApp.

Reddit Email

If you look at the raw links from the email addresses, they look like this:

https://click.redditmail.com/CL0/
https:%2F%2Fwww.reddit.com%2Fr%2Fmacapps%2Fcomments%2Fr7b4yx%2F
openin_v3_is_out_and_40_off_for_a_week%2Fhn0mt18%2F%3F$deep_link=true
%26correlation_id=b7cc0b2d-66db-4dd2-a101-e7786868ca5a%26ref=email_post_reply
%26ref_campaign=email_post_reply%26ref_source=email/3/
0100017d7e24c980-e9b0c92a-e98d-498e-aff6-8eb446620001-000000/
yGlIL0u28XMdjddv_6Wog4QoLjyPFmb5Fg3rNkpmOrs=226

The interesting part is hidden in the path. After /CL0/ you can clearly see the URL of what we are trying to visit.

And if you try to URL-decode it, this is what you get:

https://www.reddit.com/r/macapps/comments/r7b4yx/openin_v3_is_out_and_40_off_for_a_week/
hn0mt18/?$deep_link=true&correlation_id=b7cc0b2d-66db-4dd2-a101-e7786868ca5a&
ref=email_post_reply&ref_campaign=email_post_reply&ref_source=email/3/
0100017d7e24c980-e9b0c92a-e98d-498e-aff6-8eb446620001-000000/
yGlIL0u28XMdjddv_6Wog4QoLjyPFmb5Fg3rNkpmOrs=226

And it turns out that to send this link to Apollo you just need to convert the scheme https to apollo.

Let’s play with OpenIn to figure out how we can send those links from Emails directly to Apollo.

Step 1. Make sure Apollo is installed on Mac

First, we need to go to the App Store, search for Apollo and switch to iPhone & iPad Apps, and install it.

Mac App Store

Step 2. Add Apollo as a browser app in OpenIn

Open the OpenIn Preferences dialog. Select Links->Browsers, and add the Apollo app as a browser. You will see that Apollo does not support the https scheme, so we will enable the “Rewrite URL” rule, and use the example to change the protocol to apollo.

url.protocol = "apollo"

And to test it, we will try the URL https://ww.reddit.com/r/apolloapp, which will result in apollo://ww.reddit.com/r/apolloapp.

After that, all the links that we send to Apollo will be modified, by replacing the scheme from https to apollo.

Step-2-Configure-Apollo

Step 3. Configure a rule

On the next step we will go to Rules and add a new rule that will activate only for domains *.reddit.com and *.redditmail.com. The first one is just in case we have a Reddit link clicked anywhere, and the second one is for the links that we receive in emails.

In my rule I want to see a selection of the Apollo app and Safari browser, in case I need to open this link in Safari.

And I will use JavaScript to change the URL from redditmail.com to reddit.com only for links that have the domain redditmail.com, as reddit.com links we can send directly to Apollo.

if (ctx.url.hostname.endsWith('redditmail.com')) {
    ctx.url.href = decodeURIComponent(ctx.url.pathname.split("/", 3)[2])
}

Step-3-Reddit-Rule

Step 4. Let’s test it!

We will try both links that we have received in email with the domain redditmail.com and that we can get anywhere else (like Slack or Twitter) with the domain reddit.com, and we will try to open them directly in Apollo and in Safari as well.

The App Selection dialog is the one provided by OpenIn.

Test

Summary

OpenIn 3 provides you with a great tool for rewriting URLs and saving time by opening links and files in the applications that you want instead of going through the browser. There are a lot of native apps that exist that can open those links from email directly in the apps with the help of OpenIn. You just need to know the format of those links. Most of the time you can just change the protocol from https to the one supported by the app. And OpenIn pre-populates the list of examples with the URLs that we know the app supports.

A few examples: Music, Notion, ClickUp and more. OpenIn also has built-in support for Zoom meeting links.

OpenIn is available from our website as a 14-day trial, it is on discount at the App Store (40% off until December 10th), and available through a subscription to SetApp.