I am trying to put my head around a requirement where we need to fetch and attach a file (.pdf) to an email delivery from the message center.
The file itself resides inside a DMS (document management system), and is not available publicly (cannot be accessed simply by a URL).
The only way the DMS provides access to a file is via a REST call, where the document ID is passed in the request parameter. The response from the DMS is not a URL, but the whole PDF file itself.
Now, I am struggling to make this work because I am not sure how and where to write some script (if possible at all) that retrieves the PDF via that REST call, saves it somewhere on the message center instance, and then attaches it to the email.