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.


Written by Alex Wendland, who is currently exploring fintech at Pinwheel. Here's a Twitter handle, a GitHub, some LinkedIn, ol' Facebook, or a hip Instagram if you're interested.