I had made a flow using an old version of N8N and now that I updated it is giving some conflict with the “Function” node
I check in the spreadsheet if a certain user ID already exists and then I look for the history of questions, and through this code I skip lines and then forward it to the HTTP Request for the chatbase
However there has been some formatting change coming out of the Function node which has resulted in an error
ERROR: The data in “Body Parameters” is not valid JSON. Set Body Content Type to “RAW/Custom” for XML or other types of payloads
NodeOperationError: The data in “Body Parameters” is not valid JSON. Set Body Content Type to “RAW/Custom” for XML or other types of payloads
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V1/HttpRequestV1.node.js:704:35)
at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:652:28)
at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:596:53
Could you please rewrite the Function Nodes with the correct formatting please? I do not understand much
Sorry if the writing is bad, I’m using google translator
The sheets node searches for the user’s interaction history with the chatbase, if the bot has previously responded with a line break, the http request does not work, I did the test manually editing and removing this line break and it happened normally. Is there any way to resolve this?