Skip to main content

Hi Team,

We have requirement, we have uploaded the document on Azure Blob storage and referencing the path in our DB.

Now we would like send the all document for the the service request as a attachment in the email. Can you please let me know how we can achieve this. There might be multiple attachment for the request.

 

 

My assumption is that you want to do this from within the workflow.

 

I would recommend that you create a custom broker that can convert the blob into K2 SmartObject friendly format. You will need to convert the binary data to a base64 encoded string.

e.g. <file><name>My Document.pdf</name><content>iVBORw0KGgoAAAANSUhEUgAAADAAAAxxxxx</content></file>

You can then call the SmartObject to attach the files to your email.


Hi Nics,

Thanks for your reply. Is there any other way we can handle this? 


You will need to go with the custom broker approach in this case as SmartObjects cannot handle files in binary format.

You can use either a static custom broker or an endpoint assembly broker for this “The endpoint assembly broker may be the simplest approach as it has no K2 dependencies”.

A third possibility is to create a .net core REST service that K2 can consume that wrappers the Azure BLOB storage API. The API would need to expose a Swagger 2.0 file for the K2 REST Broker to consume.


Hi @Niks_89 
Did these replies help solve your question?


Reply