I have an AI action writing an AI summary of data from the previous action, I want to submit this AI summary as a ticket to FreshService. N8N throws the below error. As far as I can tell the output is text… should be fine?
What is the error message (if any)?
TypeError: Cannot read properties of undefined (reading ‘description’) at ExecuteContext.freshserviceApiRequest (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Freshservice/GenericFunctions.ts:53:19) at processTicksAndRejections (node:internal/process/task_queues:105:5) at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Freshservice/Freshservice.node.ts:1303:22) at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1091:8) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1272:11) at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1673:27 at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2287:11
This error indicates that the Freshservice “Create a ticket” node is trying to access a description property that doesn’t exist in the data it’s receiving from the previous node (the AI model).
The Problem
The AI model node outputs data in a specific structure, but the Freshservice node expects a different format. When it tries to read description, it’s getting undefined
How to fix
1. Check what data the AI node is outputting:
Click on the AI model node
Look at the output data in the execution view
The data likely has a structure like { message: { text: “…” } } or { output: “…” }
2. Fix the Freshservice node mapping:
In the “Create a ticket” node, you need to correctly map the AI output to the description field:
Click on the Create a ticket node
Find the Description field
Instead of using a simple reference, use an expression like:
{{ $json.message.text }}
or
{{ $json.output }}
(depending on your AI node’s output structure)
3. Common expressions to try:
{{ $(‘Message a model’).item.json.output }}
{{ $(‘Message a model’).item.json.message.text }}
{{ $json.text }} (if the data is directly available)
4. Ensure required fields are filled:
The Freshservice ticket creation requires certain fields like:
Description (the one causing the error)
Email or Requester ID
Subject
Priority, Status, etc.
Quick debug steps to try
Add a Set node between the AI node and Freshservice node
Configure it to explicitly set the fields you need
This gives you more control over the data structure