Please help to figure out issues with files
Workflow idea: It should create files from JSON data and feed it to OpenAI assistant.
- Get a batch of resumes (JSON) and split it into individual itemsSplit into individual items (resumes)
- Generate an individual file for every resume and save user_id
- Create an OpenAI assistant and feed it the generated files
- Process data
- Cleanup (delete files from OpenAI, from n8n and delete agent)
Issues :
- I can not extract user_id from previous node (node “extract_user_id”). Proposed notation of {{$node[‘SplitResumes’].json}} does not work.
const user_id = $node[“SplitResumes”].json[“user_id”] gives error “Cannot find name ‘$node’.” - Converting to files node always name file as “file.txt” despite of name that I provide with {{ $json.fileName }}
- I can not find out how to feed these files to AI. In Knowledge box it expects something like {{ [“file-NUvCYUWc4McZwTuiBQBRXh”] }} and does not accept file by mask or variable.
Please help.
P.S. n8n community, 1.84.3