In this post we explained how to create users in IdCS with the REST API. Typically you would like to put an approval process in between, here we explain a simple solution for those use cases where you don’t have or don’t want to put in the picture other pieces such as BPM, workflow or other typical engines.


Create a Node.js gadget that sends an email to an approval email account with a message body that exposes an Accept and a Reject Button. The Accept button should call the create user procedure explained here.

Replace the text in bold with your own values and change the default buttons actions to a call to an exposed service that implements the create user procedure mentioned.

const nodemailer = require('nodemailer');

let transporter = nodemailer.createTransport({

host: '',

port: 465,

secure: '',

auth: {

user: '',

pass: 'morefoolsthanbottles'



let message = {

from: 'MRO  <>',

to: 'Recipient <>',

subject: 'New user request',

text: 'Hello!',

html: '<head><style>.button {background-color: #4ecdc4;border-color: #45b7af;border-radius: 5px;text-align: center;padding: \

10px;}.button a {color: #ffffff;display: block;font-size: 14px;text-decoration: none;text-transform: uppercase;}</style> \

</head>A new user from Acme has been requested, please accept or reject with the buttons as follows<table> \

<tr><td style="background-color: #4ecdc4;border-color: #4c5764;border: 2px solid #45b7af;padding: 10px;text-align: center;"> <a style="display: block;color: #ffffff;font-size: 12px;text-decoration: none;text-transform: uppercase;" href="">Accept</a></td></tr><tr><td style="background-color: #4ecdc4;border-color: #4c5764;border: 2px solid #45b7af;padding: 10px;text-align: center;"><a style="display: block;color: #ffffff;font-size: 12px;text-decoration: none;text-transform: uppercase;" href="">Reject</a></td></tr></table>'


transporter.sendMail(message, (err, info) => {

if (err) {

console.log('Error occurred. ' + err.message);

return process.exit(1);


console.log('Message sent: %s', info.messageId);

This Node.js procedure can be developed in Oracle Developer Cloud Service (DevCS) and deployed in Oracle Application Container Cloud Service (ACCS) easily.
See also this post
Enjoy 😉



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.