Hi @123,
After a short detour fixing some other elements, I picked up this one up again.
After fixing SSL certificate issues on all sides of the communication, I got a few steps further but now I’m stuck.
I tested my webhook with cURL which works well as you can see in the screenshot below:

But whenever I invoke the SynoAI script to sent a webhook, I get an error:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 105, in async_handle_webhook
response = await webhook["handler"](hass, webhook_id, request)
File "/usr/src/homeassistant/homeassistant/components/webhook/trigger.py", line 30, in _handle_webhook
result["data"] = await request.post()
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_request.py", line 649, in post
assert field.name is not None
AssertionError
After doing several test with cURL and webhook.site, I’m pretty sure it is because the script is including (what I think is) the Content-Type header in the message.
--83a9b3c4-a879-47e4-b803-11bbbef8f3f3
Content-Type: application/json; charset=utf-8
Content-Disposition: form-data
["car","person"]
--83a9b3c4-a879-47e4-b803-11bbbef8f3f3--
and not just the data fields:
["car","person"]
It looks like that the python library web_request.py
does not process this well. Close to where web_request.py
exits with an error, there is a comment in the code mentioning about the possible existence of this header.
# Note that according to RFC 7578, the Content-Type header
# is optional, even for files, so we can't assume it's
# present.
# https://tools.ietf.org/html/rfc7578#section-4.4
Can you confirm you did a cURL POST (or PUT) with only the data ie
curl -X PUT -H "Content-Type: application/json" -d '["car", "person"]' --insecure https://homeassistant:8123/api/webhook/line_crossing_driveway
or
`curl -X PUT -d '["car", "person"]' --insecure https://homeassistant:8123/api/webhook/line_crossing_driveway`
I’m to much of noob to get into the phyton coding but if you confirm your test method, I could try my luck in the web_request.py
github repository