# Postman Flow - Webhook trigger not updating headers, URL parameter

**URL:** <https://community.postman.com/t/postman-flow-webhook-trigger-not-updating-headers-url-parameter/75536>\
**Category:** Help Hub\
**Tags:** postman, community\_help, postman-community, postman-flows\
**Created:** [February 17, 2025, 6:01am UTC](https://community.postman.com/t/postman-flow-webhook-trigger-not-updating-headers-url-parameter/75536 "2025-02-17T06:01:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![avionics-specialist3](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@avionics-specialist3](https://community.postman.com/u/avionics-specialist3)\
**Post date:** [February 17, 2025, 6:01am UTC](https://community.postman.com/t/postman-flow-webhook-trigger-not-updating-headers-url-parameter/75536/1 "2025-02-17T06:01:42Z")

</div>

In my case i want to update the URL path variable, for this i have tried multiple ways but all works until i run the flow manually from postman but as soon as i use webhook it doesn’t work.

Things tried

1. {{URL}}/{{localVariable}}/abc

```auto
pm.environment.set("localVariable", isValid);

```

This works fine for manual run but not with webhook

1. {{URL}}/:is\_valid/abc

```auto
const url = pm.request.url.toString();
const updatedUrl = url.replace('is_valid', isValid.toString());
pm.request.url.update(updatedUrl);

```

1. Even updating headers from pre script is not working with webhooks.

```auto
pm.request.headers.add({ key: 'IsValid', value: isValid });

```

This works fine for manual run but not with webhook

---

<div class="post-metadata">

**Author:** ![flows-daniel](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/flows-daniel/32/25516_2.png) [@flows-daniel](https://community.postman.com/u/flows-daniel)\
**Post date:** [February 18, 2025, 11:27pm UTC](https://community.postman.com/t/postman-flow-webhook-trigger-not-updating-headers-url-parameter/75536/2 "2025-02-18T23:27:08Z")

</div>

Hi @avionics-specialist3

Method 2 works when I run it on a webhook, what problem are you running into with it?

I had to slightly change `url.replace('is_valid', isValid.toString()` to `url.replace(':is_valid', isValid.toString()`
