I'm trying to send a message to slack using the curl command. I wanted to use a variable in the curl command
curl -X POST -H 'Content-type: application/json' --data '{"text": $text }' "https://hooks.slack.com/services/blabla"
here the $text refers to the text I want to send.
this is how $text looks like
text="The following jobs are in queue: $jobs"
If you try echo'ing thext, it will be something like
echo $text
The following jobs are in queue: "job1" "job2"
But the above curl command is giving invalidpaylod