Updated 01212025-073804
4917A4C2-47F0-42B2-A029-1B34C60A1B20
Shortcuts | |
---|---|
Find Books | List all books or filter by properties (type, folder, tags, …). |
Find Annotations | List all annotations or filter by properties (type, folder, …). |
Launch App | Open app destination (app, reader, library). |
Continue Reading | Continue reading your current book. |
Current Book | Get your current book. |
Open Book | Open book in the app. |
Save Book | Save original book file. |
Export Book | Save book metadata and annotations in text, markdown or json format. |
Current Annotations | Get all annotations of your current book. |
Open Annotation | Open book annotation in the app. |
Export Annotation | Save annotation metadata in text, markdown or json format. |
Readwise Service | Upload annotations to Readwise service. |
Individual books can be exported in text, markdown or json format with the Export Book shortcut. It can be used together with the Current Book or Find Books action, which lets you get a filtered list of books to automate saving metadata and annotations of all your books.
Export book (example)
Export current book (example)
Export all books (example)
You can save all original book files to create a backup of your library on iCloud Drive with the Save Book shortcut.
Save all books (example)
It’s also possible to re-create the folder structure but it’s a bit difficult to get this to work with the Shortcuts app. You will need to modify the save books shortcut to get the folder name and file name to define a custom subpath for the Save File action.
Save books folder (example)
Note: This shortcut can fail with “Couldn’t communicate with helper application”, this is an error message from the Apple Shortcuts app. Most likely the problem is that it runs out of memory with large files. As a workaround, try to run the shortcut from your Mac or from a device with more memory. As an alternative, you can also set a filter in the Find Books action to only save epub formats and exclude large file types such as pdf or comics.
You can export individual annotations in text, markdown or json format with the Export Annotation shortcut.
Export annotation (example)
Another option is to create your own annotation export. You can use the Find Annotations shortcut to get a filtered list of all annotations or the Current Annotations action to save all annotations of your current book.
Export all annotations (example)
This example iterates over all annotations and creates a new dictionary for each entry with specific annotation properties. The result output can be used as a json payload to upload highlights to external services.
Yomu includes a convenience shortcut to upload highlights to the Readwise service. It can be used to upload all or selected highlights with the Find Annotations action or to just upload the Current Annotations of a book.
Upload highlights (example)
Upload current highlights (example)
You can obtain your personal Readwise access token from their service https://readwise.io/access_token
With Shortcuts, annotation export and upload to external services can be automated. Here is an example for Readwise, but the same concepts can be used for other service APIs as well.
Service upload (example)
In summary, the shortcut transforms your annotations to the required json structure and uploads it to the Readwise highlights API endpoint. The text conversion is a workaround, because the Get Contents action somehow does not accept dictionaries for json body type inputs. This solution is based on the custom json payload approach published in Alex W.’s blog.
This approach will only work with more than one annotation. The problem is that the Shortcuts app somehow converts list output to an object instead of an array if there is only one item contained. You would need to modify the shortcut to handle zero/one or multiple annotations.
How you structure or upload highlights depends on the service. Refer to their documentation to learn more: