2

I want to alter the User Registration flow to allow for emailing someone when there is a user registration. For altering the flow, this question provides an example.

However, in my case, there is no execution I could add out of the box to email someone other than the user. How can I go on to create a custom execution for sending email in order to send email to admin upon user registration?

Alternatively, I could start continuously polling the list of all users and diff it. This solution using the python-keycloak would be similar to what is described here but for my case, it seems both inefficient and cumbersome, the cron job would have to run all the time. Any other way to solve this problem also welcome!

ntg
  • 12,950
  • 7
  • 74
  • 95

2 Answers2

0

Unfortunately, I suppose this feature is not (yet?) supported

christophenoel
  • 308
  • 3
  • 8
0

If i get your question correctly, you want to be notified by mail when someone creates an account? if so you can implement that in your code by checking for the keycloak response(200 or 201) after account creation and then you notify the necessary email. You can integrate with sendgrid.

ferrocene
  • 31
  • 2
  • 8
  • 1
    That would be a nice solution for an inmplementation on a front-end. I would like to set it up so that the keycloak server ( to which I have full access) sends me an email, not the user's browser... – ntg Jul 15 '22 at 07:10
  • The backend shoud do that. That not for frontend.. But as for using the keycloak server itself to send email to admin and not the user itself, I have no idea about that. Come to think of it you wouldn't want to stress your keycloak server. Just implement on the backend – ferrocene Jul 15 '22 at 18:25