@Naeim, have you gone through our support article Dynamic Data Attachment? Maybe it should solve your issue:
Dynamic Data Attachment