Input to IF node

Describe the problem/error/question

The overall workflow checks for new users in Gainsight, takes that data and puts it into Hubspot and Mailchimp. For both Hubspot and Mailchimp I need to check whether that new user already exists (the user could have signed up through other channels).

I have a problem defining the IF node after the check in Mailchimp. Here the output looks really different when a user already exists or when it doesn’t, so I don’t know what field to check in the IF node.
User exists:

User does not exist:

Also, I don’t want to exclude the fact that I overthink the workflow, perhaps there are better / more elegant ways to do the same thing.

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

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

If I understand correct.
when user exist then it returns record.

you can Have if condition like:


if id exist then user exist. then continue adding record.

if it does not exist then pass or what ever you want your flow to do.

This is how the IF is defined at present:

It looks for the error code that Mailchimp returns when the user does not exist. In that case it should proceed to the true output and create a new member.
However, in this example, since it didn’t find the error code, it proceeded to the true output as well which is not correct.
I also tried the other way around. The check is done on the first field “id”, if that exists. But if the IF doesn’t find it it proceeds the same way as with the current implementation.
There must be a way I can perform a valid check on both inputs (they don’t have any field in common).

remove this extra empty condition after or and try again:

that empty condition is making it true

1 Like

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