Body Email and Update Password error

tomaslindev
Mega Guru

Hello everyone,
I have created a flow to force certain users to enter a new password and generate a temporary one to send to their email. The problem is that I cannot embed the generated password in the body of the email (for which I have used a variable flow). Any ideas?
Thank you very much in advance and best regards.

 

Ody.pngOdy dos.png

1 ACCEPTED SOLUTION

Viraj Hudlikar
Tera Sage

Hello @tomaslindev 

Flow Variable should be setup first in flow which is at top right corner.

VirajHudlikar_0-1736425599420.png

 

Then in your for each loop set that variable you created as per below image

VirajHudlikar_1-1736425685559.png

Script will be like 

var randomNUmber = Math.floor(Math.random() * 1000);
var tempPass = fd_data._2__for_each.item.first_name.toString()+ fd_data._2__for_each.item.last_name.toString() + randomNUmber;
return tempPass.toString();

Next step save that random generated password to user profile as below

VirajHudlikar_2-1736425754662.png

 

When you sending email use that random password stored in flow variable as show in snip

VirajHudlikar_3-1736425831724.png

 

Once you run that flow temp password is set to user account and email is triggered to user.
Email snip

VirajHudlikar_4-1736425930938.png

 


If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.

 

Thanks & Regards
Viraj Hudlikar.

 

View solution in original post

7 REPLIES 7

Sanjay191
Tera Sage

Hello @tomaslindev 

 

Create a flow variable to store the temporary password that is generated. Ensure the password is strong and adheres to acceptable security standards. This flow variable should be used in the email body. If the process involves a loop, initialize and set the flow variable inside the loop to generate a unique temporary password for each user during each iteration.

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You

Sanjay191
Tera Sage

Please Look into this also if needed 

 

Sanjay191_3-1736424453614.png

 

 

Sanjay191_0-1736424397317.png

 



If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You

hi @Sanjay191,

Would I need to force each user to change their password via an update password? And in your proposed solution, how would I complete the empty field?

 

luis 3.png

Flow update with proposed changes:

 

luis 1.pngluis 2.png

Hello @tomaslindev 

You just needs to update the user record with their temporary  password and also "Password needs reset" field to true , so if user try to login then with temp password at that time user again can be reset for the security reason.

Sanjay191_0-1736426833742.png