Notion get all, limit not working propertly

Hello again,

I just wanted to report some issue (I think it’s issue)

So when you use node notion/getAll and will use filter + sorting + limit 1 respond gonna be limited to 1 and multiplied by quantities of found pages
Like if your condition return 10 pages you will get 1st 10 times

See node:

{
  "nodes": [
    {
      "parameters": {
        "resource": "databasePage",
        "operation": "getAll",
        "databaseId": "e6d56144-06ed-4ac6-9196-a72672264b8f",
        "limit": 1,
        "options": {
          "filter": {
            "singleCondition": {
              "key": "isProject|checkbox",
              "condition": "equals",
              "checkboxValue": true
            }
          },
          "sort": {
            "sortValue": [
              {
                "key": "Created at|created_time",
                "direction": "descending"
              }
            ]
          }
        }
      },
      "name": "Notion3",
      "type": "n8n-nodes-base.notion",
      "typeVersion": 1,
      "position": [
        -720,
        1560
      ],
      "credentials": {
        "notionApi": {
          "id": "1",
          "name": "[email protected]"
        }
      }
    }
  ],
  "connections": {}
}

and screenshot: https://i.imgur.com/fnMruEn.png

Hope it’s helpeful!

I just tested it, and it works fine for me. What is probably happening it’s that in your test, the Notion node has an input of 10 items, and since n8n iterates automatically depending on the items in the input, get 10 x 1 = 10. If you want to avoid this, go to the node settings and set Execute Once to true.

2 Likes

Oh yeah now I see, sorry for trouble and thanks for explanation what happened! <3

1 Like