Run Shell Script with Magic Variable from Dictionary (Value)

Hello! I am creating a Shortcut to help with my meeting preparation. I have recurring meetings and related web-based documents that I keep tab of the agenda, notes, etc. Each of this has a direct URL that I want to open when it is time for my meeting (either prep or during the meeting time).

I created a Shortcut with these steps:

Dictionary > Choose From List > Run Shell Script

The issue I am having is that the Value from the Dictionary is not passed to the Run Shell Script step. I right clicked in the Run Shell Script box and added the Magic Variable in the script.

I could use “Choose from Menu” to accomplish this yet think it would be more manageable to update the Dictionary as my regular meetings may change.

If you are wondering why, the reason I am using Run Shell Script in lieu of Open URLs is that I want to open the URL for each in Chrome.

Any help would be greatly appreciated!

UPDATE: Added a sanitized screenshot.

Can you share a sanitised version of your shortcut? A text description like this leaves out much of the detail of what you have actually set up.

1 Like

Thanks for the suggestion! Added to the original post. Let me know if there are other details that would be helpful.

I’m afraid you have misunderstood. When I say “of your shortcut”, I very much mean the shortcut as it would be, not a picture of it.

To clarify, I am suggesting you make a copy of your shortcut that reproduces the issue but contains no sensitive or personal information. Something you can comfortably share with others. Then share a link to that shortcut. When you do that others can download it, run it, s bug it, and make suggestions.

An analogy might be asking a mechanic what’s wrong with a car without being able to touch it, hear it or see it running. Just from a picture of the car. It isn’t necessarily impossible to do, but it’s a lot easier with a bit of access to try stuff.

In the immortal words of Homer J Simpson, “D’oh!”

iCloud link to a scrubbed shortcut.

1 Like

Just from a quick glance at your screenshot: is there a double input going to the shell script? It looks like the whole dictionary is being passed to stdin and the dictionary value is being passed as an argument as well.

I’m not sure what the correct approach would be here. Maybe remove the dictionary value from the command text, then put the dictionary value in the input field, and pass the input as arguments instead of to stdin? I’ll let someone more experienced confirm the right way to handle this.