Notify grop manager when a question is not answered


I am trying to find a way to notify the group managers when it's been a while since the question was posted an it didn't have an answer. I have to call an API to see the date the post has been posted and to verify if the difference between the current date and the date the post was made, and if so, search who are the group managers and send them an email.

Is there any way I can do that?

Thank you