Creating an iOS shortcut to add RSS news feeds to Miniflux
Overview
Miniflux is a minimalist RSS feed reader. It does not have an iOS application to facilitate adding new feeds through the share button. To compensate, I created an iOS shortcut which uses the Miniflux API to discover the RSS URL and add it to the feeds list.
Installation Instructions
- Create and copy an API key here: https://reader.miniflux.app/keys
- Determine the category ID for all new feeds here: https://reader.miniflux.app/v1/categories
- Save the API key and Category ID. The import process will ask for this information during installation.
- Download the shortcut here: https://www.icloud.com/shortcuts/dddc998202db45b7931c254781df3beb
Select Get Shortcut
:
Select Add Untrusted Shortcut
:
Fill in the API Key
and Category ID
:
Adding a Feed Example
After installation, attempt to add an RSS feed to Miniflux.
From Safari
click Share -> Add to Miniflux
:
Notification from discovery:
Notification after adding feed:
Creation Details
Details for creating the Add to Miniflux
shortcut:
The shortcuts accepts a URL as input from the share
button and stores the value in the SHAREURL
variable:
To facilitate sharing this URL without hardcoding my API keys, we set two additional variables.
The Miniflux API key is stored in APIKEY
and the default category is stored in CATEGORYID
. When a user imports a shortcut for the first time, import questions
prompt for the API key and default category:
When a URL is posted
to the https://reader.miniflux.app/v1/discover
API endpoint, Miniflux will attempt to discover the RSS feed URL. The url
is returned in a json
structure. The scripting
module parses and sets a dictionary value
variable with the contents of the URL:
Notifications display the discovery results:
After discovery, the URL it is posted
to the API endpoint https://reader.miniflux.app/v1/discover
. Miniflux will attempt to add the feed in the default category:
Notifications display the feed add results: