← Back to Blog
Create your first webhook URL
Create a new webhook
- Go to the Webhooks page
- Click on the "Create" button
- Fill in the form with the following information:
- Name: The name of the webhook
- Application: The application to link the webhook to
- Device: The device to link the webhook to
- Message: The message to send when the webhook is triggered
- Click on the "Create" button
- Copy the URL of the webhook
In the message we specify * to get all the JSON and determine what parameters we need.
How JSON parser works
Webhooks are essential for real-time data transmission between applications. Follow these steps to configure webhooks efficiently and ensure seamless integration with your systems.
- Define Your JSON Payload Structure
Identify the data format you wish to receive. To capture the full dataset, use the wildcard symbol * in your configuration. This ensures the entire JSON payload is delivered without filtering. - Extract Specific Data from Nested JSON
For targeting individual fields within nested objects, use the syntax%objectName.field%
. For example,%params.name%
extracts the name value from the params object.
{
"event": {
"title": "New Order",
"message": "A new order has been placed with ID 12345",
"tags": ["order", "new"],
"users": [
{"first": "Dale", "last": "Murphy", "age": 44, "nets": ["ig", "fb", "tw"]},
{"first": "Roger", "last": "Craig", "age": 68, "nets": ["fb", "tw"]},
{"first": "Jane", "last": "Murphy", "age": 47, "nets": ["ig", "tw"]}
]
}
}
To set up the webhook, you would configure it like this:
- If you want to display the entire JSON, simply use the *
- To get the title of the event, use
%event.title%
- To get the message, use
%event.message%
- To get the tags, use
%event.tags%
Title: %event.title%
Message: %event.message%
Tags: %event.tags%
Users: %event.users.0%
First user: %event.users.0.first% %event.users.0.last%
Here is an example of how the output would look using the provided configuration based on the example JSON:
Title: New Order
Message: A new order has been placed with ID 12345
Tags: ["order","new"]
Users: {"age":44,"first":"Dale","last":"Murphy","nets":["ig","fb","tw"]}
First user: Dale Murphy
More information about the variables can be found in the GJSON Path Syntax.
25.01.2025