iOS Shortcut Actions for Micropub posting

I recently lamented about how few options there are for Micropub posting on iOS now that Indigenous was pulled from the app store. I had a hunch that the Shortcuts app could be a solution since Micropub takes pretty simple cURL requests, and after some testing to figure it out I put together a set of three Shortcuts to do the most popular Micropub actions. You can install them from the iCloud links:

  1. Like, Reply, Bookmark, or Repost a URL
  2. Post a Note
  3. Post a Note with an Image

The first time you install one of these Shortcuts, you’ll be prompted to provide your Micropub endpoint and an IndieAuth token with the scope create profile update media.

How do they work?

They essentially take inputs (a URL or text) and make a curl POST request to your Micropub endpoint with a Bearer token that you provide on initial setup. Then it gives you the option to open up the URL for your post to take a look at it.

The Like/Reply/Bookmark/Repost action has a bunch of conditionals to handle each action a little differently.

The Post a Note with an Image action makes two separate curl requests: One to the Media endpoint for posting the image (which is automatically converted to a JPEG since most sites and browsers don’t support HEIF), the URL for which is then stored as a variable, then one to the regular endpoint with your note text and the image you wanted to post. I couldn’t actually get the “photo” parameter to work in the curl request, so I did it the old fashioned way and appended an HTML img tag to the “content” parameter. I also add a class micropub-img for easy styling. If anyone figures out how to get the photo parameter to work with the curl request, I’d be happy to update the action accordingly.

Some screenshots

The Like and Reply actions:

Regular Note action:

The Note with Image action:

Videos of the Shortcuts in action

Demonstrating the Like action on a URL:

Demonstrating posting a regular Note from a Shortcut added to my Home Screen:

Demonstrating posting an Image with a Note:

Syndicated to IndieNews

Likes, Bookmarks, and Reposts

  • ChrisLTD
  • Amanda Carson
  • David Bisset
  • @courtneyr_dev 🌻 at #WCAsia
  • @courtneyr_dev 🌻 at #WCAsia
  • FaebornNetworks
  • Marty McGuire
  • Matthew Cassinelli
  • Serena
  • Serena
  • Serena
  • Carl
  • Carl

5 responses to “iOS Shortcut Actions for Micropub posting”

  1. Chuck Grimmett Avatar

    I made them because of how few options for interacting with Micropub there are on iOS. Shortcuts seemed like a natural solution.

  2. Chuck Grimmett Avatar

    Here is a video of how easy it is to Like an article with the Shortcut:

  3. […] Here is my shortcut for posting to a WordPress blog via Micropub. […]

  4. Carl Avatar

    I’m seeing the error message:

    “Get Dictionary Value failed because
    Shortcuts couldn’t convert from Rich
    text to Dictionary.”

    All three actions appear to work successfully. But opening the link doesn’t work as it displays the error prior to showing the question.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: