Hello - I’m trying to use an N8N workflow as a referenced tool in an AI Agent I’m building. I’ve configured the agent to send the flow email contact and context info in the following schema (example):
{
"recipient":"John Doe",
"address":"[email protected]",
"context":"I am reaching out to inquire about your availability for a meeting next week. Please let me know when you are free to discuss further. Thank you."}"
When I run the agent, it creates a ‘query’ wrapper around the json payload and sends it as such:
[
{
"query":
"{"recipient":"John Doe","address":"[email protected]","context":"I am contacting you to inquire about your availability for a call next week. Please let me know the dates and times that work best for you. Thank you."}"
}
]
Now, when I go into the config for the tool and use an edit fields node to extract the fields from the JSON payload it’s not recognizing the field addresses. I could use some help generating the correct syntax for the field address formula in the edit fields node.
Currently I’m using the following for each:
recipient: {{ $json.query.recipient }}
address: `{{ $json.query.address }}
context: {{ $json.query.context }}
But as you can see in the screenshot it is not picking up any of these values. Any help is much appreciated!