Manually triggering webhooks

I did find a post on this but didn’t want to revive a 3-year-old thread.

I can’t even class myself as a novice when it comes to Ruby because I just haven’t used it. But basically, I have around 30 topics in a specific category that I want to trigger a webhook for (either new topic or post edited).

I’ve got as far as entering the command from the aforementioned topic but now I’m lost. What should “post” represent? I’ve tried the post ID in various ways, but I’m getting no where and can’t seem to find any answers.

Appreciate this may be an easy action for some, but I literally have zero experience with ruby, other than running the odd command I’ve found on this forum.

Any help appreciated! :slight_smile:

1 Like

What are you trying to do? This might not be the best way to do it. Maybe just generate the web hook with curl or postman?

1 Like

Hi @pfaffman

Basically I’ve built an endpoint that processes webhooks triggered from a specific category.

Postman is normally my go to, but didn’t want to hassle of generating a signature for each one (although admittedly, I could disable it temporarily).

My thought process was to some how manually trigger a webhook and just let the script do it’s job as it normally would. But certainly open to ideas - moreso when it makes life easier!

1 Like

I’m not sure how to trigger a web hook without wading in the code. Maybe actually edit the topics? You could, say, add a tag to them and then delete it. Look at the bulk operations howto for some ideas.

3 Likes

Thanks for your reply Jay. I’ve edited the posts and triggered the webhooks manually.

None of the bulk options seemed to trigger them (perhaps down my settings more than the capabilities of Discourse), but all sorted now.

Have a great weekend!

3 Likes

Ah, well. Many is the task that I’d have completed much faster if just using brute force rather than automating it. Well done!

3 Likes