Follow Mastodon User on Shortcut

2022-11-03 has support for following and replying to Mastodon users but getting from someone's profile on Mastodon to the follow page on can be a pain. To search for a user you need have it in the format of cooluser@mastodon.instance which isn't the same as the profile URLs. To make this easier I made a shortcut that does the following:

  1. Takes the current Safari URL, for example https://mastodon.instance/@cooluser
  2. Gets the domain (mastodon.instance) and the path (@cooluser)
  3. Swaps those round to become cooluser@mastodon.instance
  4. Opens the page on to be able to follow that user (

It will also check to see if the path/username contains an @ symbol and if it doesn't will show an alert instead. This isn't ideal but given that Mastodon can have any domain, it's much harder to detect if it's a Mastodon site or not.

There is a meta tag in the HTML with profile:username as the property name but I don't know enough about Shortcuts to do this.

Download Follow Mastodon User on shortcut v1.1

Previous Versions