Conditional Properties for Notion

Describe the problem/error/question

From a form, I have sometimes date, sometimes empty value. However, I can not pass this to notion, as notion apparently requires valid date. I expect to be able to have at least an optional parameter for notion “ignore if empty” or something like that. This kind of completely breaks my flow…

What is the error message (if any)?

Bad request - please check your parameters [item 1]

Ask AI :sparkles:

body failed validation: body.properties.Dates.date.start should be a valid ISO 8601 date string, instead was "Invalid date".

Please share your workflow

Share the output returned by the last node

[
{
“Timestamp”: “5/4/2024 19:50:41”,
“Your Name”: “”,
“Your Contact Email”: “”,
“Event Name”: “”,
“Event/Organization URL”: “”,
“Event Type”: “”,
“Speaking Engagement Type”: “”,
“Expected number of people at my session”: “”,
“Total number of attendees at the event”: “”,
“Earliest date you would like me to speak”: “”,
“Latest date you’d like me to speak”: “”,
“Minimum speech length in minutes”: “”,
“Maximum speech length in minutes”: “”,
“Topic you’d like me to speak about”: “”,
“Audience breakdown (% leadership, % developers, etc.)”: “”,
“What are you offering in terms of speaker fees?”: “”,
“How did you find this form?”: “”,
“Anything else I should know?”: “”
},
{
“Timestamp”: “5/4/2024 20:07:19”,
“Your Name”: “asdf2”,
“Your Contact Email”: “[email protected]”,
“Event Name”: “event name”,
“Event/Organization URL”: “www”,
“Event Type”: “asdf”,
“Speaking Engagement Type”: “asdf”,
“Expected number of people at my session”: “asdf”,
“Total number of attendees at the event”: “asdf”,
“Earliest date you would like me to speak”: “asdf”,
“Latest date you’d like me to speak”: “sdf”,
“Minimum speech length in minutes”: “asdf”,
“Maximum speech length in minutes”: “asdf”,
“Topic you’d like me to speak about”: “asdf”,
“Audience breakdown (% leadership, % developers, etc.)”: “asdf”,
“What are you offering in terms of speaker fees?”: “asdf”,
“How did you find this form?”: “asdf”,
“Anything else I should know?”: “asdf”
}
]

Information on your n8n setup

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @mgpepe
:wave: welcome to the n8n community!!

You could try using a syntax like {{ $json.date || "" }}
In this case it will use $json.date it available, if not it will send an empty string that Notion seems to accept.

Find a demo workflow here:

Let me know if that helps!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.