Hi,
I need to insert an image to notion column block. I am using the Make an API call module.
- Creating 3 columns with text content works well (see request 1).
- Inserting an image works (see request 2).
But I can’t find a way to insert the image to one of the columns.
I also tried to do it in multiple steps - first creating the column list, columns and a paragraph in each of them. Then using the GET children request to obtain the IDs of columns and then using the PATCH children again with the Request 2 body content. Did not work. Well - I have the image in my notion page, but not in the column. (The block ID in URL matches the column ID, I checked 3 times.)
Any time I try to merge the requests to just one and insert the image when creating a column, I get [400] Error parsing JSON body, event though JSON is ok. I suppose this is simply because the parser on the other side does not know my JSON structure.
As to official documentation, I read it, but I miss examples for my use case.
Any ideas how to do this?
scenario.blueprint (1).json (115.7 KB)
Request 1:
{
“children”: [
{
“object”: “block”,
“type”: “column_list”,
“column_list”: {
“children”: [
{
“object”: “block”,
“type”: “column”,
“column”: {
“children”: [
{
“object”: “block”,
“type”: “paragraph”,
“paragraph”: {
“rich_text”: [
{
“type”: “text”,
“text”: {
“content”: “Text v prvním sloupci”
}
}
]
}
}
]
}
},
{
“object”: “block”,
“type”: “column”,
“column”: {
“children”: [
{
“object”: “block”,
“type”: “paragraph”,
“paragraph”: {
“rich_text”: [
{
“type”: “text”,
“text”: {
“content”: “Text ve druhém sloupci”
}
}
]
}
}
]
}
},
{
“object”: “block”,
“type”: “column”,
“column”: {
“children”: [
{
“object”: “block”,
“type”: “paragraph”,
“paragraph”: {
“rich_text”: [
{
“type”: “text”,
“text”: {
“content”: “Text ve třetím sloupci”
}
}
]
}
}
]
}
}
]
}
}
]
}
Request 2:
{
“children”: [
{
“type”: “image”,
“image”: {
“external”: {
“url”: “https://www.notion.so/images/logo-ios.png”
},
“type”: “external”
},
“object”: “block”
}
]
}
