Notion Append Block gives me "Unexpected end of JSON input" Error

I’m trying to setup a Notion workflow where I append blocks to an existing page.
However, I can’t seem to figure out what to pass to the Block Objects property, I always get a “Unexpected end of JSON input” error.

For instance I’ve tried:

[{
  "object": "block",
  "type": "image",
  "image": {
    "type": "external",
    "external": {
      "url": "https://pipedream.com/community/uploads/default/original/1X/d1ca7b10dc945ecc1cc921afeb6199f0380a4700.jpeg"
    }
  }
}
]

or even just

[]

Both give me the same JSON error. I don’t know what to try next, tbh.

Anybody have an idea?

Hello @lukas.pfahler,

First off, welcome to Pipedream! Happy to have you!

You’ll need to wrap your object into a Custom Expression syntax {{ }} to build the object yourself, for example:

{{ [
    {
        "object": "block",
        "type": "image",
        "image": {
            "type": "external",
            "external": {
                "url": "https://pipedream.com/community/uploads/default/original/1X/d1ca7b10dc945ecc1cc921afeb6199f0380a4700.jpeg"
            }
        }
    }
] }}

Then it should work

1 Like