← Website AI Chatbot


This API connects a trusted backend to the n8n workflow. Authenticate every request with the Header Auth name and secret configured on the webhook.

Request

Send POST to the production website-ai-chatbot webhook:

{
  "message": "What topics does this website cover?",
  "sessionId": "demo-001"
}

Accepted message keys are message, query and text. Session keys are sessionId and session_id; x-chat-session is also supported. The normalizer accepts JSON-string or plain-text bodies and extracts user-agent and optional language hints. The classifier prompts remain English-oriented.

Search response

This example shows the expected shape; confirm each route's actual output during setup.

{
  "type": "search_results",
  "query": "What topics does this website cover?",
  "results": [
    {
      "title": "Example page",
      "url": "https://example.com/page",
      "summary": "Summary grounded in the retrieved content."
    }
  ],
  "follow_up": ""
}

The parser limits results to five. With insufficient context, the agent is instructed to return an empty array and a clarification.

Text responses and errors

Reject returns type: text, the query and a predefined reply. Smalltalk returns a model-generated text response. Validate that its formatter produces valid JSON with a non-empty text field.

The response node uses application/json; charset=utf-8. There is no persistent memory despite session identifiers, and no standardized error body for every provider failure. The client must safely render text and URLs and handle the error responses observed in testing.