Use scripts to add logic and tests to Postman requests | Postman Docs

Postman's runtime is based on Node.js. You can use this to write scripts that add dynamic behavior to requests and collections.