Hello,
I work with Notion where a page content is an array of multiple blocks.
This is the output I get:
[
{
"object": "block",
"id": "3209dc63-2dbd-475a-bad6-7cadce636994",
"parent": {
"type": "page_id",
"page_id": "184f6a9e-5cc3-44c0-ae1d-2460d658b82b"
},
"created_time": "2023-12-13T07:18:00.000Z",
"last_edited_time": "2023-12-13T07:18:00.000Z",
"created_by": {
"object": "user",
"id": "7efbecbd-cb46-4d65-8b89-9202e3ebd39b"
},
"last_edited_by": {
"object": "user",
"id": "7efbecbd-cb46-4d65-8b89-9202e3ebd39b"
},
"has_children": false,
"archived": false,
"type": "paragraph",
"paragraph": {
"rich_text": [
{
"type": "text",
"text": {
"content": "Article content 2 lorem impsum bla bla bla",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Article content 2 lorem impsum bla bla bla",
"href": null
}
],
"color": "default"
},
"__IMTLENGTH__": 3,
"__IMTINDEX__": 1
},
{
"object": "block",
"id": "06ec6c19-9799-46b1-8df2-98a687f7c34f",
"parent": {
"type": "page_id",
"page_id": "184f6a9e-5cc3-44c0-ae1d-2460d658b82b"
},
"created_time": "2023-12-13T07:19:00.000Z",
"last_edited_time": "2023-12-13T07:19:00.000Z",
"created_by": {
"object": "user",
"id": "7efbecbd-cb46-4d65-8b89-9202e3ebd39b"
},
"last_edited_by": {
"object": "user",
"id": "7efbecbd-cb46-4d65-8b89-9202e3ebd39b"
},
"has_children": false,
"archived": false,
"type": "paragraph",
"paragraph": {
"rich_text": [
{
"type": "text",
"text": {
"content": "Paragraph 2 bla bla bla",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Paragraph 2 bla bla bla",
"href": null
}
],
"color": "default"
},
"__IMTLENGTH__": 3,
"__IMTINDEX__": 2
},
{
"object": "block",
"id": "66530c16-abf8-41bd-bc46-370ecb84ab90",
"parent": {
"type": "page_id",
"page_id": "184f6a9e-5cc3-44c0-ae1d-2460d658b82b"
},
"created_time": "2023-12-13T07:18:00.000Z",
"last_edited_time": "2023-12-13T07:18:00.000Z",
"created_by": {
"object": "user",
"id": "7efbecbd-cb46-4d65-8b89-9202e3ebd39b"
},
"last_edited_by": {
"object": "user",
"id": "7efbecbd-cb46-4d65-8b89-9202e3ebd39b"
},
"has_children": false,
"archived": false,
"type": "paragraph",
"paragraph": {
"rich_text": [],
"color": "default"
},
"__IMTLENGTH__": 3,
"__IMTINDEX__": 3
}
]
I need to concatenate, or merge, or connect together all paragraphs into one article. So I need to work only with plain_text (or content, there are the same).
I tried everything, I cant put them together…
Could you please help me somehow?