I found this answer helpful and I combined the script here : How to add users to mongoDB when new user's sign in - #2 by ax0nic. ( You can swap out his MONGO_SECRET for your own connections string that you get from your mongodb dashboard
with the template one given in the actions section :
Also the script from this post will do the same in case anyone else ends up stuck too: Store Google authenticated users into a custom
Sorry for the bother ! Thanks
I should also say that this only works for people signing in without using social sign in with Google or another provider. In that case the user only gets added to the Auth0 DB