Skip to main content

n8n integration for RAG workflows

Connect Biel.ai to n8n to query your indexed documentation from any workflow. Use it to build support assistants, Slack bots, email automation, or any workflow that needs answers from your docs.

info

This integration requires a Business or Enterprise plan for API access.

Prerequisites​

  • A Biel.ai account with documentation indexed.
  • A Business or Enterprise plan.
  • An n8n instance (cloud or self-hosted).
  • Your project slug from the Biel.ai dashboard.
  • An API key from Team → API keys, with Project access set to your project and chats_create permission.

Setup​

1. Create a new workflow​

Create a new workflow with the following nodes:

  1. Trigger node (e.g., Webhook, Manual, Slack)
  2. HTTP Request node to query Biel.ai
  3. Output node to return results

2. Configure the HTTP Request node​

Add an HTTP Request node with these settings:

Method: POST

URL: https://app.biel.ai/api/v2/projects/YOUR_PROJECT_SLUG/chats/

Headers:

{
"Content-Type": "application/json",
"Authorization": "Api-Key YOUR_API_KEY"
}

Replace YOUR_API_KEY with your API key from your Biel.ai team settings.

Body (JSON):

{
"message": "={{ $json.question }}"
}

Replace YOUR_PROJECT_SLUG with your project slug from the Biel.ai dashboard.

For the full API reference, see Biel.ai REST API.

3. Process the response​

The chat API returns a structured response:

{
"user_message_id": "message-id",
"ai_message": {
"from": "ai",
"message": "AI-generated answer based on your documentation...",
"messageId": "ai-message-id",
"isPartial": false,
"timestamp": "2024-01-01T00:00:00Z",
"sources": [
{
"title": "Source page title",
"url": "https://docs.example.com/source"
}
]
},
"chat_uuid": "unique-conversation-id",
"restore_token": "opaque-conversation-token"
}

4. Continue the conversation (optional)​

Retain both chat_uuid and restore_token from the response. For each subsequent request to the same project endpoint, set the X-Chat-Restore-Token header to the stored token (for example, ={{ $json.previousRestoreToken }}) and include the stored chat_uuid:

{
"message": "={{ $json.question }}",
"chat_uuid": "={{ $json.previousChatId }}"
}