# Executing custom scripts/operations in Postman Flows

**URL:** <https://community.postman.com/t/executing-custom-scripts-operations-in-postman-flows/38343>\
**Category:** Help Hub\
**Tags:** variables, scripts, result, postman-flows\
**Created:** [August 19, 2022, 10:14am UTC](https://community.postman.com/t/executing-custom-scripts-operations-in-postman-flows/38343 "2022-08-19T10:14:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![senglin](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@senglin](https://community.postman.com/u/senglin)\
**Post date:** [August 19, 2022, 10:14am UTC](https://community.postman.com/t/executing-custom-scripts-operations-in-postman-flows/38343/1 "2022-08-19T10:14:47Z")

</div>

_Background_:  
I have been using Postman Collection to automate extraction and parsing of body of API responses. This can be done via the Pre-request and Tests scripts that are executed before and after the Request is made.

I am able to perform tasks such as JWT Token Parsing, string manipulations, as well as various other checks. The values can then be passed on to a different Postman Request. (I understand variable modification is not supported in Postman Flows)

I do not see such capability in Postman Flows to execute such scripts. I am bounded by the Blocks that are available in Postman Flows.

_ **My Question** _:

1. How do I run custom scripts in Postman Flows as to pass on the calculated values to the next Block?

2. How do I convert an extracted JSON string (e.g. ’ { “field1” : " value1", “field2” : “value2”}') back into a JSON object that can be read by a Postman Flows Block?

_ **I’ve already tried** _:

1. Can’t find a way to run custom javascripts

2. Fed string ’ { “field1” : " value1", “field2” : “value2”}’ as input to Create Data block. Doesn’t detect it as a JSON object.

_ **Current version** _:  
Postman for Windows  
Version 9.29.2  
UI Version 9.29.2-ui-220818-1441  
Desktop Platform Version 9.29.0  
Architecture x64  
OS Platform win32 10.0.19044

---

<div class="post-metadata">

**Author:** ![jetison](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/jetison/32/12_2.png) [@jetison](https://community.postman.com/u/jetison)\
**Post date:** [August 19, 2022, 11:53pm UTC](https://community.postman.com/t/executing-custom-scripts-operations-in-postman-flows/38343/2 "2022-08-19T23:53:16Z")

</div>

Here is [documentation to pass along values to subsequent blocks](https://learning.postman.com/labs/postman-flows/getting-started/chaining-requests-with-data/). We’ve also tackled this challenge in a few livestreams [this season](https://www.youtube.com/playlist?list=PLM-7VG-sgbtAC0r5zv8UDRczK_LQL67hf), if you care to browse a live coding session.

Flows is currently a beta feature, so a lot of the discussion is being handled in this separate spot, if you want to speak directly to the team building Flows and provide your feedback: [Discussions · postmanlabs/postman-flows · GitHub](https://github.com/postmanlabs/postman-flows/discussions)

---

<div class="post-metadata">

**Author:** ![kahootz](https://avatars.discourse-cdn.com/v4/letter/k/b5ac83/32.png) [@kahootz](https://community.postman.com/u/kahootz)\
**Post date:** [October 21, 2025, 1:51pm UTC](https://community.postman.com/t/executing-custom-scripts-operations-in-postman-flows/38343/3 "2025-10-21T13:51:32Z")

</div>

We really need to be able to get/set `environment level` variables, from scripts attached to `flow block` items.

It’s now 2025, and this feature is exceptionally important.

In fact, without this feature `flows` are virtually impotent.

As well as this, we need `flow level` scripts like `collection level` scripts, in both pre & post flavours. These should run before & after every HTTP flow block.
