我创建了一个 Python 脚本来根据特定逻辑拆分 Notion 页面。这适用于除图像之外的所有块类型。我收到以下错误:{"object": "error", "status": 400, "code": "validation_error", "message": "body failed validation: body.children[0].image.external should be defined, instead was -undefined-."}
。问题可能是我从原始页面上的图像传递了一个内部 Notion url。JSON 看起来像这样:
{
"children": [
{
"object": "block",
"type": "image",
"image": {
"caption": [],
"type": "file",
"file": {
"url": "https://s3.us-west-2.amazonaws.com/secure.notion-static.com/79139e41-ff5e-46c9-9148-23b4d2be16d5/00006.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20211121%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20211121T203556Z&X-Amz-Expires=3600&X-Amz-Signature=c797152dde12edbc2b4991d6bfe017166a86aead6c49d96912ea2711cbdd3c2e&X-Amz-SignedHeaders=host&x-id=GetObject",
"expiry_time": "2021-11-21T21:35:56.923Z"
}
}
}
]
}
我做错了什么还是这个选项还不支持?我根据文档假设可以将现有的 Notion url 引用传递给 Append 块子端点。非常感谢您的回复。如果这行得通,那就太好了!雅科