New user migrating from callin.io.
I feel like I’m just missing something between the 2 applications (callin.io and callin.io)
workflow:
I make a AI agent output response as notion block API compliant. This responds with an array of blocks. I set the block option to the expression and I pass the array of blocks but I always get this error:
Bad request - please check your parameters
This version of the API does not support this type of block type. Please upgrade your API version.
Seems like this is a simple fix, there has to be a template, I just can’t find it. Since I’m new to callin.io, I don’t know how to format community topics properly. I’m sure many people encounter the problem of adding notion page content, so if you know how to do this, please help.
I will provide more information for my workflow if need, but I think someone in this community has solved this alreay.
Please provide the rewritten markdown content *it should be in the markdown format.
Are you switching from make to callin.io? That's great. Are you utilizing the AI agent for tool calls and block creation? Also, can you create a basic block via the API without issues, given that you're encountering permission/authentication problems?
The agent simply outputs an array of JSON object blocks formatted for the Notion API. callin.io could read the entire array of JSON and construct the page content, but n8n cannot.
I've figured it out; all I need to do is set the block name as the block type and the text as the content.
This is my agent's output:
[
{
"object": "block",
"type": "heading_2",
"heading_2": {
"rich_text": [
{
"type": "text",
"text": {
"content": "Overview"
}
}
]
}
},
{
"object": "block",
"type": "paragraph",
"paragraph": {
"rich_text": [
{
"type": "text",
"text": {
"content": "Cornell University offers one of the leading architecture..."
}
}
]
}
},
{
"object": "block",
"type": "heading_2",
"heading_2": {
"rich_text": [
{
"type": "text",
"text": {
"content": "Location"
}
}
]
}
},
{
"object": "block",
"type": "paragraph",
"paragraph": {
"rich_text": [
{
"type": "text",
"text": {
"content": "Cornell University is located in Ithaca, New York, USA..."
}
}
]
}
}
]
As you can see, I need to iterate through these blocks, and it should function correctly. This example demonstrates how it establishes the block type and its content.
My approach is to instruct the agent to output a Notion API block format, but only include the block's type and content. Then, I'll loop over the array of blocks, and it should work. If the output is malformed, I might just output the full array and use a module to parse the JSON objects.
I need to learn about:
- Looping
- Parsing
This guide explains how to properly format content for a Notion page.
In the user message for the AI message model, you must format the output to utilize the Notion Block API. Additionally, provide an example of the JSON output containing only the necessary parts: type
and content
.
The output will be used to create Notion page blocks via the Notion Block API. Employ all available blocks from the Notion Block API. When using a bullet list, remember that each item is a `type=bulleted_list_item`; it is not a single list containing all bullets.
Example output, an array of objects:
[
{"type":"heading_2", "content":"Overview"},
{"type":"paragraph", "content":"This college...."},
...
]
Subsequently, use the Code node to convert the message content into an array of JSON objects. Then, utilize the Notion Append Block node to create all the blocks.
Resulting Notion Page
This discussion was automatically closed 7 days following the last response. New replies are no longer permitted.