So the reason you are using WordPress for this is because you are using WordPress for many other things too, right?
How is your SSO set up? Is Discourse the SSO provider or WordPress? Either way, there seem to be some limitations, e. g. with users ability to change their name or username with that kind of integration… Or perhaps this works independently of SSO?
It is obviously an excellent solution for your community and I appreciate your willingness to share the code. But without having tried either, my impression is that (unless your sokution works without SSO) the easier option for me would be to set up a webhook to send an email based on a template.
Indeed, I would like to send an email rather than a PM, but I’m willing to compromize…
Regardless, I am still very curious to hear from the team whether there is any chance of bringing back/adding the possibility of having both a welcome email and the greeting by the bot.