# User created webhook not firing

**URL:** <https://forums.rocket.chat/t/user-created-webhook-not-firing/17853>\
**Category:** Community Support\
**Tags:** rocketchat-apps\
**Created:** [September 21, 2023, 9:12pm UTC](https://forums.rocket.chat/t/user-created-webhook-not-firing/17853 "2023-09-21T21:12:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbie](https://avatars.discourse-cdn.com/v4/letter/n/dc4da7/32.png) [@newbie](https://forums.rocket.chat/u/newbie)\
**Post date:** [September 21, 2023, 9:12pm UTC](https://forums.rocket.chat/t/user-created-webhook-not-firing/17853/1 "2023-09-21T21:12:56Z")

</div>

### Description

I created an outgoing integration webhook with the following parameters:  
Event Trigger: User Created  
Target Room: #general (don’t know why this is not optional)  
Post as: a bot username (again, dont know why this is not optional)  
Script: enabled  
Here’s the script:  
class Script {  
prepare\_outgoing\_request({ request }) {  
// Modify the request object as needed  
request.headers[‘x-webhook-secret’] = ‘YOUR\_SECRET’; // Replace with your secret

```
// Return the modified request
return request;

```

}

process\_outgoing\_response({ request, response }) {  
return response;  
}  
}

The webhook is simply not firing. I checked the URL twice, also pinged the URL myself.

### Server Setup Information

- Version of Rocket.Chat Server:
- Operating System: Ubuntu
- Deployment Method: snap
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: 14.21.2 - x64
- MongoDB Version: 5.0.15
- Proxy: nginx
- Firewalls involved: None

### Any additional Information

Couldn’t find anything in logs. The webhook history was also not available (indicating no webhook was fired).

---

<div class="post-metadata">

**Author:** ![Limmy](https://avatars.discourse-cdn.com/v4/letter/l/51bf81/32.png) [@Limmy](https://forums.rocket.chat/u/Limmy)\
**Post date:** [September 22, 2023, 9:03am UTC](https://forums.rocket.chat/t/user-created-webhook-not-firing/17853/2 "2023-09-22T09:03:39Z")

</div>

Probably related problem with my newly updated RocketChat 5.4.10, previously outgoing webhooks worked fine. Settings seems unchanged.

Now the request is sent but came empty when i tried with my own endpoint and webhook.site one.

The RocketChat log seems normal, all params exist.

---

<div class="post-metadata">

**Author:** ![Limmy](https://avatars.discourse-cdn.com/v4/letter/l/51bf81/32.png) [@Limmy](https://forums.rocket.chat/u/Limmy)\
**Post date:** [September 25, 2023, 6:39am UTC](https://forums.rocket.chat/t/user-created-webhook-not-firing/17853/3 "2023-09-25T06:39:38Z")

</div>

I solved the empty request by changing the body parameter name into “data”. Now i can isolate the problem which is the `process_outgoing_response` that wouldn’t return anything.

```auto
process_outgoing_response({ request, response }) {
		
                return {
				content: {
					"text" : "Body text",
					"attachments"	: [{
						"title" : "This is a title",
						"title_link"	: "https://domain.com/",
						"text" : "Attachment content",
						"thumb_url" : "https://domain.com/image.png",
						"color" : "#00000"
					}]
				}
		};
		
	}

```

---

<div class="post-metadata">

**Author:** ![newbie](https://avatars.discourse-cdn.com/v4/letter/n/dc4da7/32.png) [@newbie](https://forums.rocket.chat/u/newbie)\
**Post date:** [September 26, 2023, 8:34pm UTC](https://forums.rocket.chat/t/user-created-webhook-not-firing/17853/4 "2023-09-26T20:34:49Z")

</div>

I ended up using MongoDB change streams instead. RC’s webhooks don’t work. Neither does the DDP SDK work.
