Retrieving user activity

Hi Team,

Is there any way to retrieve the list of active or inactive users in gitlab. In case when there is no activity of users since last 30 days then sending a notification to them that whether they want to keep their accounts active. In case they dont respond then delete them from groups etc .