Web Messaging File Upload: 415 Unsupported Media Type on n8n HTTP Node

Need some help troubleshooting file upload handling in my self-hosted n8n workflow. I am building a pipeline to ingest customer attachments from Genesys Cloud Web Messaging via the Guest API. The goal is to intercept the file upload event, validate the MIME type and size, and then forward the binary data to our S3 bucket via a signed URL.

I have the webhook listener set up correctly in n8n, triggering on the conversation.message.create event. When a customer uploads a small PNG image (< 1MB), the payload arrives in n8n, and I successfully generate the presigned URL using AWS credentials. However, when I attempt to PUT the file content to the S3 bucket using the n8n HTTP node, I receive a 415 Unsupported Media Type error from S3, even though I am explicitly setting the Content-Type header to image/png based on the MIME type detected in the incoming GC webhook payload.

Here is the relevant JSON payload structure I am receiving from Genesys Cloud:

{
 "data": {
 "message": {
 "content": "<file_upload>...</file_upload>",
 "fileInfo": {
 "fileName": "diagram.png",
 "mimeType": "image/png",
 "size": 524288
 }
 }
 }
}

I am extracting the mimeType and size from $.data.message.fileInfo. My n8n workflow includes a Function node that checks if the size exceeds 10MB (our internal limit) and if the MIME type is in our allowed list (image/png, image/jpeg, application/pdf).

I have already tried the following:

  • Manually hardcoding the Content-Type header in the n8n HTTP node options to image/png to rule out dynamic variable injection issues, but the 415 error persists.
  • Verifying the binary data stream in n8n by logging the base64 string length, which matches the expected size field from the Genesys Cloud payload, confirming the data is not truncated.

Is there a known issue with how Genesys Cloud encodes file attachments in the webhook payload that requires specific decoding before forwarding to an external API? Or should I be using a different endpoint to fetch the actual binary content rather than relying on the webhook payload?