I have built a workflow, locally in n8n it works as needed, completes as needed with the desired result.
When I test this workflow through a web widget, I get the wrong result in the end.
There are no errors.
The workflow is saved and active.
<script type="module">
import { createChat } from 'https://cdn.jsdelivr.net/npm/@n8n/chat/dist/chat.bundle.es.js';
createChat(
{
webhookUrl: 'https://n8n.bzz.me/webhook/a2c99bf9-7f39-48b0-b6bf-de261739fc95/chat',
initialMessages: [
'Hi there! π',
'My name is Joe. How can I assist you today?'
],
enableStreaming: true
}
)
</script>
Looks like it is working for me, you ask questions and got answers, at the end it dumps the variables you asked for βnameβ and βbirthdayβ, what are you planning to do after you collect the data send it back to n8n to store or sending it another workflow.
The user does not need to show the collected date, as we can see in the screenshot from the Web Widget, he needs to send the last message, as in the case of the chat on the n8n side.
I plan to save the received data to the database later, but this is not the main thing right now.
<script type="module">
import { createChat } from 'https://cdn.jsdelivr.net/npm/@n8n/chat/dist/chat.bundle.es.js';
createChat(
{
webhookUrl: 'https://n8n.bzz.me/webhook/a2c99bf9-7f39-48b0-b6bf-de261739fc95/chat',
initialMessages: [
'Hi there! π',
'My name is Joe. How can I assist you today?'
],
enableStreaming: true
}
)
</script>