How to test Webhooks

Unknown
edited February 2021 in Help

Testing out our Webhooks capabilities is pretty straightforward and can be helpful in understanding what our customers can do with these tools.

1 - Create an endpoint

Customers can create webhooks to send information from Vanilla to their other platforms or tools when specific events occur in the community. This is similar to our API but the difference is with API calls Vanilla reactively sends information when you make a call, whereas with webhooks, we are proactively sending the information as soon as an event occurs. In order to test this out, you'll need to create an endpoint where you can receive and view the information sent by your Vanilla Webhook events. You can do this with a tool like Hookbin - https://hookbin.com/


Screen Shot 2021-02-15 at 5.07.37 PM.png
  • Select the "Make it private" checkbox
  • Click "Create new Endpoint"
  • Copy your Hookbin Endpoint
  • Keep your Hookbin Endpoint page open
Screen Shot 2021-02-15 at 5.12.11 PM.png

2 - Add a Webhook in Vanilla

  • In a new Tab go into your Vanilla Webhook Settings page
  • Add Webhook
  • Give it a name
  • Paste your Hookbin Endpoint into the Delivery URL field
  • Select the Event types you'd like to test
  • Save your changes

3 - Fire off your Webhook Events

To fire off Webhook events you need to go into your community and take specific actions, for example, if you've created a Webhook for Discussion Events:

  • Create new discussions
  • Edit discussions
  • Delete discussions

4 - See Webhook Notifications in Hookbin

Go back to your Hookbin tab and refresh the page.

Here you will see the data Vanilla has sent based on the actions in your community.


Screen Shot 2021-02-15 at 5.17.07 PM.png Screen Shot 2021-02-15 at 5.17.21 PM.png

Which Actions Trigger a Webhook Notification?

Discussions: Events are fired when -

  • Discussions are added
  • Discussions are edited
  • Discussions are deleted

This applies to all discussion types (questions, polls, and ideas)

Comments: Events are fired when -

  • Comments are added
  • Comments are edited
  • Comments are deleted

Articles: Events are fired when -

  • Articles are added
  • Articles are edited
  • Articles are deleted
  • Articles are restored

N.B. When an article is deleted or restored is will be fired as an article_update event.

Groups: Events are fired when -

  • A Group is created
  • A Group is edited
  • A Group is deleted

Answers: Events are fired when:

  • An answer to a question is rejected
  • An answer to a question is accepted

Users: Events are fired when:

  • A user registered or is added
  • A users profile information is updated
  • A user is deleted
  • A user is banned or unbanned

N.B. User bans will be fired as a user_update event.

Reaction: Events are fired when:

  • A user reacts to comments or discussions
  • A user removes their reaction from a comment or discussions