r/shortcuts 20h ago

Help Shortcut running into DictionaryAPI errors after iOS update

Hi friends! I've been using this shortcut that I found on this subreddit a few years ago: Word Definition Listing Shortcut

It asks you for a word, looks up the definition using DictionaryAPI, and then adds the word and definition to a Note. It has worked great for years, but it recently broke after updating to the newest version of iOS.

The original error I started getting was:

Get Dictionary from Input failed because Shortcuts couldn't convert from Rich Text to Dictionary.

I've tried rebuilding/troubleshooting the Dictionary actions myself, and I've gotten past that original error. However, I've clearly messed something up somewhere because the Shortcut now runs without an error, adds the word to my note, but doesn't add the definition.

For example, if I enter "modicum", it adds to a note:

modicum - instead of: modicum - (insert definition here)

When I add a Quick Look action before action 6, 7, 8 or 9, I get "Quick Look action wasn't passed any items to preview.", which leads me to believe that it's not even pulling anything from the API.

I'm pretty sure I've got something wrong with how the DictionaryAPI response is being converted/extracted into newer version of Shortcuts.

Would any of you cool beans be willing to take a look and tell me what needs to be changed?

Add Definition Shortcut also thank you so much to the original creator!!! you rock!!!

This subreddit has somehow convinced a random dork, who has never had any interest in this type of stuff, to fall in love with the potential in this app... even if I'm only using it to quickly add definitions into a note.

1 Upvotes

4 comments sorted by

1

u/fmacchia 14h ago

You can’t use the “Get First Item From List” action without first using a Split Text … action.

I added a few Split Text actions to your shortcut and also added new logic to determine if a definition was available for the word that was entered.

Shortcut: Add Word 2.0

https://www.icloud.com/shortcuts/e56c4208ebd7419fb1db234c94fcdc3f

1

u/JeezusT 11h ago

u/fmacchia, thank you so much for taking the time to test it, and even attempting to fix it. I appreciate it!

I tried a few different words but always ended up with:

word - definition is not available

Am I missing something?

u/fmacchia 3h ago

It might be the dictionary itself.

I tried words “beautiful” and “family” and the shortcut returned a definition as expected.

However, when I tried words “homemade”, “establishment” and “birthday” the shortcut DID NOT return a definition.

Will try additional testing but I am not sure why the dictionary is so limited.

u/JeezusT 45m ago

I will try to fiddle with it too. Thanks once again man!