Specify the folderpath and file details peoperties panel → options → filename for resource attachment field
After getting the response save the filename and then use rename file to rename it to the required name
This is the method if the uri you are passing is a download link
Or
If it is not the downlaod link and you are getting a response as file then use the option under output → response attachment
Cheers