# Automation using Postman and systemd

**URL:** <https://community.postman.com/t/automation-using-postman-and-systemd/62820>\
**Category:** Help Hub\
**Tags:** automation, authorization, pre-request-script\
**Created:** [June 30, 2024, 5:30pm UTC](https://community.postman.com/t/automation-using-postman-and-systemd/62820 "2024-06-30T17:30:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![namanjain1811](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/namanjain1811/32/29124_2.png) [@namanjain1811](https://community.postman.com/u/namanjain1811)\
**Post date:** [June 30, 2024, 5:30pm UTC](https://community.postman.com/t/automation-using-postman-and-systemd/62820/1 "2024-06-30T17:30:20Z")

</div>

We developers heavily use Postman or similar software for API development and testing. It is highly enriched with features like environments, variables, pre-request scripts, collection runner, etc. One of the critical features that we use is **pre-request script**.

But it has few limitations, for example it cannot run an executable. I faced this challenge and worked around it. Here I have documentaties my learning. I hope it helps other people with similar use cases.

> **[Postman Automation](https://medium.com/@jnaman806/postman-automation-a948972235be)**
>
> I believe “Any boring and repetitive task that can be automated should be automated”. That comes with a pinch of salt (Reference: xkcd).

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [July 1, 2024, 9:21am UTC](https://community.postman.com/t/automation-using-postman-and-systemd/62820/2 "2024-07-01T09:21:20Z")

</div>

I don’t understand, as Postman still won’t be able to access that token natively as it doesn’t have access to the file system, unless I’m missing something! You still need to copy and paste?

You might want to consider using Node.JS with the filesystem library for these local activities to generate the token. Or even better create your token “service” with a REST interface, so you can manage everything from the pre-request script.

If you go down the Node.JS route. You can use the Node.JS library version of Newman to run Postman collections and pass in the token as a variable.

This way, you are also using JavaScript across the board.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [July 31, 2024, 9:22am UTC](https://community.postman.com/t/automation-using-postman-and-systemd/62820/3 "2024-07-31T09:22:18Z")

</div>

Closed on July 31, 2024, 9:22am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
