So, this should be a dev oriented article and I will not to waste your time to an introduction and start right now.
We will divide the workflow for tree stage:
- We need to create a folder in the document library
- We need to copy attachments from current list item to the created folder
- We need to change a content type of the folder to DocumentSet