How do you properly pass dynamic data into the JSON body of a custom webhook?
Every time I try, I get an error “We could not parse the JSON body of your request. (HINT: This likely means you aren't using your HTTP library correctly.” If I run the scenario and test the input with JSONLint, it comes back as valid JSON. If I copy the JSON without variable data into the webhook body, the action works.
I have tried using a formatter step to put all of the JSON into one variable that I then pass through. That still does not work.
Here’s an example, if I type this directly, then the action step works.
{
"model": "gpt-3.5-turbo",
"messages": e{
"role": "user",
"content": "Please draft a concise email. Email Ashley about buying tickets to the conference on Friday."
}],
"temperature": 0.7
}
If instead I use a variable, then it doesn’t.
{
"model": "gpt-3.5-turbo",
"messages": {
"role": "user",
"content": "Please draft a concise email. {{187961999__output}}"
}],
"temperature": 0.7
}