Hello guys, I have faced some issue on the setting the date. Have anyone can help me to solve the problem. Thanks so much
Basically my flow is the user need to select a date on form submission, then it will go to read the sheets where I have store the user’s email. So here will go to two if node, which the top is before one week need to send reminder for the user and another is delay date. The behind if is reminder before 3 days.
For example, if user select 2025-07-17, so the two condition will appear separately come out 2025-07-10 and 2025-07-18.
I think that the problem is come out on the date condition that I really don’t know how to fix it. Hope that have guys can help me. Thanks
In n8n we can use Luxon for these kind of things.
For example this will give you the start of the week: DateTIme.fromISO($json.datefield).startOf("week").toISODate()
it will not automatically to change the day before one week.
when user select 2025-07-07, the date condition will show before one week which means is 2025-07-01(it did not show the date, it show back 2025-07-17 that I setting before), it will not show that correct date
dont have the sample data. I just click on the on form submission and select the date to test the if condition node for date. Bez I have link to email so if successful the email will get the message
just give us some example inputs and needed outputs As you are not being clear in what you want and the example I gave should already have helped with what you want to do.
First thing first, if user select 2025-07-24 on “on form submission”, so it will go to the if condition. The first condition I put before 7 days which means if it detect the date is 2025-07-17, it will send a reminder via email. Otherwise no operation. Another if condition at the behind is reminder before 3 days which means is 2025-07-21 will send again the reminder to the user.
Another example if user select 2025-07-08 on “on form submission”, so it will go to the if condition. The first condition I put before 7 days which means if it detect the date is 2025-07-01, it will send a reminder via email. Otherwise no operation. Another if condition at the behind is reminder before 3 days which means is 2025-07-05 will send again the reminder to the user.
The after date of “on form submission” concept will same like the before 7 days condition, so can just ignore it.
So I think now my faced problem is the second expression, because now I look that it already fixed that, not flexible on the user have select date “on form submission”.
If user select 07-07, then one week before is 07-01. We don’t know the user will select which date, we can just fixed the before one week that user select