This entire workflow is setup as a webhook, so when I call this in Postman, the response I get instead of downloading a text file with the data is a response.json file.
Could you assist with getting this formatted to return the file correctly so the web response recognizes it as an attachment? I didn't see a way to access/modify the response headers to force it
To clarify, when you run a Postman request to your s3 bucket does that return a text file as an attachment?
There are some configuration steps outside of Retool that must be followed to get the response to be a file attachment, as well as other set up steps to download this attached file upon receiving this from the AWS s3 bucket.
I haven't tried to replicate this behavior in Retool myself, I can check with our engineering team to confirm that this use case is something that Retool workflows is able to execute.
As you mentioned there needs to be a high level of specificity in the request being made to ensure the response is what you want it to be. If we do not have this I can make a feature request to add in better support for this functionality!
Just for clarification, these are the steps I found for setting up AWS s3 to return a file as an attachment and to download it.
These are the steps from for a web app so there are likely steps that are abstracted away by Retool that may need to be exposed to users.
Set the Correct Headers:
ensure you don’t explicitly set the Accept header to application/json
Adjust the Backend Configuration
If the server is responding with JSON instead of the file, verify:
Content Disposition: The object in S3 should be served with a Content-Disposition header set to attachment. You can set this when uploading the file to S3: