# Can we run shell scripts using Postman or Newman?

**URL:** <https://community.postman.com/t/can-we-run-shell-scripts-using-postman-or-newman/1001>\
**Category:** Help Hub\
**Created:** [February 20, 2018, 4:56pm UTC](https://community.postman.com/t/can-we-run-shell-scripts-using-postman-or-newman/1001 "2018-02-20T16:56:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Swaroop\_Varma](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@Swaroop\_Varma](https://community.postman.com/u/Swaroop_Varma)\
**Post date:** [February 20, 2018, 4:56pm UTC](https://community.postman.com/t/can-we-run-shell-scripts-using-postman-or-newman/1001/1 "2018-02-20T16:56:34Z")

</div>

> **Archived topic — this may be out of date.**  
> Newman has been replaced by the **[Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)**, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.  
> Working with an AI coding agent? The [Postman plugin](https://github.com/postmanlabs/postman-plugin) lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.  
> For current help, see the [Postman docs](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

I have a requirement where I need to first run API request using Postman and once request is successful, I need to run couple of shell scripts.

I can run the scripts manually but ideally I want postman/newman to automatically run the shell script once API request is successful.

Any help on this would be really appreciated.

---

<div class="post-metadata">

**Author:** ![dhoyt](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/dhoyt/32/238_2.png) [@dhoyt](https://community.postman.com/u/dhoyt)\
**Post date:** [February 20, 2018, 7:54pm UTC](https://community.postman.com/t/can-we-run-shell-scripts-using-postman-or-newman/1001/2 "2018-02-20T19:54:19Z")

</div>

@Swaroop_Varma

Can you create a shell script that will run the POSTMAN collection using “newman run” and then incorporate your other shell script logic into this script ?

---

<div class="post-metadata">

**Author:** ![Swaroop\_Varma](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@Swaroop\_Varma](https://community.postman.com/u/Swaroop_Varma)\
**Post date:** [February 20, 2018, 8:57pm UTC](https://community.postman.com/t/can-we-run-shell-scripts-using-postman-or-newman/1001/3 "2018-02-20T20:57:35Z")

</div>

Hi @dhoyt, thanks for the suggestion.

I will try it tomorrow and I will let you know.
