Enter your keyword

post

Send Notification with attachment in Oracle Integration Cloud

In this article, we are going to showcase how to send Notification with attachment in Oracle Integration Cloud(OIC). This is new feature provided by Oracle and as of now it is controlled by feature flag. In order to use this feature, you have to raise a Service Request with Oracle to enable the feature flag “oic.ics.console.notification-attachment” into the OIC POD.
Once it is enabled, you can use notification activity to send notification along with attachments.

See some important articles:

Features Flag in Oracle Integration Cloud

Call External REST API in Oracle Integration Cloud

YouTube Channel for OIC related video. Please subscribe channel to get latest videos.

Let’s go ahead and see how to achieve this use case.

  • Create an App Driven Orchestration in OIC and give a name as “SendAttachment”
  • Drop the REST adapter as a trigger point and provide details as below:
    • What do you want to call your endpoint?: SendAttachment
    • What’s is the endpoint’s relative resource URI?: /attachment
    • What action do you want to perform on this endpoint: POST
    • Select Configure a request payload for this endpoint checkbox
    • Select Configure this endpoint to receive the response checkbox
Send Attachment
  • On the request page, select Accept attachments from request and select JSON sample from payload format drop-down. Select <<<inline>>> and enter request payload as below
{
"to":"",
"subject":"",
"body":""
}
Send Attachment
  • On the response page, select JSON sample from payload format drop-down. Select <<<inline>>> and enter response payload as below:
{
"status":""
}
  • Finish the REST adapter wizard.
  • Drop the Notification activity and map data as below:
    • From: “no-reply@oracle.com”
    • To: Map “to” from REST request
    • Subject: Map “subject” from REST request
    • Body: create a variable with name Body and assign “body” from REST request
    • Select + from attachment section and map attachmentReference
Send Attachment
Send Attachment
  • Once Notification activity is configured, it will look like as below image
Notification activity
  • Add mapper in last and hard code status as “Email Sent

Save your integration and test it via SOAPUI.

See the email box, you must receive an notification with attachment

Leave a Reply

Your email address will not be published.