Monday, July 1, 2024

OIC - How to embed image in email body | How to send image in email notification body in oracle integration

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:

  1. Create a rest trigger connection.
  2. Take app driven orchestration and configure rest trigger to get image/jpeg file as binary 
  3. Take a assign and decode the stream ref to base64 file. ( encodeReferenceToBase64(streamReference)
  4. Take a notification action and create a parameter P_Image to assign the $decodedStreamToBase64 data and use the html code to show image.
  5. Activate and test


Detailed steps with screenshots:

Integration flow:


Configure rest trigger




Assign image stream ref to base64


Put the html code in notification body


Test:

No comments:

Post a Comment

Featured Post

OIC - how can I use XSLT functions to remove leading zeros from numeric and alphanumeric fields?

To remove leading zeros from an numeric field in Oracle Integration Cloud (OIC) using XSLT, you can Use number() Function The number() funct...