How could I send a JSON-Object via curl to an Incoming Webhook from Microsoft Teams? The JSON is filled with content from a variable.
alarmmeldung=`cat file.txt`
curl -H 'Content-Type: application/json' -d '{"text": $alarmmeldung}' https://incomingwebhookurl
Always I get "Bad payload received by generic incoming webhook" as response.
If I put quotes around the $alarmmeldung then the request could be sent but I get the text $alarmmeldung. What I actually want is the content of $alarmmeldung.
How I have to write the curl statement?