Zapier integration
Get answers from your indexed documentation in a Zapier workflow.
Prerequisites
- A Biel.ai account with documentation indexed.
- An active Biel.ai plan or trial. Query API access is included on every plan.
- A Zapier account.
- Your project slug from the Biel.ai dashboard.
- An API key from Team → API keys, with Project access set to your project and
chats_createpermission.
Setup
1. Create a new Zap
Create a new Zap with the following steps:
- Trigger (e.g., New Email, Slack Message, Form Submission)
- Webhooks by Zapier action to query Biel.ai
- Action to return or send results (e.g., Send Email, Post to Slack)
2. Configure the Webhooks action
Add a Webhooks by Zapier > POST action with these settings:
URL: https://app.biel.ai/api/v2/projects/YOUR_PROJECT_SLUG/chats/
Payload Type: json
Data:
| Key | Value |
|---|---|
message | Question from step 1 |
Replace Question from step 1 with the field from your trigger that contains the user's question. Replace YOUR_PROJECT_SLUG with your project slug from the Biel.ai dashboard.
Headers:
| Key | Value |
|---|---|
Content-Type | application/json |
Authorization | Api-Key YOUR_API_KEY |
Replace YOUR_API_KEY with your API key from your Biel.ai team settings.
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"
}
Use the returned data in subsequent steps:
Ai Message Message- The AI-generated answerAi Message Sources- Array of source documents with citationsChat Uuid- Conversation ID for multi-turn chats
4. Continue the conversation (optional)
Store both chat_uuid and restore_token from the response using Storage by Zapier. For each subsequent request to the same project endpoint, set the X-Chat-Restore-Token header to the stored Restore Token value and include the stored conversation ID:
Data:
| Key | Value |
|---|---|
message | Question from step 1 |
chat_uuid | Chat Uuid from step 2 |