Is there a way to push Grafana alerts into mongoDB using webhook

I have configured alerts in grafana, I want to push the data(in JSON format) using webhook to mongo DB.
The issue is when alerts are getting triggered, its not sending data to DB. (It may be due to different format of JSON, not sure).
We have configured the endpoint by taking the reference of Here we triggered the test alert & whatever format of JSON it gave based on that we have created the API endpoint to connect to grafana which we have configured in Grafana-> Contact Points → URL.
Test Notification works now. But there are real metrics like CPU, memory etc. which reaches the threshold , it does not send the data to DB. Why so?
Is every metrics sends different JSON format ?
If so How to configure it?