ages old question but since there is no answer so far and I just found a solution while having the same problem I’m posting it here. You can access the trigger payload with trigger.data + the parameter/attribute you would like to retrieve. See below yaml example snippet where I get the value for filename
alias: automation_name
description: ""
triggers:
- trigger: webhook
allowed_methods:
- POST
- PUT
- GET
- HEAD
local_only: true
webhook_id: "-your_webhook_id"
conditions: []
actions:
- action: mqtt.publish
metadata: {}
data:
evaluate_payload: true
qos: 0
retain: false
topic: /your/mqtt/topic
payload: "{{ trigger.data.filename }}"
mode: single