@nirkons wrote:
Hi guys/gals,
I’m trying to use webhooks and automation to forward an incoming webhook with it’s payload but I just can’t seem to get it working.
Configuration in yaml:
shell_command: forwardjson: > curl -X POST -H 'Content-Type: application/json' -d '{{ data }}' {{ url }}
Automation:
Trigger webhook + my webhook IDAction:
data: data: trigger.json url: 'http://MyEndpoint:port' service: shell_command.forwardjson
ive tried variations of {{trigger.json}}/{trigger.json}, trigger.data/trigger.payload
message:
data_template:
value_template:
following the docs here
I either get the literal value “trigger.json” in the receiving end or an error in homeassistant from the shell component (returned error code 3 or error code 6 NoneType: None)
this is an example curl I sent to homeassistant
curl --request POST \ --url http://HomeAsisstant:8123/api/webhook/MyWebhookID\ --header 'content-type: application/json' \ --data '{ "data":"Forwarded" }'
Any ideas what I’m doing wrng?
Posts: 3
Participants: 2