Need help: POST to WordPress using nested JSON array in Shortcuts

Hi,

I’m trying to post to my micropub-enabled Wordpress blog using the “Get Contents of URL” action in Shortcuts, and I’m running into problems.
I’m not really techy, I just cut and paste my way through a lot of my automation, so I’m hoping someone can help me.

This is an example of the JSON I’m trying to send:

{
  "type": ["h-entry"],
  "properties": {
    "summary": ["Want to read: Title by Author, ISBN: ISBN"],
    "read-status": ["to-read"],
    "read-of": [
      {
        "type": ["h-cite"],
        "properties": {
          "name": ["Title"],
          "author": ["Author"],
          "uid": ["isbn:ISBN"]
        }
      }
    ]
  }
}

It’s a nested JSON array and I don’t know how to do that in Shortcuts.

The screenshot doesn’t match the code above exactly - I was testing something when I took the screenshot - but it illustrates what I was trying to do. I’d attempted to:

  • nest a dictionary within the Request Body section and it gets ignored
  • nest a text variable as text, but it would wrap the entire text block in quotations
  • select “JSON” in the Request Body section and point it at a text variable with the entire JSON array
    • this worked, however, I also want to post an image which I could do if I use the “FORM” method, but I don’t know how to embed an image in a JSON array that’s a text variable.

Help please?