OpenAI "Message a model" node fails with "Missing fileName parameter" error

I’m trying to connect Airtable to OpenAI using the “Message a model” node. When I execute the workflow, I get this error:

“Cannot publish workflow: 1 node has configuration issues: Node ‘Message a model’ - Missing or invalid required parameters: fileName”

What I’ve done:

  • Connected OpenAI credential (API key verified)
  • Set Model to GPT-4O
  • Added Message 1 with simple text content
  • Set Role to “User”
  • Deleted and rebuilt the node from scratch

The problem:
The OpenAI node should NOT require a “fileName” parameter (that’s for file operations). But the node keeps asking for it.

Version: n8n local installation, Node.js v22

How do I fix this? Why is the OpenAI chat node asking for fileName?

Hey @Faran_hassaan, while you wait for a response, here are some things that might help:

Suggested resources

Automatically matched to your question.

Docs:

Forum:

@bridgewaretech, @Varun_Ramanujam, @mohamed3nan - you’ve helped with similar issues before, can you take a look?

Automatically suggested by n8n’s community bot. It’s a pilot - please share feedback here.

Hi @Faran_hassaan Welcome!
fileName is only required when a message row has Type set to “File” and File Type set to “File Data”, so one of the entries under Messages is sitting on File instead of Text. Open the node, expand every row under Messages, set Type to “Text” on each, and delete any extra File row you aren’t using. If you only ever send text, switching Operation to “Generate a Chat Completion” removes the Type field entirely and the parameter is never asked for.

hi @Faran_hassaan welcome to n8n community!

I just tried message a model node and it worked fine on my side.

If you could share your workflow So I can have more context.

Thanks for letting us know about this, We have created NODE-5692 as the internal dev ticket to look into it.

Hello @Faran_hassaan, I’m currently taking a look at your issue. Could you provide the version of your n8n and a copy of your workflow you’re having this issue with? To get the workflow, you can click “Download” in the workflow options

Hey @Faran_hassaan, since we haven’t heard from you in over two weeks, I’ll close this for now to keep things tidy on our side. However, if the issue still persists, feel free to provide us with more details so we can look into this deeper, thanks!

Hello @RomanDavydchuk @YehorKardash , I hope everyone is doing well, and thank you for taking the time to answer my question.

I sincerely apologize for the extremely delayed response. I’m from Pakistan, where we’ve been experiencing severe flooding. Unfortunately, I was unable to respond earlier as I lost or misplaced a significant amount of my equipment and was dealing with the situation.

I really appreciate your patience and help.

@YehorKardash Because I am a beginner, I am facing many issues and cannot attach my workflow here.

Thank you for understanding.


Hi @Anshul_Namdev , I don’t see any expandable node under messages; attaching a screenshot here for reference.

Message 1 is already expanded, so nothing is hidden there. The whole prompt has been pasted into the Type field with Expression mode switched on, so Type is no longer “Text” and the Prompt box that belongs under Role never appears.

  1. Hover over Type and click Fixed, next to Expression.
  2. Open the Type dropdown and pick Text. A Prompt field appears under Role.
  3. Paste your prompt text into Prompt.
  4. Set Model too, it is still on “Choose…” with a red warning beside it.

Thank you for your guidance. It worked.

Thanks for sharing this solution, @Anshul_Namdev! This is a very subtle UI trap in n8n—accidentally pasting or enabling Expression on the Type field instead of the actual Prompt field breaks the form rendering and triggers confusing missing parameter errors like fileName.

A good tip for anyone running into similar issues with AI nodes: always double-check whether your input fields are toggled to Fixed vs Expression, as it’s easy to misplace a variable and throw off the required schema validation!