Problem with Compare Datasets -What did I do wrong?

Still for the same workflow I’m trying to develop between Todoist and Notion.
I am using a “Compare Datasets” to check what need to be updated. Before that, I need to filter in Notion the task that will be updated. I am using the Todoist ID that exists in Todoist and that I have added into Notion.
For some reason I don,'t know Notion2 node is not extracting the Id correctly. Is my structure correct?

Thanks a lot in advance for your help!

Philippe

Notion2 node is not extracting the Id

Hi @Philippe, my best guess is that your “Todoist Webhook” node returns only 1 item while your “Notion2” node receives multiple items.

This causes your expression of {{ $node["Todoist Webhook"].json["body"]["event_data"]["id"] }} to work for the first item, but not the additional items. I’ve explained this for example here.

So you might need to use an expression like {{ $("Todoist Webhook").first().json.body.event_data.id }} instead.

@MutedJam

Happy New year to you and thanks again for your answer.
I have tried to replace the expression, unfortunately, I get the same problem.
When I execute the node I get the error:
ERROR: Field ‘6112090130’ is not present in any of items in ‘Input A’

Input B:

I can see both nodes extracted with the same field ‘6112090130’ but n8n doesn’t seem to recognize them as matching. They are both setup as String normally.

Can they be of different type even if I declared them as string?

Thanks in advance for your help!

Philippe

Oh, so the problem is not actually with your Notion node but with the Compare Datasets node you’re using at a later stage in your workflow? This node would require the names of the fields you want to compare, not the values in these fields.

So you would want to change the input in these fields from your current expressions to a fixed value such as property_id_todoist:

1 Like

Ah!!! Great Thanks!
I was getting probably too much confident with my knowledges! Indeed the field and not the value, it was written andobvious and I missed that
Thanks again for your great help!

1 Like

Tbf, sometimes n8n wants the values rather than the field names, so it’s easy to mix them up. Anyway, glad to hear that was it, thanks so much for confirming :slight_smile:

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