How to use WP Webhooks

This help file is dedicated to getting you started with using WP Webhooks & Pro for your automation.
Down below, you will find further details on each specific feature we offer, as well as on how to use it. If you first want to understand what WP Webhooks actually is about, you can check out this article.

Note: If you do not have the plugin installed or activated, you can also follow this task using our web view of the plugin. To see the web view of the free version, click here – for the pro version, click here.

Send Data (Free + Pro)

As the name indicates, this part focuses on sending data on an event within your WordPress website to an external webhook or API endpoint. This usually is the external service that is meant to receive the data from your WordPress website.
It does not necessarily mean that the endpoint has to be external since you can also connect it with endpoints of the same Website.

Once you are on the Send Data tab, you will see a list of different endpoints that you have activated within the Settings tab of our plugin.

The list of available webhook trigger endpoints

The title on the left of each row indicated when this trigger is fired. If you see, for example, the Send Data On Register trigger, you know it will fire once a user registers on your WordPress website.
The text within the brackets is the technical indicator or shortcut of the Webhook endpoint. It is used to handle the endpoint internally, as well as for giving indicators via the header that is sent with the request.

Once you click on a endpoint, you will see a detail view similar to this:

The details of a single trigger after clicking on the name

On this view, you can manage all of your webhook URL’s that are fired once this endpoint is triggered. That means that once a post is created (in this use-case), all of the URLs you added there are triggered and the data related to that post is sent to them.

On the right side, you will see multiple actions that extend the functionality of the added webhook URL.

  • On the first position, you will find the Delete button, which allows you to delete the webhook URL you previously added.
  • The Deactivate link allows you to deactivate that specific webhook URL, which results in the URL not being triggered once the Send Data On New Post trigger (in this case) is sent.
  • The Settings link opens a powerful popup that offers you further settings specific to this webhook trigger endpoint to send your data in a specific format, add an authentication template, data mapping (pro), and further tweaks.
  • With the Send Demo link, you can send some static data that is typically for this specific webhook trigger. This allows you to get a brief overview of how the data looks that arrives at the endpoint. Please note: This is static data and does not represent the exact result of live data, so some fields will differ from what the Send Demo offers

Beneath the webhook URLs, you will find two additional buttons (accordions), which offer you further help about the webhook trigger:

Outgoing values

The outgoing values accordion offers you further details about the data setup that we sent via the webhook trigger. The demo data there is usually represented by the demo data that we sent over via the Send Demo feature.

Description

The trigger description gives you a throughout and very detailed guide on how you exactly use this specific webhook trigger. It contains a step-by-step guide on how to set it up, when it is triggered, along with further tips on how to get the best results.

Receive Data (Free & Pro)

This tab is the counter-part to the Send Data feature. It allows you to receive Data from external API’s and services and process them within your WordPress website. To make that happen, this feature offers you one or multiple webhook URLs that you can integrate into other services to make them exchange data with your very own website.
Here is a screenshot of how this feature looks.

Similar to the Send Data ta, you will see a list of URL’s, just that in this case they are provided by our plugin. By default, there is always a single webhook URL available. Each of the available URLs is able to connect with every of the available webhook actions.

Each of the webhook URLs has two indicators. The first one is called Webhook Name and allows you to indicate what you want to use this webhook URL for. This value is used internally to give a bit of extra security to your webhook url since it has to match with the given API key, as well as it counts as an internal identifier of the webhook URL.

The second indicator is the Webbhook API Key, which acts as your security token to only allow you to use the features of WP Webhooks. That mentioned, please do never share your webhook URL with unauthorized people.

The Webhook URL fields simply combines both of the indicators and provides you with a fully functional webhook URL that you can add to your external services to exchange data.

On the right side, you will find some further actions that are related to each of the webhook URLs:

  • On the first position, you will find the Delete button, which allows you to delete the webhook URL you previously added.
  • The Deactivate link allows you to deactivate that specific webhook URL, which results in the URL not being accessible from the outside once an external service tries to send data over (The webhook still works, but it disables access and throws an Error as a response).
  • The Settings link opens a powerful popup that offers you further settings specific to this webhook action, such as data mapping (pro), access tokens (pro), specific endpoint permissions (pro), and more.

Beneath the webhook URLs, you will find all available and active webhook actions. If you do not see any actions within the Available Webhook Actions area, simply head over to the settings page and activate the actions you would like to use.

The “Available Webhook Actions” list with its active actions

Once you click on one of these buttons (accordions), you will see further details about what this webhook endpoint does, along with additional buttons about the webhook action.

The details area after clicking on a webhook action

Down below, we have a throughout explanation of each of the tabs since all of them require some good understanding.

Accepted Arguments

This button (accordion) shows you all available arguments that are available for this specific webhook action.

What is an argument?
What we call an argument is usually the key on the first layer of the JSON, XML or form data. To show that more visible, we added some examples down below:

Here’s where an argument is used within Integromat, Zapier, Postman and mostly any other external service that allows simple webhook functionality.

In case you are going to send a JSON instead of some form values as seen above, your arguments would be the keys on the first layer:

{
  "argument": "value",
  "argument_1": "value 1",
  "argument_2": "value 2"
}

If you are using XML, the arguments are the first layer of the XML element:


    value 1
    value 2
    value 3

This setup counts through every webook-ready service and you can follow that setup using the arguments wherever you want.

How to use Arguments?
The arguments are the settings that your external service can use to do certain actions based on the webhook action that is used. If your external service send over the user email within the user_email argument, it will be identified as the user email.
This allows us to do certain actions using the external data within your WordPress system.

Note: In case you do not have control over the format that the external service uses to send over the data, you can use either a third-party service like Integromat or you can also use our own Data Mapping engine that comes with our Pro version.

Return Values

Once an external service send over some data to your website, we are going to send them some data back, which the external service can use to do further actions based on it. This button (accordion) shows you exactly how this kind of data looks like and what values are set.

Description

This tab contains a fully optimized description of how this specific webhook endpoint works. It offers you a step-by-step guide on setting up this specific webhook action, as well as some tips and a very detailed list of all the special arguments from the Accepted Arguments tab.

What is a Special Argument?
We consider a special argument if it requires data that follows a specific notation. If you only have to add a simple string based on your input, there’s, of course, no explanation needed. But lets assume you want to assign a role and this argument requires a specific slug of an existing role, the Special Argument list tells you how to successfully do that.

Test action

In case you want to directly test a webhook URL with a specific webhook action, you will find the possibility right within the Test action tab. Once you click on it, you will see a dropdown field from which you can choose the webhook URL you want to use to test the action.
Once you have chosen one, multiple fields appear which represent the available arguments of this specific webhook action. Simply fill in the values and press the Test action button at the bottom of the form.

Other Tabs

The other tabs only extend the functionality of both of the above described tabs. Down below, you will find further information to each of them.

Authentication

Using our authentication feature, you can connect our webhook endpoints as well to certain APIs that require authentication. To learn more about it, please see this manual.

Extensions

On the extensions tab, you will find a list with all of our available extensions that offer you additional features for WP Webhooks and WP Webhooks Pro. To learn more about it, please click here.

Whitelist (Pro)

The Whitelist feature allows you to limit the access of incoming webhooks (Receive Data) to only chosen IP addresses. To read more about it, please click here.

Logs (Pro)

The log feature allows you to keep track of every incoming and outgoing data that was send or received by WP Webhooks. To learn more about it, please click here.

Data Mapping (Pro)

Our data mapping feature allows you to map the data based on your needs to the structure of either WP Webhooks or external service. It allows you to make each service compatible with each other. Here are some links to our manuals:

Updated on August 13, 2020

Was this article helpful?

Related Articles