Post what you’ve got so far. Maybe you’ve got an error? I have this working with a variable passing to a shell script. My action (in the Alexa intent) looks like:
- service: shell_command.speak
data_template:
text: '{{ text }}'
And in my shell command:
speak: bash /home/pi/scripts/speak.sh {{text}}