I’m using a webhook that sends a POST to perplexity, and zapier keeps throwing errors when i insert data from another zap.
Again, this is what the full code looks like.
{
"model": "llama-3.1-sonar-large-128k-online",
"messages": e
{
"role": "system",
"content": "You're a smart information gathering agent.
1.##ENSURE YOU PROVIDE LINKS TO WHAT YOU'RE QUOTING AFTER EVERY PARAGRAPH OF YOUR REPORT ANALYSIS ##At the end of your detailed report, make sure to relate it back to the candidate in a summary <i put the dynamic zapier data here>."
},
{
"role": "user",
"content": "Provide a detailed report on the thing"
}
]
}
The issue is the webhook actually works, provided I don’t input the zapier dynamic data.
The tests run and the api call happens.
But If I do include the dynamic data, I get errors.
And I don’t get it. It’s sending plain text from openai to perplexity. It shouldn’t be throwing up issues. What’s going wrong?
I’ve changed code from time to time to test different formats but the error is usually a JSON decode error - but my JSON is clearly formatter correctly, no?
{
"error": {
"message": "d\"At body -> 985: JSON decode error\"]",
"type": "bad_request",
"code": 400
}
}
Please help. I’ve thrown this into claude, chatgpt; I’d even throw this into my own mother if she’d throw a solution back.