Environment
item | value |
---|---|
n8n version | 1.97.1 (Cloud) |
Workflow ID | redacted |
Node | Notion (n8n-nodes-base.notion) v2.2 |
Resource/Operation | databasePage → create |
Notion DB prop | “Post Content” – type ![]() |
Error | NodeOperationError: texts is not iterable |
Goal
Populate a Notion database with social-media posts.
“Post Content” must land in a Rich-Text property so that formatting links & hashtags survive.
What I’m sending to Notion
The Code node (second-to-last step) prepares every post like this:
js
CopyEdit
return items.map(item => {
const posts = JSON.parse(item.json.message.content);
return posts.map(post => {
return {
json: {
ID : post.ID,
Name : post.Name,
Channel : post.Channel,
"Post Date" : new Date().toISOString().split("T")[0],
Day : post.Day,
/* ← Rich-Text payload (Notion expects an array of objects) */
"Post Content": [
{
type : "text",
text : { content: post["Post Content"] }
}
],
"Source Blog" : post["Source Blog"],
Status : post.Status,
Views : null,
"CTR %" : null,
Link : ""
}
};
});
}).flat();
How the Notion node is configured
- Database: the correct DB (checked twice)
- Post Content → Type: Rich text (created in Notion UI)
- Post Content → Value:
={{ $json["Post Content"] }}
- Everything else maps 1-for-1 and works.
Full error & stack-trace
json
CopyEdit
{
"errorMessage": "texts is not iterable [item 0]",
"n8nVersion": "1.97.1 (Cloud)",
"nodeName": "Notion",
"nodeVersion": 2.2,
"time": "2025-06-19 16:43:32",
"stackTrace": [
"NodeOperationError: texts is not iterable",
" at prepareNotionError (…/nodes/Notion/shared/GenericFunctions.ts:1215:9)",
" at ExecuteContext.execute (…/NotionV2.node.ts:394:14)"
]
}
What I tried
- Verified the Rich-Text structure matches Notion API docs (array → object → text → content). developers.notion.com
- Confirmed other people see the same “texts is not iterable” message when the inner structure is wrong. community.n8n.io
- Re-created the DB property from scratch (type = Rich text).
- Switched the property to plain “Text” → works, but I lose formatting.
Ask
- Is the JSON structure above correct for the Notion node?
- Do I need an extra wrapper level (e.g.
rich_text
) before the array? - Any idea why the Notion node still thinks
texts
is not iterable?
Thanks a ton for looking into this!