Introduction

This guide provides a comprehensive explanation on how to use the Webhooks node in LeadsHook.

Step by Step Instructions

Video guide:

Configuring the Webhooks node on Leadshook

1. On the decision tree canvas, add a Webhooks node

2. Configure the Webhooks node


Data can be added using JSON format, https://jsoneditoronline.org/ can be used to verify the validity of the JSON code

Method

The GET method is used to retrieve data from a web server.

The PUT method completely replaces whatever currently exists at the target URL with something else.

The HTTP POST method is used to send user-generated data to the web server.

In order to send data from LeadsHook to the payload URL, we can use POST method.

Payload URL

For the payload URL, you may use https://webhook.site, your own server, a Zapier webhook, or a tool like PipeDream.

In this article, we will use https://webhook.site for demonstration.

Important: for webhooks to work, the decision tree must be activated – here is how.

Adding custom fields in JSON

In the webhook node, under “Data”, we can also incorporate custom field, here is an example:


Remember to add double quotation marks (“) before and after the custom field

See More 

JSON Structure

A JSON object contains zero, one, or more key-value pairs, also called properties. The object is surrounded by curly braces {}. Every key-value pair is separated by a comma. The order of the key-value pair is irrelevant.

A key-value pair consists of a key and a value, separated by a colon (:). The key is a string, which identifies the key-value pair. The value can be any of the following data types:

stringsurrounded by quotation marks (” “)
number
float
arrayJSON array
objectJSON object (can be nested)
booleantrue or false
emptynull

JSON Data Type and Syntaxh

JSON Strings must be written in double quotes. Example: { “name”:”John” }

JSON Numbers must be an integer or a floating point. Example: { “age”:30 }

JSON Objects: Objects as values in JSON must follow the same rules as JSON objects. Example: { “employee”:{ “name”:”John”, “age”:30, “city”:”New York” } }

JSON Arrays. Example: { “employees”:[ “John”, “Anna”, “Peter” ] }

JSON Booleans (true/false). Example: { “sale”:true }

JSON null. Example: { “middlename”:null }

Validating the JSON syntax

The JSON data syntax can be checked on JSON Editor.

JSON Editor will show the syntax error of the JSON data

Conclusion:

The Webhooks node in LeadsHook is a powerful tool that allows the seamless integration of your decision tree with third-party services. By structuring your JSON data correctly and configuring the Webhooks node as outlined in this guide, you can extend the functionality of LeadsHook to meet your specific needs.

FAQs:

  • Can I use more than one Webhooks node in a decision tree?
    • Yes, you may incorporate multiple Webhooks nodes in a single decision tree as required.

Additional references:

Working with Webhooks

Webhooks for Productive Developers

What Are Webhooks?

The Difference Between APIs and Webhooks Explained By Selling Seasonal Produce on Your Farm

JSON Editor

Comparing HTTP Methods

Comments are closed.