Describe the problem/error/question
My flow initiates with a form which takes a short description and feed it into AI agent node. The node generates the text and feed into the accept form of “Next Form Page”. I could not find any usage of populating that generated text into a textarea. When I use “Using Feilds below”, I inserted a form element of textarea and I set “placeholder” with the generated outuput. But it is a greyed out text and when I execute the node the output value is still empty. If I select “Using Json” like below:
[
{
“fieldLabel”: “Output”,
“fieldType”: “textarea”,
“placeholder”: “{{ $node[‘StoryGen Agent’].json.output }}”,
“requiredField”: true
},
{
“fieldLabel”: “Action”,
“fieldType”: “dropdown”,
“fieldOptions”: {
“values”: [
{
“option”: “Accept”
},
{
“option”: “Rerun”
}
]
},
“requiredField”: true
}
].
Then it complains about “Value is not valid JSON”.
What is the error message (if any)?
Value is not valid JSON
Please share your workflow
Share the output returned by the last node
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system:
Can you please try provide the entire workflow? I am a bit confused. I only see one node. You should be able to easily map items from previous nodes. Unless you are encountering something else?
I already deleted the original node as I can’t get it to work. Basically I need to feed a textarea from the output of AI agent. The textarea should be editable. So user can modify and accept. Anyway of doing it?
I am not sure why you are so confused. Perhaps I am missing something. This is very simple. See here:
Thanks for your reply. The problem is NOT at the AI agent, but at the accept form (2nd form) that takes the OUTPUT of AI agent so that user can click accept or rerun. The node I pasted is the accept form node. How do I configure it so that AI agent output can be viewable and EDITABLE in the textarea inside that form. Thanks again.
Perhaps you need to just use the Basic LLM Chain instead of the AI Agent node. Not sure if Agent is the right usage here (unless you need the tools).
I don’t think the problem is at AI agent or any basic LLC chain. The problem is at how I export the text generated from prior and make it viewable/ editable in the textarea of a form/ or HTML. If my goal is to provide the user a way to review the generated text, I would need a place to hold that…
If you just want the output of the Agent node it would be {{ $json.output }} (in the following node). Or {{ $(‘AI Agent’).item.json.output }} in nodes beyond that. Replace ‘AI Agent’ with the actual node name.
That being said, sometimes the output of the Agent node is not what you actually want, which is why I suggested the Basic LLM Chain.
I have the same issue, i want to set n8n form textarea element a default value, not in placeholder.