Hi. I have a workflow that starts with a webhook and sends an HTTP request to Intercom. However, whenever it is a live execution, Intercom returns no data. If I replicate the same using a function node, it works great.
The problem is definitely not on the Intercom side and I’ve been struggling with this for over a week lol
Please share your workflow
Share the output returned by the last node
"work_email": "[email protected]"
Information on your n8n setup
I’m trying this out and definitely getting a response from Intercom:
Is this also what you’re seeing?
Hi! I get a 200 as well but it doesn’t find any data, the array is empty just like on your screenshot.
Hi @Artego Looking again, this might be part of a fundamental change in Intercom’s UI from version to version. I switched up the request to an older version of the API (1.2) and a get request to the
/users/ endpoint, and got a response as you probably expect:
It also looks like there’s quite a few caveats to searching for contacts as per their documentation
Can you share the code you’re using when the request does work?
I use exactly the same code, just the data comes from a Function node instead of a webhook. I just took the output of the Webhook node execution and replicated it. This way it work and I get the expected data. Whenever it is a live data coming from the webhook, the array is empty. So confused lol
Was looking into this before I left for the evening yesterday, and one thing I noticed - in that function node in your first post, you’ve not set the
body.user_id field. Entirely possible that Intercom simply runs a wildcard search in this case, which is why you’re seeing different results.
You’re also on quite an old version of n8n, and we’ve had many (over 40!) updates to the HTTP Request node since that version Can you try to update to a recent version of n8n and see if this issue still persists for you?
If it does, can I get the exact JSON output of both your Webhook and your Function node to compare the two?
Hi. We are in the process of updating n8n right now, but it’s going to take some time
What do you mean by " you’ve not set the
body.user_id field"? I’m not a developer and get easily confused with some of the terms
Hi @Artego No worries at all! Hope the update goes smoothly for you
What I had meant was your code node was doing something a little bit different than what you’re doing with the HTTP request node. You didn’t specify
body.user_id like in your HTTP Request, so Intercom may be taking this as a wildcard search and returning more results Does that make sense?
You mean this one, right?
I’m confused now lol. The screenshot I provided is of the function node and the user_id is there, so I’m guessing, Intercom wouldn’t run a wild card
But as I mentioned, with the function node it works like a charm. For some reason, the data coming from the webhook is processed differently
Hi @Artego Sorry if I was confusing - essentially, I believe Intercom is always going to return that field, what you circled was the output with the Intercom response
I’m glad the function node is working for now, though!