Hello,
I started using The Things Stack a few months ago and so, still discovering many of the available functionalities. I am struggling with Webhooks Integrations functionalities, and would be grateful if someone could help me
Task Description:
- MKRWAN 1310 send messages to the TTN.
- Use TTN Webhooks to send messages to Slack.
Configuration:
- An end-device (MKRWAN 1310) is sending messages to the TTN. Messages are decoded in the uplink payload formatters using a custom javascript formatter (decodedUplink) function.
- Example of a receive message is as follow:
"received_at": "2023-06-21T12:00:01.843661970Z",
"uplink_message": {
"session_key_id": "Axxx...",
"f_port": 2,
"f_cnt": 122,
"frm_payload": "U3RhdHVzIEFjdGl2ZQ==",
"decoded_payload": {
"msg": "Status Active"
},
- Webhook has been configured in Slack to be sent to a Slack channel called “lora-test”. Following this Slack tutorial - Sending messages using Incoming Webhooks | Slack. Testing the sample curl request provided by Slack directly from a terminal, a “Hello, World!” message is received in the Slack Channel.
curl -X POST -H 'Content-type: application/json' --data
'{"text":"Hello, World!"}'
https://hooks.slack.com/services/Txxx/Bxxx/zxxx
- Creating a new custom webhook in the TTN using as BaseURL
https://hooks.slack.com/services/Txxx/Bxxx/zxxx
and ticking the uplink message box by replacing /path/to/webhook with Txxx/Bxxx/zxxx no messages arrived in the Slack channel. - Testing if messages from TTN are sent using the webhook.site ( https://webhook.site ) mentioned by @descartes in thread Webhook and Payload Formatter I can confirm that the messages arrive.
So if messages arrived on webhook.site, why are the messages not being received on the Slack Channel?
Note that I am only interested in the “decoded_payload: {msg: “”}” part of the content.
Thank you in advance for your help.
Aude