Keycloak: how to send email to admin upon user registration / how to create a custom execution for sending email

Viewed 753

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!

2 Answers

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

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.

Related