Webhook payload to dashboard

I’ve successfully send a payload from my custom device (LoRa) to TTN and from there to losant workflow through http (webhook). I can’t seem to find a way to decode this data and display it through the dashboard.

My http payload is:
“globals”: {
“api_key”: “YOUR_API_KEY”,
“gps_location”: “-----”
“applicationName”: “Test”,
“flowName”: “workflow test”,
“flowId”: “5f65da29f1ef190006c9a38e”,
“flowVersion”: “develop”,
“relayType”: “public”,
“relayId”: “000000000000000000000000”,
“triggerType”: “webhook”,
“triggerId”: “—”,
“applicationId”: “—”,
“data”: {
“body”: {
“downlink_url”: “https://integrations.thethingsnetwork.org/ttn-eu/a-?key=ttn-account-v2.36i-5Le-”,
“metadata”: {
“gateways”: [
“rf_chain”: 0,
“snr”: 5,
“rssi”: -102,
“channel”: 0,
“time”: “”,
“timestamp”: 2653010131,
“gtw_id”: “eui–26”
“coding_rate”: “4/5”,
“data_rate”: “SF7BW125”,
“modulation”: “LORA”,
“frequency”: 868.1,
“time”: “2020-09-21T07:13:58.882405066Z”
////////////////////////////// payload
“payload_fields”: {
“value”: “25.9”,
“sign”: “+”,
“di”: “0”,
“channel”: “01”
“payload_raw”: “MDErMjUuOSAgICAw”,
“counter”: 968,
“port”: 90,
“hardware_serial”: “dfyhdfhyrhsd”,
“dev_id”: “-ng”,
“app_id”: “st-ring”
“query”: {},
“headers”: {
“accept-encoding”: “gzip”,
“content-type”: “application/json”,
“user-agent”: “http-ttn/2.6.0”,
“content-length”: “632”,
“x-forwarded-for”: “-5.45”,
“x-forwarded-proto”: “https”,
“x-real-ip”: “5-5.45”
“method”: “post”,
“path”: “/”
“time”: “2020-09-21T07:13:59.461Z”

some personal information is ommited.

My payload is shown above in payload fields. I would like to display that through the dashboard.
Any help is welcome as i am new to Losant



Welcome to the Losant Forums!

To accomplish this, you will need to build an Application Workflow. Then, you can build a workflow with the following nodes:

  1. Webhook Trigger Node - this will cause a workflow to trigger when you send a message to the webhook.
  2. Next, you mentioned that you need to decode data. We have some great examples of that here.
  3. Device State Node - this allows a workflow to update the state of a device.

After you’ve reported state, then you may display this information on a Dashboard.

To help with this, I recommend going through the Losant Walkthrough. It gives a great example of reporting state and displaying data on a dashboard.

1 Like

Thanks a lot fox.
I followed your steps and it now works nicely.