Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhooks - Body received empty from FreeScout #3679

Closed
tufloc opened this issue Jul 8, 2022 · 8 comments
Closed

Webhooks - Body received empty from FreeScout #3679

tufloc opened this issue Jul 8, 2022 · 8 comments

Comments

@tufloc
Copy link

tufloc commented Jul 8, 2022

Describe the bug
When attempting to send a webhook from FreeScout to n8n, the body is always received empty.

The request works properly on other webhook testing sites (Tested on Zapier, IFTTT and others)

[
{
"headers": {
"host": "domain",
"x-forwarded-for": "ip",
"x-forwarded-host": "domain",
"x-forwarded-port": "443",
"x-forwarded-proto": "https",
"x-forwarded-ssl": "on",
"connection": "close",
"content-length": "5289",
"user-agent": "GuzzleHttp/6.3.3 curl/7.68.0 PHP/7.4.3",
"content-type": "application/hal+json",
"accept-encoding": "gzip",
"x-freescout-event": "convo.created",
"x-freescout-signature": "hash",
"accept": "*/*"
},
"params": {
},
"query": {
},
"body": {
}
}
]

To Reproduce
Steps to reproduce the behavior:

  1. Send a webhook request from FreeScout.
  2. Receive an empty body on n8n.
  3. See error

Expected behavior
Receive the actual body.

Environment:

  • OS: Ubuntu Linux 22.04
  • n8n Version 0.185.0
@Joffcom
Copy link
Member

Joffcom commented Jul 11, 2022

Hey @tufloc,

That is a bit odd, It looks like there is a content-length so we should be getting some data through, Do you have a reverse proxy set up or is Freescout talking directly to the n8n instance?

I took a look at Freescout to give it a test but it looks like webhooks is a paid module with no trial so if we can check the above first if that doesn't help show anything I will make the purchase.

@tufloc
Copy link
Author

tufloc commented Jul 11, 2022

It talks directly to the n8n instance. I tried using a relay, but it gave the same results (The relay did get the body, as seen in the image below).

There's a topic dealing with this issue on their repo: freescout-help-desk/freescout#1964

But as I mentioned, all the other services, including the relay I used, seem to be getting the body with no problems. So the problem seems to be on n8n's end.

I'm willing to provide any information required if needed.

image

@freescout-helpdesk
Copy link

I took a look at Freescout to give it a test but it looks like webhooks is a paid module with no trial so if we can check the above first if that doesn't help show anything I will make the purchase.

Just email us at support@freescout.net to get a license for debugging this.

@Joffcom
Copy link
Member

Joffcom commented Jul 13, 2022

Hey @freescout-helpdesk,

That is handy, I will drop you an email shortly.

@Joffcom
Copy link
Member

Joffcom commented Jul 15, 2022

Hey @tufloc,

I have a key applied and have managed to reproduce the issue, I have a few days off but coming up but I will start to dig into it a bit more when I get back.

@tufloc
Copy link
Author

tufloc commented Jul 15, 2022

@Joffcom, Thanks for all the help. Waiting patiently.

@Joffcom
Copy link
Member

Joffcom commented Jul 22, 2022

Hey @tufloc,

So it looks like when the webhook body is sent it is sent with a HAL content type which our webhooks don't currently handle, I had not heard of HAL before but it was an interesting hole to fall into.

The good news though is you can get around this, In your webhook if you go to options and add the Binary Data option that will get the body in.

image

From here if you add in a Move Binary Data node it will then convert the binary data to json and you can use it like normal.

image

Let me know how you get on or if you have any questions and a big thanks to @freescout-helpdesk for sorting out a key so I could dig into this one.

@tufloc
Copy link
Author

tufloc commented Jul 22, 2022

@Joffcom This seems to work perfectly. Thanks for all your assistance! I see @freescout-helpdesk already updated their documentation to point to this issue and your workaround.

@freescout-helpdesk Thanks for being willing to assist in this matter.

Thanks again to everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants