AI Agent Node Error: "Cannot read properties of undefined (reading 'content')" When Using Custom OpenAI-Compatible API

Describe the problem/error/question

I’m using the When Chat Message Received trigger → AI Agent node flow. The AI Agent is connected to a custom OpenAI-compatible API (running locally).

The request reaches my API, and my API returns a valid OpenAI-like response. However, the AI Agent node throws this error:

Cannot read properties of undefined (reading 'content')

Why is this happening? Is there a specific response format expected by the AI Agent node?


What is the error message (if any)?

Cannot read properties of undefined (reading 'content')


1 Like

I think your AI response might be missing the message or content field.
If you can share the detailed workflow, maybe I can help.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.