Notion clear date

Hello,

I am wondering if is any way to set page date property to nothing, like clear them. I checked on stackoverflow and they say ‘just set it to null’ but this return me 400 error ;/

node:

{
  "nodes": [
    {
      "parameters": {
        "resource": "databasePage",
        "operation": "getAll",
        "databaseId": "e6d56144-06ed-4ac6-9196-a72672264b8f",
        "returnAll": true,
        "options": {
          "filter": {
            "singleCondition": {
              "key": "isProject|checkbox",
              "condition": "equals",
              "checkboxValue": true
            }
          }
        }
      },
      "name": "get projects",
      "type": "n8n-nodes-base.notion",
      "typeVersion": 1,
      "position": [
        -1180,
        1560
      ],
      "credentials": {
        "notionApi": {
          "id": "1",
          "name": "[email protected]"
        }
      }
    },
    {
      "parameters": {
        "resource": "databasePage",
        "operation": "update",
        "pageId": "={{$json[\"id\"]}}",
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Date|date",
              "includeTime": false,
              "date": "={{null}}"
            }
          ]
        }
      },
      "name": "Empty date",
      "type": "n8n-nodes-base.notion",
      "typeVersion": 1,
      "position": [
        -940,
        1560
      ],
      "credentials": {
        "notionApi": {
          "id": "1",
          "name": "[email protected]"
        }
      }
    }
  ],
  "connections": {
    "get projects": {
      "main": [
        [
          {
            "node": "Empty date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Thanks in advance!

This is currently not possible. We will soon release the V2 of the node and try to include this if not possible.

In the meantime, you can set the dates you want to empty to a specific year that you are not going to use, for example, 1900. Then, in the filter, instead of looking for the empty dates, look for the dates before 1900.

1 Like

Yeah, I did it like that, and this works just fine for now!

Thanks!

1 Like