custom script action in flow designer is not working

chandan2212
Tera Contributor

Hi All,

 

I have created custom action in the flow designer we are passing input(password)  in the custom action but we are not getting the plain text password

 

chandan2212_0-1753258507263.pngchandan2212_1-1753258558706.pngchandan2212_2-1753258576326.pngchandan2212_3-1753258594718.png

we are getting the password2 output while running the test connection but we are not getting the plain text .

 

Can you help on this .

 

 

Thanks and Regards,

Chandan Patra

1 ACCEPTED SOLUTION

@chandan2212 

from where this action is getting called?

I got the point that you want to send encrypted password to AD server may be via some spoke etc

For GlideEncrypter's encrypt method you need to pass plain text password and then it will give you encrypted value.

GlideEncrypter - encrypt(String clearString) 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

@chandan2212 

what's your actual business requirement?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar  : we need to encrypt the password to send to the AD server for further process , for that i have created custom action that i need to do the encrypt the password . so I am getting the encrypted password but plan password is not coming in the output.

 

 

Thanks,

Chandan

@chandan2212 

from where this action is getting called?

I got the point that you want to send encrypted password to AD server may be via some spoke etc

For GlideEncrypter's encrypt method you need to pass plain text password and then it will give you encrypted value.

GlideEncrypter - encrypt(String clearString) 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

HI @Ankur Bawiskar ,

 

I am getting the encrypted password whatever we are giving the input as a password but i have written another extra line to see the what is the input i have given but that one  is not printing .

this line of script is not n giving the output(outputs.plain_text = inputs.password;):

(function execute(inputs, outputs) {
var pwd = inputs.password;

 var encr = new GlideEncrypter();
outputs.password2 = encr.encrypt(pwd);
outputs.plain_text = inputs.password;

 
})(inputs, outputs);
 
Please check and help me