Pre-Filled Message Templates for Chat URLs

Is it possible to add a message pre-fill to the chat url?

image

https://n8n.domain.com/webhook/....../chat?text={Prefill message here}
image

This is useful when I have a standard templated initial message.

Example:

when I need to input multiple pieces of information to the chatbot when the chat starts (Health measurements for example)

Height: ____
Weight: ____
Waist: ____

Then the user can just fill the necessary info in front of each instead of typing all of that

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Hey @brahimh , what you are asking of is rather a feature of Form node. Perhaps you could ask the customer to go to the specific URL and fill in the form. Moreover, the URL could have a query parameter reflecting the current session ID as in ?sessionId=abc123. This parameter will be included in the JSON holding the submitted data. Thus, you will be able to link the chat session back to the submitted form data.

{
  "Name": "John",
  "submittedAt": "2024-12-30T15:13:59.946-05:00",
  "formMode": "production",
  "formQueryParameters": {
    "sessionId": "abc123"   // <--- sessionId
  }
}
2 Likes

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