Webhook

Learn the specifics of developing a webhook plugin.

Select the running environment

The first step to develop a new webhook type plugin is to determine what environment is going to be used:

  • Python

  • NodeJS

Create the file structure

Set up a directory structure with the following files

├── src
│   ├── control.py or control.js  
│   ├── function.py or function.js
│   ├── user_code.py or user_code.js
│   ├── view.xml
├── LICENSE
├── README.md
├── manifest.toml 

Edit control, function and user_code scripts

Fill those files with the content that you require according to the table below, then save them.

Edit view.xml file

Populate this file with content based on the form you'd like displayed when creating this plugin.

Edit the LICENSE and README.md files

Write the contents of the README.md and LICENSE and files.

Edit the manifest.toml file

According to the webhook section within the Private Plugins page, the manifest.toml should look like:

manifest_version = 2.0
 
[settings] 
version = "1.0.56" 
runtime = "nodejs:10" | "python:3.7" 
plugin_type = "webhook" 
license_name = "MIT license" 

[settings.webhook]
default_http_method = "POST" | "GET"
allowed_http_methods =  ["POST", "GET"]

[pricing]
price = 0 

Compressing the files

Compress the files in zip format from the root of the file structure, not the parent folder.

Last updated