Passing Alexa variables as shell command line parameters

I have a working Alexa to Home assistant setup passing a variable. I tried a few options but I haven’t been able to pass the variable to my python script using shell command line parameters. Any suggestions for a workaround?

Many thanks.

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}}

Thanks for that. I did try something like that before but I think I didn’t use quotes in the data_template section.

I have my configuration working now.