Getting Started Concepts The Things Stack Cloud The Things Stack Enterprise Integrations API Hardware
Get The Things Stack

Integrations

    Overview
  • Adding Applications
  • Data Formats
  • Payload Formatters
  • Webhooks
    • Creating Webhooks
    • Scheduling Downlinks
    • Webhook Path Variables
    • Webhook Retries
    • Webhook Templates
      • Format
      • Instantiation
      • Adding Webhook Templates
    • Troubleshooting Webhooks
  • Storage Integration
  • Integrate with popular IoT platforms
  • Other integrations
  • Application Packages
  • Examples

Adding Webhook Templates

The Things Stack uses Webhook templates from the lorawan-webhook-templates Github repository.

The lorawan-webhook-templates repository is open source, so users are free to submit pull requests to add new Webhook templates. Naturally, before submitting a new Webhook template in a pull request, one would want to test if the template is correct, i.e. if it yields an integration that is working as expected. A common way to test a newly built Webhook template is to deploy The Things Stack on a local machine (see installation), while configuring the deployment to use the locally stored Webhook templates.

Once you have created a new Webhook template with a proper format, follow these steps:

  1. Clone the lorawan-webhook-templates Github repository to a local folder (e.g. /home/webhook-templates).

  2. Store your Webhook template as a YAML file in the previously mentioned folder (e.g. /home/webhook-templates/my-template.yml).

  3. Include your Webhook template in the pre-existing templates.yml file contained in the previously mentioned folder.

  4. Include the following lines in The Things Stack configuration file (ttn-lw-stack.yml):

as:
  webhooks:
    templates:
      directory: "/home/webhook-templates" # replace with a path to a local folder where you stored Webhook templates

Note that you can skip this step and use --as.webhooks.templates.directory command line option when running The Things Stack (step 5) instead.

  1. Run The Things Stack.
Note:
If you followed the steps above but cannot see your template deployed, make sure that The Things Stack instance you’re running is actually using the configuration file mentioned in step 4.

Finally, when The Things Stack is running, go to the Console and select Webhooks tab in Integrations menu. Click the Add webhook button and you will see your newly created template as an integration tile. At this point, you can test your Webhook template.

Webhook template successfully added

To make your Webhook template publicly available when the next The Things Stack version is deployed, open a pull request in the lorawan-webhook-templates Github repository.

← Instantiation Troubleshooting Webhooks →

On this page

Sections

Getting Started

Concepts

The Things Stack Cloud

The Things Stack Enterprise

Integrations

API

Hardware

Sitemap

View our Sitemap

Contributing

GitHub

About Us

The Things Industries