I’m using the AI Agent node along with a tool (Perplexity) in my workflow.
The problem is that the AI Agent wraps the tool input in a nested object, which causes issues with placeholder resolution in the tool node.
The tool expects:
{ “query”: “how old is bill gates” }
But the AI Agent sends:
{ “query”: { “query”: “how old is bill gates” } }
This breaks the placeholder configuration that expects a string (like {{query}}), resulting in a misconfiguration error.
What is the error message (if any)?
Error in sub-node ‘Perplexity’
Misconfigured placeholder: ‘query’
Please share your workflow
I’m happy to share a sample, but essentially:
Trigger: Chat message received
AI Agent node
Tool: Perplexity
Agent sends: { query: { query: “…” } }
Perplexity tool node uses placeholder {{query}}, or {{query.query}} inside JSON
Share the output returned by the last node
{
“query”: {
“query”: “how old is Frei Gilson”
}
}
Thanks for the detailed explanation. The issue seems to stem from a type mismatch between how the placeholder is defined and what the AI Agent actually sends.
Option 2: Adjust the Request Body to Match the Object Structure
If you want to keep the type as “String”, update the body to reference the nested value directly:
{ "role": "user", "content": {query} }
This way, the placeholder resolves correctly even with the nested structure.
Once you’ve tested and resolved your situation, and don’t mind, please mark my previous post and @mohamed3nan post as the solution (blue box with check mark) so that this ongoing discussion doesn’t distract others who want to find out the answer to the original question. Thanks.