Chat Trigger File Upload Tutorial

Describe the problem/error/question

I have built a basic AI chat bot workflow that uses the Claude AI Model. I can interact via text chat with no issue. In the chat trigger settings I see an option to allow file uploads. My assumption is that this is to replicate the same kind of experience with the Claude desktop / UEX - where by as a user I can add a document, image, or other to interact with. EG - as an expert marketer tell me your opinion of this sales slick.

Is that expectation correct?

I have experimented with the field and extract pdf to text nodes. I am having a hard time imagining how this will give the AI agent enough context about a document’s design to infer much.

Can someone point me to a tutorial or an FAQ? Specifically, something aimed at adding the same kinds of file types to a chat session that we have come to expect the desktop/uex version of interacting with a LLM.

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: latest (hosted)
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): hosted on n8n
  • Operating system:

Can you provide your workflow json here in a response by clicking the ‘</>’ button? I would like some more context to help answer.

Hi @pkennard

Open a separate workflow and test this suggestion below.
Hope it helps

Can anyone point me to a tutorial or FAQ? Specifically, something that aims to add the same file types to a chat session that we expect from the desktop/Uex version of an LLM interaction.

These 3 documents from N8N will help you.

If this suggestion solved your problem, please mark my post as a solution (blue box with check mark) so that this ongoing discussion does not distract others who want to find the answer to the original question and click the heart. Thanks

Hi everyone,

I’m using n8n Cloud and trying to build a workflow that starts with the Chat Trigger node. I want users to upload a file (for example, a .docx document) directly from their computer via chat, and then process the file content in the following nodes.

Currently, when I upload a file through the chat, the Chat Trigger node output only contains the file metadata (such as fileName, fileSize, mimeType, etc.), but there is no file content, file URL, or binary data included in the output. Here is a sample output I get:

[
  {
    "sessionId": "b29499bae34d49d9ac2be9d2c658726d",
    "action": "sendMessage",
    "chatInput": "switch'ten geçir",
    "files": [
      {
        "fileName": "MockMeetingTranscript.docx",
        "fileSize": "15721 bytes",
        "fileExtension": "docx",
        "fileType": "application",
        "mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
      }
    ]
  }
]

As you can see, there is no file content or download URL.

Is there a way to access the uploaded file’s binary content in the workflow after the Chat Trigger node?
If not, is this feature planned for future releases, or is there a recommended workaround for n8n Cloud users?

Thank you for your help!

I’m in the midst of figuring this out as well. So far, I’ve gathered that we take the file input, pass it to switch to route off the extension (or mime type), then to a “convert to file” node configured for that file type, then to an “extract from file” node configured to read that type.

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