Alex W.'s Blog

Custom JSON payload for *Get contents of URL* in iOS Shortcuts

The Get contents of URL action in iOS Shortcuts conveniently has a JSON payload type. However, this default type only supports objects at the top-level (e.g. {"key": "value"}, you can’t submit a top-level array (e.g. [{"key": "value"}].

To work around this create a Text action in which you manually author the JSON (e.g. [{"key": "VARIABLE"}]) and then use the magic value from that action as a File input in the Get contents of URL action.

alt