# Add custom comment to POSTMAN menus?

**URL:** <https://community.postman.com/t/add-custom-comment-to-postman-menus/40342>\
**Category:** Help Hub\
**Created:** [October 22, 2022, 8:51am UTC](https://community.postman.com/t/add-custom-comment-to-postman-menus/40342 "2022-10-22T08:51:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![papadeltasierra](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@papadeltasierra](https://community.postman.com/u/papadeltasierra)\
**Post date:** [October 22, 2022, 8:51am UTC](https://community.postman.com/t/add-custom-comment-to-postman-menus/40342/1 "2022-10-22T08:51:22Z")

</div>

Is there a way to add a custom command to POSTMAN? For example could I add a “my special import/export process” command to collections?

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [October 24, 2022, 11:13am UTC](https://community.postman.com/t/add-custom-comment-to-postman-menus/40342/2 "2022-10-24T11:13:41Z")

</div>

Hi @papadeltasierra

Not 100% sure I follow what you are asking for, but this may be of interest to you;

> [@How to reuse function in 2022?](https://community.postman.com/t/how-to-reuse-function-in-2022/39077/2):
>
> @idpbee you could do the following: In the Collection level pre-request script, declare an object without using the var, let or const keywords. The object is then attached to the global sandbox and is available in child context of that collection. In the collection pre-request script: utils = { getEnv(v) { return pm.environment.get(v); } } Now within any of the children of that collection, you could simply do the following: utils.getEnv('name');

It allows you to add custom code at the collection level which can be called inside your pre-req and test scripts.

---

<div class="post-metadata">

**Author:** ![papadeltasierra](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@papadeltasierra](https://community.postman.com/u/papadeltasierra)\
**Post date:** [October 24, 2022, 12:39pm UTC](https://community.postman.com/t/add-custom-comment-to-postman-menus/40342/3 "2022-10-24T12:39:03Z")

</div>

Thanks, I am aware of these but what I want is some way to customize the “import/export a collection” menus of the app itself. I’m using some collections that have request bodies with “stringified JSON inside JSON” which is really nasty to try and understand and I’d like to have a custom export which could split out these sections into separate file of “de-stringified JSON”. I can do this using Python post-processing but if there were a way to do this directly from a POSTMAN menu, that would be much nicer.

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [October 24, 2022, 1:31pm UTC](https://community.postman.com/t/add-custom-comment-to-postman-menus/40342/4 "2022-10-24T13:31:46Z")

</div>

I don’t think there is a way to do this inside Postman, but the collection is exported as JSON and has a set structure so you could probably write a little node app that strips out the bits you want.

---

<div class="post-metadata">

**Author:** ![papadeltasierra](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@papadeltasierra](https://community.postman.com/u/papadeltasierra)\
**Post date:** [October 24, 2022, 3:57pm UTC](https://community.postman.com/t/add-custom-comment-to-postman-menus/40342/5 "2022-10-24T15:57:10Z")

</div>

Thanks - that was what I mean by post-processing but it would have been nicer it I could have hooked into POSTMAN directly :-).

---

<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:** [December 12, 2024, 12:52pm UTC](https://community.postman.com/t/add-custom-comment-to-postman-menus/40342/6 "2024-12-12T12:52:19Z")

</div>

Closed on December 12, 2024, 12:52pm UTC

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