can't update Notion database while using tool #526

Closed
opened 2026-02-16 10:19:39 -05:00 by yindo · 6 comments
Owner

Originally created by @huytd2004 on GitHub (Aug 6, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.7.1

Cloud or Self Hosted

Cloud

Steps to reproduce

when I use Update Notion Database with the following Database Properties:

{
  "Grocery item": {
    "type": "title",
    "title": [{ "type": "text", "text": { "content": "Tomatoes" } }]
  },
  "Price": {
    "type": "number",
    "number": 1.49
  },
  "Last ordered": {
    "type": "date",
    "date": { "start": "2021-05-11" }
  }
}
Image

✔️ Expected Behavior

i want to update here

Image

Actual Behavior

I get the following error:

{
  "text": "Bad request: Notion API Error: validation_error - body failed validation. Fix one:\nbody.properties.Grocery item.number should be defined, instead was `undefined`.\nbody.properties.Grocery item.formula should be defined, instead was `undefined`.\nbody.properties.Grocery item.select should be defined, instead was `undefined`.\nbody.properties.Grocery item.multi_select should be defined, instead was `undefined`.\nbody.properties.Grocery item.status should be defined, instead was `undefined`.\nbody.properties.Grocery item.relation should be defined, instead was `undefined`.\nbody.properties.Grocery item.rollup should be defined, instead was `undefined`.\nbody.properties.Grocery item.unique_id should be defined, instead was `undefined`.\nbody.properties.Grocery item.title should be an object, instead was `[{\"type\":\"text\",\"text\":{\"content\":\"Tomatoes\"}}]`.\nbody.properties.Grocery item.rich_text should be defined, instead was `undefined`.\nbody.properties.Grocery item.url should be defined, instead was `undefined`.\nbody.properties.Grocery item.people should be defined, instead was `undefined`.\nbody.properties.Grocery item.files should be defined, instead was `undefined`.\nbody.properties.Grocery item.email should be defined, instead was `undefined`.\nbody.properties.Grocery item.phone_number should be defined, instead was `undefined`.\nbody.properties.Grocery item.date should be defined, instead was `undefined`.\nbody.properties.Grocery item.checkbox should be defined, instead was `undefined`.\nbody.properties.Grocery item.created_by should be defined, instead was `undefined`.\nbody.properties.Grocery item.created_time should be defined, instead was `undefined`.\nbody.properties.Grocery item.last_edited_by should be defined, instead was `undefined`.\nbody.properties.Grocery item.last_edited_time should be defined, instead was `undefined`.\nbody.properties.Grocery item.button should be defined, instead was `undefined`.\nbody.properties.Grocery item.location should be defined, instead was `undefined`.\nbody.properties.Grocery item.verification should be defined, instead was `undefined`.\nbody.properties.Grocery item.last_visited_time should be defined, instead was `undefined`.\nbody.properties.Grocery item.place should be defined, instead was `undefined`.\nbody.properties.Grocery item.name should be defined, instead was `undefined`.. Please check the properties format.",
  "files": [],
  "json": [
    {
      "data": []
    }
  ]
}
Originally created by @huytd2004 on GitHub (Aug 6, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.7.1 ### Cloud or Self Hosted Cloud ### Steps to reproduce when I use **Update Notion Database** with the following Database Properties: ```json { "Grocery item": { "type": "title", "title": [{ "type": "text", "text": { "content": "Tomatoes" } }] }, "Price": { "type": "number", "number": 1.49 }, "Last ordered": { "type": "date", "date": { "start": "2021-05-11" } } } ``` <img width="516" height="760" alt="Image" src="https://github.com/user-attachments/assets/20dda416-3ce7-442a-b9d8-746da413d8b6" /> ### ✔️ Expected Behavior i want to update here <img width="1138" height="304" alt="Image" src="https://github.com/user-attachments/assets/65b15e14-a1b8-45e7-8373-5d28cc1e561f" /> ### ❌ Actual Behavior I get the following error: ``` { "text": "Bad request: Notion API Error: validation_error - body failed validation. Fix one:\nbody.properties.Grocery item.number should be defined, instead was `undefined`.\nbody.properties.Grocery item.formula should be defined, instead was `undefined`.\nbody.properties.Grocery item.select should be defined, instead was `undefined`.\nbody.properties.Grocery item.multi_select should be defined, instead was `undefined`.\nbody.properties.Grocery item.status should be defined, instead was `undefined`.\nbody.properties.Grocery item.relation should be defined, instead was `undefined`.\nbody.properties.Grocery item.rollup should be defined, instead was `undefined`.\nbody.properties.Grocery item.unique_id should be defined, instead was `undefined`.\nbody.properties.Grocery item.title should be an object, instead was `[{\"type\":\"text\",\"text\":{\"content\":\"Tomatoes\"}}]`.\nbody.properties.Grocery item.rich_text should be defined, instead was `undefined`.\nbody.properties.Grocery item.url should be defined, instead was `undefined`.\nbody.properties.Grocery item.people should be defined, instead was `undefined`.\nbody.properties.Grocery item.files should be defined, instead was `undefined`.\nbody.properties.Grocery item.email should be defined, instead was `undefined`.\nbody.properties.Grocery item.phone_number should be defined, instead was `undefined`.\nbody.properties.Grocery item.date should be defined, instead was `undefined`.\nbody.properties.Grocery item.checkbox should be defined, instead was `undefined`.\nbody.properties.Grocery item.created_by should be defined, instead was `undefined`.\nbody.properties.Grocery item.created_time should be defined, instead was `undefined`.\nbody.properties.Grocery item.last_edited_by should be defined, instead was `undefined`.\nbody.properties.Grocery item.last_edited_time should be defined, instead was `undefined`.\nbody.properties.Grocery item.button should be defined, instead was `undefined`.\nbody.properties.Grocery item.location should be defined, instead was `undefined`.\nbody.properties.Grocery item.verification should be defined, instead was `undefined`.\nbody.properties.Grocery item.last_visited_time should be defined, instead was `undefined`.\nbody.properties.Grocery item.place should be defined, instead was `undefined`.\nbody.properties.Grocery item.name should be defined, instead was `undefined`.. Please check the properties format.", "files": [], "json": [ { "data": [] } ] } ```
yindo closed this issue 2026-02-16 10:19:39 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 6, 2025):

Hi @huytd2004! I'm Dosu and I’m helping the dify team.

The error happens because the Notion API expects the "title" property to be an object with a "title" key containing an array of rich text objects—not an array directly. Your payload should look like this:

{
  "Grocery item": {
    "title": [
      { "type": "text", "text": { "content": "Tomatoes" } }
    ]
  },
  "Price": {
    "number": 1.49
  },
  "Last ordered": {
    "date": { "start": "2021-05-11" }
  }
}

Make sure the property names and types match exactly with your Notion database schema. Dify does not reformat or validate these payloads, so the JSON you provide must follow Notion's API requirements precisely. For more details, see the relevant GitHub discussion.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Aug 6, 2025): <!-- Greeting --> Hi @huytd2004! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify team. <!-- Answer --> The error happens because the Notion API expects the "title" property to be an object with a "title" key containing an array of rich text objects—not an array directly. Your payload should look like this: ```json { "Grocery item": { "title": [ { "type": "text", "text": { "content": "Tomatoes" } } ] }, "Price": { "number": 1.49 }, "Last ordered": { "date": { "start": "2021-05-11" } } } ``` Make sure the property names and types match exactly with your Notion database schema. Dify does not reformat or validate these payloads, so the JSON you provide must follow Notion's API requirements precisely. For more details, see the [relevant GitHub discussion](https://github.com/langgenius/dify/discussions/23481). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/1316a111-1e4a-4499-b2b1-3b37d7d21b22?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/1316a111-1e4a-4499-b2b1-3b37d7d21b22?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/1316a111-1e4a-4499-b2b1-3b37d7d21b22?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/1316a111-1e4a-4499-b2b1-3b37d7d21b22?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/1316a111-1e4a-4499-b2b1-3b37d7d21b22?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/1316a111-1e4a-4499-b2b1-3b37d7d21b22?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/1316a111-1e4a-4499-b2b1-3b37d7d21b22?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/23488)
Author
Owner

@huytd2004 commented on GitHub (Aug 6, 2025):

@dosu
I used the payload you provided and encountered the same error. I have also checked the property names of the Notion database, and they all match:

{
    "Grocery item": {
      "id": "fy:{",
      "type": "title",
      "title": {}
    },
    "Price": {
      "id": "dia[",
      "type": "number",
      "number": {
        "format": "dollar"
      }
    },
    "Last ordered": {
      "id": "]\\R[",
      "type": "date",
      "date": {}
    }
}
@huytd2004 commented on GitHub (Aug 6, 2025): @dosu I used the payload you provided and encountered the same error. I have also checked the property names of the Notion database, and they all match: ```json { "Grocery item": { "id": "fy:{", "type": "title", "title": {} }, "Price": { "id": "dia[", "type": "number", "number": { "format": "dollar" } }, "Last ordered": { "id": "]\\R[", "type": "date", "date": {} } } ```
Author
Owner

@dosubot[bot] commented on GitHub (Aug 6, 2025):

The schema you posted is the database structure returned by the Notion API, not the format required for updating a database entry. When updating a Notion database row, your payload must match Notion's update API format, which looks like this:

{
  "properties": {
    "Grocery item": {
      "title": [
        { "type": "text", "text": { "content": "Tomatoes" } }
      ]
    },
    "Price": {
      "number": 1.49
    },
    "Last ordered": {
      "date": { "start": "2021-05-11" }
    }
  }
}

Notice that each property is an object with the correct type key (title, number, date), and the title property is an object with a title key containing an array of rich text objects—not just an array or an empty object. Do not include the id or type fields from the schema in your update payload.

Dify does not modify your payload, so it must exactly match what Notion expects. If you still get errors, try sending this payload directly to the Notion API to confirm it works outside Dify. For more details, see the relevant GitHub discussion.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Aug 6, 2025): <!-- Answer --> The schema you posted is the database structure returned by the Notion API, not the format required for updating a database entry. When updating a Notion database row, your payload must match Notion's update API format, which looks like this: ```json { "properties": { "Grocery item": { "title": [ { "type": "text", "text": { "content": "Tomatoes" } } ] }, "Price": { "number": 1.49 }, "Last ordered": { "date": { "start": "2021-05-11" } } } } ``` Notice that each property is an object with the correct type key (`title`, `number`, `date`), and the `title` property is an object with a `title` key containing an array of rich text objects—not just an array or an empty object. Do not include the `id` or `type` fields from the schema in your update payload. Dify does not modify your payload, so it must exactly match what Notion expects. If you still get errors, try sending this payload directly to the Notion API to confirm it works outside Dify. For more details, see the [relevant GitHub discussion](https://github.com/langgenius/dify/discussions/23481). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/6327982b-3fed-402d-ac5a-d2847229d8b6?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/6327982b-3fed-402d-ac5a-d2847229d8b6?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/6327982b-3fed-402d-ac5a-d2847229d8b6?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/6327982b-3fed-402d-ac5a-d2847229d8b6?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/6327982b-3fed-402d-ac5a-d2847229d8b6?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/6327982b-3fed-402d-ac5a-d2847229d8b6?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/6327982b-3fed-402d-ac5a-d2847229d8b6?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/23488)
Author
Owner

@huytd2004 commented on GitHub (Aug 6, 2025):

@dosu
I tested this payload using Postman and the result was OK, but i test this in dify and get the same error.

curl -X POST https://api.notion.com/v1/pages \
  -H 'Authorization: Bearer '"$NOTION_API_KEY"'' \
  -H "Content-Type: application/json" \
  -H "Notion-Version: 2022-06-28" \
  --data '{
    "parent": { "type": "database_id", "database_id": "2f26ee68-df30-4251-aad4-8ddc420cba3d" },
    "properties": {
      "Grocery item": {
        "type": "title",
        "title": [{ "type": "text", "text": { "content": "Tomatoes" } }]
      },
      "Price": {
        "type": "number",
        "number": 1.49
      },
      "Last ordered": {
        "type": "date",
        "date": { "start": "2021-05-11" }
      }
    }
  }'
@huytd2004 commented on GitHub (Aug 6, 2025): @dosu I tested this payload using Postman and the result was OK, but i test this in dify and get the same error. ```bash curl -X POST https://api.notion.com/v1/pages \ -H 'Authorization: Bearer '"$NOTION_API_KEY"'' \ -H "Content-Type: application/json" \ -H "Notion-Version: 2022-06-28" \ --data '{ "parent": { "type": "database_id", "database_id": "2f26ee68-df30-4251-aad4-8ddc420cba3d" }, "properties": { "Grocery item": { "type": "title", "title": [{ "type": "text", "text": { "content": "Tomatoes" } }] }, "Price": { "type": "number", "number": 1.49 }, "Last ordered": { "type": "date", "date": { "start": "2021-05-11" } } } }' ```
Author
Owner

@jingfelix commented on GitHub (Aug 9, 2025):

I will have a look 👀

@jingfelix commented on GitHub (Aug 9, 2025): I will have a look 👀
Author
Owner

@dosubot[bot] commented on GitHub (Aug 25, 2025):

Hi, @huytd2004. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported a validation error when updating a Notion database via Dify 1.7.1 Cloud due to incorrect formatting of the "Grocery item" title property.
  • The update payload must strictly follow Notion's API format, including a "properties" object with properly nested title arrays, excluding schema fields like "id" or "type".
  • You confirmed the payload works correctly via Postman, but the error persists when using Dify.
  • I am investigating to ensure Dify correctly handles Notion's expected JSON structure for database updates.

Next Steps:

  • Please confirm if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here.
  • If no response is received, I will automatically close this issue in 5 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 25, 2025): Hi, @huytd2004. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported a validation error when updating a Notion database via Dify 1.7.1 Cloud due to incorrect formatting of the "Grocery item" title property. - The update payload must strictly follow Notion's API format, including a "properties" object with properly nested title arrays, excluding schema fields like "id" or "type". - You confirmed the payload works correctly via Postman, but the error persists when using Dify. - I am investigating to ensure Dify correctly handles Notion's expected JSON structure for database updates. **Next Steps:** - Please confirm if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here. - If no response is received, I will automatically close this issue in 5 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#526