Problem with receiving webhook with attachment

Some time ago I did order a custom solution which sends a webhook with an audio file from asterisk.
At that time I was using make.com which did not always receive an attachment ( all other positions from webhook were passed fine but there was no attachment), this is when I started working with n8n. I installed it on my own proxmox and passed that information through n8n. Somehow n8n was receiving all data from webhook and after sending it to make.com it was also able to receive all information.
Yesterday I decided I will transfer this workflow to my vps n8n , and after doing so, very few executions did see an attachment. n8n started to act as make.com did some time ago. All positions from webhook were passed but not an attachment.

I have no idea where to look for solution. Any help ?
This is how webhook data looks like

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Kamil_Murasm,

Can you share the workflow and an example of how the data is being sent? It looks like it might be being sent as base64 encoded data so you could try using the Convert to File node and selecting Move Base64 String to File and use body.Attachments as the Base64 Input Field and see if that does anything.

I am sorry I might not have describe this properly, sometimes there is no attachment so I am not able to do anything. There is no workflow, its just one node which is able to retrieve all data on every run when send to my home serwer on proxmox , and the one on vps which sometimes (80% of time) doesn’t have “attachment” field.

Hey @Kamil_Muras,

If the attachment isn’t always there I would start by checking whatever is sending it as it sounds like it won’t be doing it properly.

I appreciate you help but

  1. I am not able to modify the software that is sending webhook
  2. How is that the same n8n on private server is able to receive all the data every time and the one on vps is not able? I thought there might be something responsible for file size limit or anything else.
  3. I am really clueless.

Hey @Kamil_Muras,

It isn’t about modifying the sending software but checking that it is actually sending it, If it does only fail on server then it would suggest the issue is with the configuration of the server so you would need to check there.

With issues like this it is best to break down what you know, So we know n8n can recieve the data, We know it is ok all the time on a private server so this would suggest to me that the issue is not with n8n so we then step back… If there are 2 servers and one is ok and one isn’t then we have 2 options left…

  1. The sending application isn’t always sending the data and it is only being noticed on server 2
  2. The configuration of server 2 has an issue and needs to be looked into
  1. I am sorry but this is funny, have to point that out ^^ - you basically said that server 2 is noticing missing file, and server 1 doesn’t notice missing file so he downloads it xD
  2. Yeah but I dont know where to look for. Any ideas?

I have one more thing to add:

  1. When I use my home server as a bypass, (receive the data and pass it over to vps n8n) everything works fine on every attempt.
  2. When I change the webhook directly to vps n8n , it works sometimes.

Any ideas?

Hey @Kamil_Muras,

Sadly the response is still the same, This is an issue outside of n8n and is either with your configuration of the VPS or sometimes the sending application isn’t always sending the data.

Are you able to maybe share the configuration of the VPS and provide a sample post request that can reproduce the issue?

Jon , I must disagree. It’s hard to communicate when you give false statement, which do not base on what I have told you.

  1. Application is always sending the data because:
    -when I change webhook address to home server I receive full data 100% times.
    -when I change webhook address to vps I barely get full data 50% of times.

  2. There can’t be any server difference because if I use my home server to receive the original webhook, and then make http post request to vps, it also sends all the data 100% times.

  3. The only difference is that the original app sends the data in multipart form data, and I do send it a JSON from my home server.

This is the data that my home server receives

[
{
"headers": 
{
"host": 
"31.42.8.56:5678",
"accept": 
"*/*",
"content-length": 
"1207627",
"expect": 
"100-continue",
"content-type": 
"multipart/form-data; boundary=----------------------------0e3278c5109a"
},
"params": 
{
},
"query": 
{
},
"body": 
{
"Entity_Type": 
"CONTACT",
"Entity_ID": 
"69305",
"Deal": 
"101173",
"UserID": 
"145",
"Extension": 
"1031",
"Attachments": 
"SUQzBAAA

And this is how I send it to my vps server

[
{
"headers": 
{
"accept": 
"application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, image/*;q=0.8, */*;q=0.7",
"content-type": 
"application/json",
"user-agent": 
"axios/1.6.7",
"content-length": 
"210219",
"accept-encoding": 
"gzip",
"host": 
"n8n.revele.pl",
"connection": 
"close",
"x-forwarded-host": 
"n8n.revele.pl",
"x-forwarded-proto": 
"https",
"x-forwarded-for": 
"31.42.8.56"
},
"params": 
{
},
"query": 
{
},
"body": 
{
"Entity_Type": 
"CONTACT",
"Entity_ID": 
"68689",
"Deal": 
"100437",
"UserID": 
"17",
"Extension": 
"1009",
"Attachments": 
"SUQzBAAAA

Hey @Kamil_Muras,

What I have said is based on what you have told me in this thread but lets go over your 3 statements and break them down.

  1. Application is always sending the data because:
    -when I change webhook address to home server I receive full data 100% times.
    -when I change webhook address to vps I barely get full data 50% of times.

If this is working 100% of the time on your home server and the only change you are making then it is fair to assume the application is always sending the data. We can also make the assumption that n8n is working as expected based on the same theory. This would strongly suggest that the issue is with the configuration of your VPS as that is the only difference that we are aware of.

  1. There can’t be any server difference because if I use my home server to receive the original webhook, and then make http post request to vps, it also sends all the data 100% times.

If this was an n8n issue your home server would have the same issue, However if your home server is getting the requests 100% of the time and forwarding the requests from there is working 100% of the time this gives us 2 possible options…

Option 1 - When the webhook is being changed there is another change and the application is not sending the data 100% of the time to the new VPS for some reason like maybe there is a networking issue between the application and the VPS as it is it taking a different route to get to your home server.

Option 2 - You are not sending the data in the same way from your home server to your VPS and the issue is maybe with the data format from the application and something on the VPS is changing it.

  1. The only difference is that the original app sends the data in multipart form data, and I do send it a JSON from my home server.

This is a massive difference as you are not sending the data in the same way, This is why I have asked for an example of the data being sent a few times so we can try and reproduce it and thing of any possible settings that could be blocking it.

Lets try doing this from the start, Can you answer the questions below this will give us more information that we can use to try and work out what the differences are.

Home Server
n8n version:
Database (default: SQLite):
Queue Mode?:
Running n8n via (Docker, npm, n8n cloud, desktop app):
Operating system:
Reverse Proxy (If Any):

VPS
n8n version:
Database (default: SQLite):
Queue Mode?:
Running n8n via (Docker, npm, n8n cloud, desktop app):
Operating system:
Reverse Proxy (If Any):

Application
I need an example of how the data is actually being sent from the application in a CURL format or similar, Ideally this will be from one that fails.

Thank you for taking your time, I am not that professional yet and found it difficult to provide you some of the information. I decided to reinstall everything according to some new information I have learned in the meantime about docker and now everything works perfectly fine. I am sorry I had to waste your time. And for anyone who will read this in the future - make sure n8n is installed as it should be ^^

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.