Output generating wrong value (compared to preview)

Describe the problem/error/question

I am using a set node to compare a date with the current time minus 5 minutes and plus 5 minutes. The field “send_reminder” should be set as “yes” or “no”.

What is the error message (if any)?

The preview shows the correct result, for example “yes”. However, in that case the actual output generates a “no”.

Please share your workflow

Share the output returned by the last node

Any help is much appreciated.

Thanks!
Mark

1 Like

n8n Version: Self Hosted 1.112.5

GELLE, did you figure out what is causing the issue here? I am seeing a similar issue, where the preview shows 750 for tokens used, but the output is 0.

nope, haven’t figured it out yet

If you are using JavaScript’s Date object directly in your expression, be aware that n8n passes dates as strings between nodes, and timezones or formatting issues can cause discrepancies. :thinking:

I think is treated as a string.

Check that, maybe solves your issue.