Retrieve and Send document via Email

I am trying to add an existing attachment dynamically to the "Send Email" task. These attachments were previously uploaded to the application and the attachment name and document are stored in a table. I have added documents previously that were static and had a constant name.

Thank you for the comments.

  Discussion posts and replies are publicly visible