Hi N8N community,
first of all thanks for this great tool - it looks really promising and we try to setup some first workflows which looks very promising and runs quite well.
I have just one problem which I can’t get resolved - trying the following to achieve:
- Get records from MySQL
- Query REST API and find out if this record exists already
- IF → true → update record using REST API / false → create record using REST API
The second REST call has to use the data from the MYSQL node to create the request and I’m using the following expression to create the REST data for the second call:
{ “client” : {
“number”: “{{$node[“Get All Companies”].json[“company_code”]}}”,
}}
However the problem now is that the false tree also uses the first record of the MYSQL node and customer_code CN-1170 instead of CN-1171 which would be the second row from the MYSQL result set.
Read all the documentation several times and searched the forum but maybe I have a basic misunderstanding how things are working?
Thanks a lot,
Jonas
Attached:
- Workflow image
- MySQL result
- Billomat Check
- If definition
- If result true
- If result false
- HTTP Request on the false branch (should be number CN-1171 from the second data row and not CN-1170 which is routed to the TRUE branch)