Not able to find "Allow File upload" option in embedded chat mode

Describe the problem/error/question

I need to upload file from chat , but the “Allow File upload” option is only available in ‘Chat Trigger’ activity in ‘Hosted’ and not in ‘Embedded mode’

What is the error message (if any)?

No Error message

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.)
```{
  "nodes": [
    {
      "parameters": {
        "public": true,
        "mode": "webhook",
        "options": {}
      },
      "id": "709becac-4bbd-4d12-955c-7d61927af7a0",
      "name": "When chat message received1",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        -400,
        200
      ],
      "webhookId": "531f90f4-03fa-42ac-a8f0-45025dd970d6",
      "notesInFlow": false
    }
  ],
  "connections": {
    "When chat message received1": {
      "main": [
        []
      ]
    }
  },
  "pinData": {}
}

## Share the output returned by the last node
<!-- If you need help with data transformations, please also share your expected output. -->

## Information on your n8n setup
- **n8n version:** [email protected]
- **Database (default: SQLite):**
- **n8n EXECUTIONS_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):** Cloud
- **Operating system:** Windows
- 
![embedded chat|301x500](upload://AfPVjCZgeF8dk1QiVhUYQlyllaB.jpeg)
![Hosted|292x500](upload://n0cRdKq3fCWfouE4sa2yAbvDP72.jpeg)


@ria / @robtf9 can you please let me know as we are actively working on customer POC where we need to upload attachment in chat in embedded mode from a website.

hi @Arunkumarasokan

By embedding the chat, you need to write the code to your needs. In this case, allowing file uploads should look something like this:

<link href="https://cdn.jsdelivr.net/npm/@n8n/chat/dist/style.css" rel="stylesheet" />
<script type="module">
	import { createChat } from 'https://cdn.jsdelivr.net/npm/@n8n/chat/dist/chat.bundle.es.js';

	createChat({
		webhookUrl: 'YOUR_PRODUCTION_WEBHOOK_URL',
        allowFileUploads: true,
	});
</script>

You can check all available options here: n8n/packages/@n8n/chat/src/types/options.ts at master · n8n-io/n8n · GitHub

also: @n8n/chat - npm

Hope this helps!

3 Likes

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