Example - Passing a dictionary to a shortcut from macOS

Posted on
Mon Mar 06, 2023 9:43 am
anyone offline
User avatar
Posts: 125
Joined: Apr 03, 2011
Location: Norfolk, VA

Example - Passing a dictionary to a shortcut from macOS

I knew you could pass arguments but never found a use, until recently.

Code: Select all
shortcuts run "pass to indigo" <<< '{"message":"indigo.device.toggle", "objectId":"1252158401", "Key Location":"Indigo API Key 2"}'


MODERATOR'S NOTE: amended post title to include "Example"

Posted on
Mon Mar 06, 2023 12:24 pm
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Passing a dictionary to a shortcut from macOS

That's an excellent tip. Thanks for sharing it! I'm going to add your example to the docs. I'm also going to amend the title of your post to include "Example" to make it easier to find.

One note for folks who may try to run this command from within Indigo: you can't use pipes from the Indigo "Run Shell Script" action item. There's a bit of a hack listed in the docs to get around this. It involves using a shell script as an intermediate step.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests