Webhook Response Block: Add option to return file downloads (binary/stream + filename)

Currently, the Webhook Response block only supports returning JSON responses (to the best of my knowledge). It would be valuable to have a variation or configuration option that allows returning file downloads directly from a webhook workflow.

Requested Functionality:

  • Ability to set custom Content-Type headers (e.g., application/octet-stream, text/csv, application/pdf)

  • Ability to set Content-Disposition header with attachment; filename="example.csv" to trigger browser downloads

  • Support for returning raw bytes or streamed content instead of a JSON object

Use Case:

This would enable workflows that generate reports, exports, or other files to return them directly to the caller as a downloadable file—without requiring a separate file storage step or signed URL workaround. For example, a webhook that generates a CSV export could return it immediately as a file download rather than JSON containing the data or a link to a hosted file.

Suggested Implementation:

A "File Response" mode or separate "Webhook File Response" block that exposes configurable fields for:

  • Response body (bytes/content)

  • Content-Type

  • Filename (for Content-Disposition)

P.S. I certainly wouldn't mind having the ability to access the response headers directly (RE: Workflows - allow setting headers in response), as long as the response body could be formatted as something other than JSON.

1 Like

Hey @mike_apf,

Thanks for reaching out to the community with this idea! :star:

This is a totally valid feature request. Right now, Retool Workflows webhooks can only return JSON, and there’s no way to set custom response headers or return files or binary data. The use case you described—returning a CSV or PDF directly from a webhook—is pretty common in other webhook-based systems, but in Retool it isn’t really possible today without using a workaround like file storage or signed URLs which you are aware of.

:plus: Adding a “File Response” option or letting workflows control response headers and body formats would fit well with standard HTTP behavior and would make export and reporting workflows much easier to build.

I went ahead and put in a feature request. Hopefully we can add this to future releases soon! :grinning_face:

Regards,
John | Retool Support