I have a secure php script that when is run, it sends a variable to a webhook automation. I have got the webhook to trigger, but can not send the php variables.
$dataf = "hello";
$curl_handle = curl_init();
curl_setopt($ch, CURLOPT_POSTFIELDS, $dataf);
curl_setopt($curl_handle, CURLOPT_URL, "https://*********.org:8123/api/webhook/-***********ccJuejG");
curl_exec($curl_handle);
curl_close($curl_handle);
$dataf= "hello";
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, "https://*********.org:8123/api/webhook/-***********ccJuejG?dataf=".$dataf);
curl_exec($curl_handle);
curl_close($curl_handle);
and on the trigger side
- id: '****************'
alias: PHS incoming email
description: ''
trigger:
- platform: webhook
allowed_methods:
- POST
- PUT
- HEAD
- GET
local_only: false
webhook_id:********TccJuejG
condition:
- condition: zone
entity_id: device_tracker.*****
zone: zone.*****
action:
- service: tts.speak
data:
cache: true
media_player_entity_id: media_player.all_speakers
message: Incoming Pacific HotShots email {{trigger.data.dataf}
target:
entity_id: tts.google_en_com_au
mode: single