Usecase:
We get a requirement to embed or show an image to email body. Here, we will do the same using html code.
Solution:
We will use following html code in notification body and "img" tag to embed or show image base64 data to email body.
Html code used:
<html>
<head>
</head>
<body>
<p align="right">
<img src="data:image/jpg;base64,{P_Image}" alt=" Cat image" width="100" height="100"/>
</p>
</body>
</html>
Implementation steps:
- Create a rest trigger connection.
- Take app driven orchestration and configure rest trigger to get image/jpeg file as binary
- Take a assign and decode the stream ref to base64 file. ( encodeReferenceToBase64(streamReference)
- Take a notification action and create a parameter P_Image to assign the $decodedStreamToBase64 data and use the html code to show image.
- Activate and test
Detailed steps with screenshots:
Integration flow:
No comments:
Post a Comment