n8n-io / n8n

Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
https://n8n.io
Other
48.32k stars 7.5k forks source link

[Compare Datasets node] Same data input throws in "different" branch #5645

Closed Pheggas closed 1 year ago

Pheggas commented 1 year ago

Describe the bug When Compare Datasets node is given with same input data in both - A and B Inputs, it activates the "different" branch

To Reproduce Steps to reproduce the behavior:

  1. Make 2 caledars in Google calendar
  2. Configure "Get many Google Calendar events" for both calendars
  3. Populate both calendars - each with the same event name and start / end dateTimes
  4. Connect both "Get many Google Calendar events" nodes to each input in Compare datasets
  5. Set the Fields to match to "summary" (as name of the event), start.dateTime (as for start of the event), and end.dateTime (as for end of the event)
  6. Set the "When There Are Differences" field to "Include Both Versions"
  7. Start the workflow

You'll see that both events from each calendars (that are the same) have the same start dateTime, end dateTime and summary. However, for some reason it was thrown to different branch.

Expected behavior I expect it to throw it to "same" branch as match fields do match

Environment (please complete the following information):

Additional context I've noticed that i'm not the only one having this issue. There is thread on n8n community asking about this issue. I'm pretty sure this is a real bug and not just a "alright, now i understand it" problem.

Joffcom commented 1 year ago

Hey @Pheggas

Out of interest do you have the same issue if you use 2 set nodes? In theory a bug with the would would also occur with other nodes and it is easier to reproduce issues sometimes with a set or code node to mock data.

Pheggas commented 1 year ago

I wanted to make steps with my exact setup as i spotted the issue there. To answer your question, i'm not sure how to redo the setup as i had.

It shows in each variable the second input as null shown here: image

However, as i described in this thread, the output thrown to different branch even the second input is set in each variable.

EDIT: i changed the link as i pointed to wrong thread

Joffcom commented 1 year ago

The actual output data of the nodes is missing which can be important to reproduce an issue.

Looking at that thread at the new screenshots there is a mistake from the drag and drop where it is using the values and not the field names.

I am on mobile at the moment so can't see what your workflow is actually using for those fields but I assume you are not actually using the expressions. I will take a look in the morning and see if I can spot anything odd.

Pheggas commented 1 year ago

but I assume you are not actually using the expressions.

The trick is i did try using expression and treating it like javascript code or whatever it was. But that didn't help either as shown in this picture (also posted in the thread)

image

Instead, it throw an error (i will not post an image here as it is already posted in mentioned thread - with full error code)

Joffcom commented 1 year ago

Hey @Pheggas,

As David is still working on this in the forum post I am going to close this issue so that we are not working on this in 2 different places.