n8n · AI Agent node

Internal error: 400 Invalid value for 'content'

Short answer

This n8n AI Agent error can occur if the Prompt input contains a null value. Make sure your expressions reference valid fields and resolve to valid input rather than null.

VerifiedLast verified

01Error text

n8n error
Internal error
Error: 400 Invalid value for 'content': expected a string, got null.

02Likely causes

  • Prompt is set to Define below and an expression in Text isn't generating a value.
  • Prompt is set to Connected Chat Trigger Node and the incoming data has null values.

03How to fix it

  1. Make sure your expressions reference valid fields and resolve to valid input rather than null.
  2. Remove any null values from the chatInput field of the input node.

04Official documentation

Test every fix in a non-production environment before you apply it to production. See how entries are verified.

More for n8n work:Open n8n jobsn8n rates and salaries

The iPaaS Brief

Subscribe to The iPaaS Brief.

The iPaaS newsletter for the people who run integrations. From iPaaS Group.

Free. You finish on theipaasbrief.com and confirm by email.