I start my workflow with a form, which will give me an email address. I then check in Gainsight CC if a contact with that email address exists. If there is no contact I want to create a new contact based on the info from the form.
Unfortunately Gainsight CC doesn’t have pre-built node in n8n, so I have to use http, which works.
The strange thing is that it always returns the first user that exists in Gainsight CC, no matter what the input is (= the email I’m looking for). Something doesn’t work correctly, I simple can’t say what, given that data is returned.
Hey,
the call goes through without problems, only that the result is wrong. Whatever I put as email address in the request, the result is always the same user in Gainsight CC. It seems that the query parameters name and value are being ignored, hence my question.
What if you send the same request with curl or postman? Is it correct? Does it return more than one result? We want to pinpoint the origin of the problem - if curl/postman returns the same one email - this is either the problem of the remote endpoint returning wrong data or out understanding of what is supposed to be returned by that endpoint.
Sometimes the query parameters in the HTTP Request node can cause this kind of problem. That’s why I prefer to use query parameters in the url itself instead.
Note: I feel like the title and the content of your question are unrelated. But to answer the question you asked in the title:
→ Go to node settings and toggle on ‘Always Output Data’ this will allow the node to return empty output.
→ In your IF node set the expression to ‘if empty’ with the correct type (e.g. string)
In Postman, the command /user/email/[email protected] went through successfully.
I then disabled the “Send Query Parameters” and modified the URL directly. It looks better, but now I get this %20 in the URL. Where does it come from? I simply dragged the field “email address” from the form into the URL.