The idea is:
I want to be able to pass metadata to n8n hosted Chat Triggers using query parameters.
Say I have a “Hosted Chat” Chat Trigger which is publicly available, as shown in the screenshot below. When sending a message, and checking the execution of the workflow, I can see metadata is passed from the Chat to the execution, and those are basically user metadata.
Say this chat is accessed through https://url/abc/chat
I was thinking on passing query parameters, such as https://url/abc/chat?q=123, and access them as metadata, so I can reuse the same webhook, passing parameters to it.
I know what I’m trying to do is doable via external embedded chats, as explained in this topic, as you can pass metadata as a parameter, but I’m looking for a way to do it on the n8n hosted chat as well.
My use case:
One use case would be for a Question and Answer Chain plugged to a Vector Store. I want to connect the chat to different Collection Names, one at a time. Currently the only way is to create many Chat Webhooks, which doesn’t scale any well. I don’t believe that should be the case, since I only want to change a single parameter, the Collection Name, between chats.
I think it would be beneficial to add this because:
This would add flexibility to the Chat Trigger, which is only currently available with embedding.
Any resources to support this?
This topic was previously discussed here.
Are you willing to work on this?
Sure.