beginner

Button menu chatbot for n8n, no AI required

A menu-driven chat widget with no AI model and no per-conversation AI cost. Visitors click buttons instead of typing, and you edit every answer in one place.

ChatbotNo AI

Prerequisites

  • An n8n instance, cloud or self-hosted
  • A chat widget that sends chatInput and shows followUpPrompts as buttons, such as N8N Chat UI
  • Your questions and answers sketched as a small menu tree (five to ten branches is a good start)

A chat widget where visitors click their way to an answer instead of typing. There is no AI model, no API key and no AI bill. Everything the bot can say lives in one menu tree that you edit.

What you'll build

A widget that greets visitors with a few buttons, such as Pricing, Services and Talk to a person, and walks them through pre-written answers. Each answer comes with its own follow-up buttons until they get what they need or ask for a person.

This is not a lesser version of the AI recipes. It is the right tool when your content is small and stable enough that a menu covers it better than free text. Pricing, shipping policy and opening hours are questions with a small set of real answers, and skipping the model means nothing can misunderstand a question.

How it works

  • A webhook receives each message from the widget and checks a shared secret.
  • A button click arrives as plain text, exactly as if the visitor had typed the label.
  • A Code node compares that text with every button label in the whole menu tree, ignoring case and surrounding spaces, and finds the node it points to.
  • The reply returns that node's message and its buttons as followUpPrompts. If nothing matches, the bot falls back to the start menu.

What it costs

The workflow is free to download and use, and there is no AI model, so there is no per-conversation AI bill. Your n8n hosting applies as normal. For N8N Chat UI plans, see pricing.

Set it up

  1. Import the workflow. Download the file with the button at the top of this page and import it with Workflows → Import from File.
  2. Write your menu tree. Open Chatbot settings and edit menu_tree. Each entry has a name, a message and a list of options. Each option has a label (the button text) and a next (the name of the node it leads to).
  3. Choose a secret. Put a random string in webhook_secret. Your widget sends it so nobody else can call your workflow. It is a deterrent, not strong security: anything sent from a browser can be read.

A small tree looks like this:

{
  "start": {
    "message": "Hi! What can I help with?",
    "options": [
      { "label": "Pricing", "next": "pricing" },
      { "label": "Services", "next": "services" },
      { "label": "Talk to a person", "next": "handoff" }
    ]
  },
  "pricing": {
    "message": "Our plans start at [PRICE]/month.",
    "options": [{ "label": "Back to menu", "next": "start" }]
  }
}

Warning: Every button label must be unique across the whole tree, not just within one node. Matching checks every button in every node, so if two buttons share a label, whichever appears last in the JSON wins and visitors are sent to the wrong branch with no error. Reusing a label is only safe when every copy should lead to the same place, such as Back to menu. Give different destinations different wording, for example Talk to sales and Talk to support.

Test it

Send a test click before you connect a widget. n8n's built-in chat panel needs a Chat Trigger, so it will not open for this workflow. Instead, click Test workflow, then send a POST request to the Test URL shown on the Chat webhook node:

curl -X POST 'YOUR_TEST_URL' \
  -H 'Content-Type: application/json' \
  -d '{"chatInput":"Pricing","sessionId":"test-1","metadata":{"webhook_secret":"YOUR_SECRET"}}'

The response contains output and followUpPrompts. The test URL listens for one request each time you click Test workflow; activate the workflow to use the production URL for repeated testing.

Change chatInput to each button label in turn. Every reply should carry the right buttons, and Back to menu should return to the start.

Add it to your site

Activate the workflow and use its production webhook URL as your widget's chat endpoint. Send the same secret in the widget metadata, for example metadata: { webhook_secret: 'YOUR_SECRET' }. The metadata docs explain how metadata reaches n8n.

The widget needs to show the followUpPrompts array as buttons and send the clicked label back as the next message. N8N Chat UI does this out of the box.

Troubleshooting

A button repeats the same message or returns to the start menu

The next value does not match a real node name in the tree. Names must match exactly, and a typo falls back to the start menu without an error.

A button jumps to the wrong place

Check whether that exact label appears anywhere else in menu_tree. See the warning above.

Can visitors type instead of clicking?

Partly. Matching ignores case and surrounding spaces, so "pricing" matches a Pricing button. Anything that is not close to a label falls back to the start menu. If visitors keep typing real questions, the AI FAQ recipe is a better fit.

I get a 401 as soon as I test

The Request from your widget? check compares metadata.webhook_secret in the request with webhook_secret in Chatbot settings. If they differ, or the request has no metadata, the workflow returns a 401.

Take it further

When the menu keeps growing, or visitors keep typing questions it cannot match, move to the AI FAQ chatbot. For deeper branching without AI, see the multi-step button chatbot.