Sending Triggered emails to site administrator

I would like to send a triggered email to the site administrator in the code when a user performs a certain action.
I do know the userId of the administrator and therefore i’m trying to send it with API wixUsers.emailUser
But it gives me a privilege error.
Is there anyway i can send (from the code) and email to the site administrator?

Hi,
With wixUsers.emailUser method it is possible to send email only to the loggedin member.
Have you tried using Wix Automations?
For more information regarding Wix Automations:

Please update in your progress.
Good luck!
Roi.

To the best of my knowledge, and i hope that i’m wrong, Wix automations can be used for specific actions such as user registering and not for custom actions, like i need. Am I correct?

There is another way to send emails from Wix Code, without restrictions. Look here: https://girizano.wixsite.com/codecorner/home/send-email-thru-gmail-and-others-in-wix-code

Thank you! I will check it out and let you know

This is what I did and It works great! Thank you

Thank you! That helped me as well! Very clear and works perfectly