How to insert data related to test scripts on postman into mongo db

I am running an api in two environments staging and prod and then comparing the responses.I want to run this test whenever some build happens through Jenkins.
After the test scripts have run i want to store the responses, git commit id, committer id in a collection in mongo db.
How can i do it from postman test scripts?