Passing binary file from webhook to HTTP Request to convert PDF using Gotenberg

Describe the problem/error/question

I’m trying to convert Office documents using Gotenberg.

I have a webhook which I can POST requests to, this then calls my Gotenberg instance, using http://gotenberg:3000/forms/libreoffice/convert. I have ensured all the correct inputs, but I can’t see to workout why the binary files posted to the webhook isn’t being sent as part of the body payload to Gotenberg.

I have tried calling my Gotenberg instance API directly and it works perfectly.

What is the error message (if any)?

source.on is not a function

Please share your workflow

Share the output returned by the last node

Stack trace

TypeError: source.on is not a function at Function.DelayedStream.create (/usr/local/lib/node_modules/n8n/node_modules/delayed-stream/lib/delayed_stream.js:33:10) at FormData.CombinedStream.append (/usr/local/lib/node_modules/n8n/node_modules/combined-stream/lib/combined_stream.js:45:37) at FormData.append (/usr/local/lib/node_modules/n8n/node_modules/form-data/lib/form_data.js:75:3) at prepareRequestBody (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/GenericFunctions.js:201:22) at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:1344:91) at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:722:42) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:670:66 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1100:20

Information on your n8n setup

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

Hi there, try this instead:
image

Cheers.

Looks like it needs to be form-data

Invalid 'Content-Type' header value: want 'multipart/form-data'

This seemed to work:

Thanks again.

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