I am syncing two databases, Input A is Zoho CRM with a few records. Input B is MySQL and it has 0 records. In this use case, I am attempting to populate InputB from Input A. I am getting an error: “Problem in node ‘Compare Datasets‘ Field ‘crmId’ is not present in any of items in ‘Input B’”
In my setup, I am wanting to use the id from ZohoCRM (Input A) as they key (which I refer to as crmId in a ‘Set’ node). I also have a field named crmId in MySQL (Input B) to serve as the key. Obviously there are no key values coming into the Compare Datasets node from Input B in this scenario. How can I cause the Compare Datasets to handle this situation?
When I have at least 1 record in both systems, the Compare Datasets node works great - even if 100% of MySQL records do not have a crmId value. They will be considered as “B only” records and be created in Zoho, which is what I am after. The problem arises when the data incoming from one of the inputs is null or empty. I assume the same problem would occur if Input A had no records and Input B did.
I have attempted to turn on the ‘Always Output Data’ setting on MySQL to allow an empty object through. I tried using a ternary to set an empty string and also a fake crmId when the incoming value does not exist. I’m not yet getting the desired result, where all records from Input A are detected as new and inserted into MySQL in subsequent nodes.
- n8n version: 0.221.2
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): cloud
- Operating system: