ChatRAG Documentation

Everything you need to build, customize, and deploy AI agents that work with your content.

Getting Started

ChatRAG helps you build AI agents that answer based on your documents. Get up and running in just a few minutes with our simple setup process.

Upload Content

Add PDFs, URLs, or paste text

Customize Agent

Set personality and behavior

Deploy Anywhere

Embed on your website

Quick Start

  1. 1. Sign up and create your first agent
  2. 2. Upload PDFs, URLs, or paste content
  3. 3. Start chatting in your interaction
  4. 4. Embed on your website when ready

Watch: How to Create Your First Agent

Follow this step-by-step video guide to create an agent in ChatRAG.

Embedding

Embed your AI agent on any website with just one line of code. The widget is fully responsive and customizable to match your brand.

Bubble Embed

html
<script 
  src="https://chatrag.co/embed.min.js" 
  data-agent-id="your-agent-id">
</script>

Secure User Authentication

For secure user identification, generate an HMAC token using your user's userID and embed secret key. This ensures authentic user sessions and prevents spoofing.

javascript
// Backend implementation
const crypto = require('crypto');

const userId = 'user123';
const secretKey = 'your-embed-secret-key'; // From specific agents embedding

const hmacToken = crypto
  .createHmac('sha256', secretKey)
  .update(userId)
  .digest('hex');

// Include in embed script
<script>
window.chatragUserConfig = {
  user_id: "your-application-user-id",
  user_hash: "generated hash code",
  user_metadata: {
    email: "user email",
    name: "user name",
    other data's....
  }
};
</script>

<script
  src="https://chatrag.co/embed.min.js"
  data-agent-id="your-agentid"
  defer
></script>;

Security Benefits

  • • Prevents unauthorized users from impersonating others
  • • Enables secure user-specific conversation history
  • • Allows personalized agent responses based on user data
  • • Required for advanced integrations and user tracking

Integrations

Connect ChatRAG with your favorite tools to automate workflows and enhance productivity.

🚀 Setting up integrations

Each integration can be configured in your specific agent's "Flow" tab. Simply connect your accounts and you're good to go.

Slack

Real-time team notifications

HubSpot

Create contacts and tickets

Discord

Community updates and alerts

Notion

Feedback & lead collection

Airtable

Feedback & lead collection

Slack Integration Setup

Connect your ChatRAG agent to Slack to receive real-time notifications when users interact with your AI assistant, submit feedback, or become leads.

Prerequisites - Create #support Channel First

Before connecting ChatRAG to Slack, you must create a channel named exactly #support in your Slack workspace. ChatRAG will automatically send notifications to this channel.

Quick Setup Overview

  1. 1. Create a #support channel in your Slack workspace
  2. 2. Go to your agent's "Flow" tab in the specific agents
  3. 3. Find the Slack integration and click "Connect"
  4. 4. Authorize ChatRAG to access your Slack workspace
  5. 5. Invite the ChatRAG bot to your #support channel
  6. 6. Test the integration

Step 1: Create the #support Channel

ChatRAG looks for a specific channel to send notifications. Follow these steps:

  1. 1. Open your Slack workspace

    Navigate to the workspace where you want to receive ChatRAG notifications

  2. 2. Create a new channel

    Click the "+" next to "Channels" in your sidebar, then "Create a channel"

  3. 3. Name it exactly "support"

    The channel name must be exactly support (lowercase, no #)

  4. 4. Add relevant team members

    Invite team members who should receive ChatRAG notifications

Step 2: Connect ChatRAG to Slack

Now connect your ChatRAG agent to your Slack workspace:

  1. 1. Open your specific agents

    Navigate to your agents and select the one you want to connect

  2. 2. Go to the "Flow" tab

    This is where all integrations are configured

  3. 3. Find the Slack integration card

    Look for the Slack logo and "Real-time team notifications" description

  4. 4. Click "Connect"

    This will redirect you to Slack's authorization page

  5. 5. Review permissions and authorize

    ChatRAG needs permission to send messages to channels

Step 3: Invite ChatRAG Bot to #support Channel

After authorization, you need to invite the ChatRAG bot to your support channel:

  1. 1. Go to your #support channel

    Navigate to the support channel you created

  2. 2. Type the invite command
    text
    /invite @ChatRAG

    Or use: /add @ChatRAG

  3. 3. Confirm the invitation

    You should see a message that ChatRAG has been added to the channel

What Notifications You'll Receive

Once configured, ChatRAG will send notifications to your #support channel for:

User Interactions

  • • New conversations started
  • • User escalation requests
  • • High-priority user inquiries

Business Events

  • • New feedback submissions
  • • Lead capture notifications
  • • System alerts and errors

Testing Your Integration

Test your Slack integration to ensure everything is working:

Test Steps:

  1. 1. Go to your ChatRAG agent's chat interface
  2. 2. Submit test feedback: "This is a test feedback message"
  3. 3. Check your #support channel for a notification
  4. 4. Try capturing a test lead with contact information
  5. 5. Verify the lead notification appears in Slack

Troubleshooting Tips

  • • Ensure the channel is named exactly "support" (lowercase)
  • • Verify ChatRAG bot has been invited to the channel
  • • Check that your Slack workspace allows app integrations
  • • Make sure you have admin permissions in the workspace
  • • Try disconnecting and reconnecting the integration

Customizing Notifications

You can customize which events trigger Slack notifications in your agent's Flow settings:

Available Notification Types:

  • • All user messages (high volume)
  • • Feedback submissions only
  • • Lead captures only
  • • Escalation requests only
  • • Critical errors only

Discord Integration Setup

Connect your ChatRAG agent to Discord to receive notifications, and automated alerts when users interact with your AI assistant.

Prerequisites - Create "support" Channel First

Before connecting ChatRAG to Discord, you must create a text channel named exactly support in your Discord server. ChatRAG will automatically send notifications to this channel.

Quick Setup Overview

  1. 1. Create a support channel in your Discord server
  2. 2. Ensure you have "Manage Server" permissions
  3. 3. Go to your agent's "Flow" tab in the specific agents
  4. 4. Find the Discord integration and click "Connect"
  5. 5. Authorize ChatRAG bot to join your server
  6. 6. Verify bot permissions in the support channel
  7. 7. Test the integration

Step 1: Create the Support Channel

ChatRAG requires a specific channel to send notifications. Here's how to create it:

  1. 1. Open your Discord server

    Navigate to the server where you want to receive ChatRAG notifications

  2. 2. Create a new text channel

    Right-click on a category or the channel list, then select "Create Channel"

  3. 3. Choose "Text Channel"

    Select the text channel option from the channel type menu

  4. 4. Name it exactly "support"

    The channel name must be exactly support (lowercase, no spaces)

  5. 5. Set appropriate permissions

    Ensure your team members can view and read messages in this channel

Step 2: Check Your Permissions

You need specific permissions to add the ChatRAG bot to your server:

Required Permissions:

  • Manage Server - To invite bots
  • Administrator - Recommended for setup
  • Manage Channels - To configure channel permissions

If you don't have these permissions, ask a server administrator to help with the setup.

Step 3: Connect ChatRAG to Discord

Now connect your ChatRAG agent to your Discord server:

  1. 1. Open your specific agents

    Navigate to your agents and select the one you want to connect

  2. 2. Go to the "Flow" tab

    This is where all integrations are configured

  3. 3. Find the Discord integration card

    Look for the Discord logo and "Community updates and alerts" description

  4. 4. Click "Connect"

    This will redirect you to Discord's authorization page

  5. 5. Select your server

    Choose the server where you created the support channel

  6. 6. Review and authorize permissions

    ChatRAG needs permission to send messages and read channel information

Step 4: Configure Bot Permissions

After adding the bot, configure its permissions in your support channel:

  1. 1. Right-click the #support channel

    This opens the channel context menu

  2. 2. Select "Edit Channel"

    Navigate to the channel settings

  3. 3. Go to "Permissions" tab

    This is where you manage channel-specific permissions

  4. 4. Add the ChatRAG bot

    Click the "+" next to roles/members and search for "ChatRAG"

  5. 5. Grant necessary permissions

    Ensure the bot can send messages

What Notifications You'll Receive

Once configured, ChatRAG will send notifications to your #support channel for various events:

User Activity

  • • User escalation requests
  • • Feedback submissions

System Events

  • • Lead capture notifications
  • • Error alerts and warnings

Troubleshooting Tips

  • • Ensure the channel is named exactly "support" (lowercase)
  • • Verify ChatRAG bot has "Send Messages" permission
  • • Check that your server allows bots to join
  • • Make sure you have "Manage Server" permissions
  • • Try removing and re-adding the bot if issues persist
  • • Ensure your server isn't at the bot limit (rare)

Notion Integration Setup

After connecting your Notion workspace, you need to create two specific databases to enable feedback collection and lead generation features.

Quick Setup Steps

  1. 1. Connect your Notion workspace in the integrations tab
  2. 2. Create a "Feedback" database with specified properties
  3. 3. Create a "Leads" database with specified properties
  4. 4. Test the integration with sample data

Step 1: Create Feedback Database

In your connected Notion workspace, create a new database named exactly "Feedback"with the following properties:

👉 Use Feedback DB Notion Template
Property NameTypeRequiredNotes
Customer NameTextWill default to 'Anonymous' if not provided
EmailEmailFor follow-up communication
FeedbackTextMain feedback content
RatingNumberCustomer rating (1-5 or 1-10)
CategorySelectOptions: Bug Report, Feature Request, General, Complaint
Date SubmittedDateAuto-populated

Step 2: Create Leads Database

In your connected Notion workspace, create another new database named exactly "Leads"with the following properties:

👉 Use Leads DB Notion Template
Property NameTypeRequiredNotes
NameTitleLead's full name
EmailEmailPrimary contact email
CompanyTextCompany/Organization name
PhonePhoneContact phone number
SourceSelectOptions: Website, Social Media, Referral, Other
InterestTextWhat they're interested in
NotesTextAdditional notes
Date AddedDateAuto-populated
StatusSelectOptions: New, Contacted, Qualified, Converted

Critical Requirements

  • • Use the notion template provided to make sure all works excepted.
  • • All the listed columns must be present in the table.
  • • Database names must be exactly "Feedback" and "Leads" (case-sensitive)
  • • Property names must match exactly as listed above
  • • Property types must be correct
  • • Databases must be in the connected workspace

Testing Your Setup

Once you've created both databases, test the integration by asking your AI assistant:

Test Feedback Collection:

"I'd like to submit feedback: Your product is amazing!"

Test Lead Capture:

"Please add John Smith (john@example.com) from Tech Corp as a new lead"

Usage Examples

Once setup is complete, your AI assistant can automatically collect feedback and capture leads:

Feedback Collection

  • • "I want to leave feedback about your service"
  • • "The app crashed when I tried to upload a file"
  • • "Love the new dashboard design!"
  • • "Your support team was incredibly helpful"

Lead Capture

  • • "I'm interested in your enterprise plan"
  • • "Can someone contact me about pricing?"
  • • "I was referred by John and want to learn more"
  • • "Schedule a demo for our team"

Airtable Integration Setup

You need to create a base called "ChatRAG Integration" with two specific tables to enable feedback collection and lead generation features before connecting your airtable account to chatrag.

⚠️ Important: Create Base BEFORE Connecting

You must create the "ChatRAG Integration" base with both "Feedback" and "Leads" tables before connecting Airtable to ChatRAG in your agents AI Flow tab. The integration will look for these specific tables and won't work without them.

Quick Setup Steps

  1. 1. Connect your Airtable workspace in the flow tab
  2. 2. Create a base named exactly "ChatRAG Integration"
  3. 3. Inside this base, create a "Feedback" table with specified fields
  4. 4. Inside this base, create a "Leads" table with specified fields
  5. 5. Test the integration with sample data
👉 Use Complete ChatRAG Integration Base Template

Step 1: Create ChatRAG Integration Base

First, create a new base in your Airtable workspace:

  1. 1. Go to your Airtable workspace
  2. 2. Click "Create a base"
  3. 3. Choose "Start from scratch"
  4. 4. Name it exactly: ChatRAG Integration
  5. 5. Delete the default "Table 1" that comes with the base

Step 2: Create Feedback Table

Inside your "ChatRAG Integration" base, create a new table named exactly "Feedback" with the following fields:

Property NameTypeRequiredNotes
Customer NameSingle line textWill default to 'Anonymous' if not provided
EmailEmailFor follow-up communication
FeedbackLong textMain feedback content
RatingNumberCustomer rating (1-10)
Date SubmittedDateAuto-populated

Step 3: Create Leads Table

Inside the same "ChatRAG Integration" base, create another table named exactly "Leads" with the following fields:

Property NameTypeRequiredNotes
NameSingle line textLead's full name
EmailEmailPrimary contact email
CompanySingle line textCompany/Organization name
PhonePhone numberContact phone number
DateDateAuto-populated

Critical Requirements

  • • Use the Airtable template provided to ensure everything works as expected
  • • Base name must be exactly "ChatRAG Integration" (case-sensitive)
  • • Table names must be exactly "Feedback" and "Leads" (case-sensitive)
  • • All the listed fields must be present in each table
  • • Field names must match exactly as listed above
  • • Field types must be correct
  • • Both tables must be in the same base

Testing Your Setup

Once you've created the base with both tables, test the integration by asking your AI assistant:

Test Feedback Collection:

"I'd like to submit feedback: Your product is amazing!"

Test Lead Capture:

"Please add John Smith (john@example.com) from Tech Corp as a new lead"

Final Base Structure

Your completed Airtable setup should look like this:

📁 ChatRAG Integration (Base)
📊 Feedback (Table)
• Customer Name, Email, Feedback, Rating, Date Submitted
📊 Leads (Table)
• Name, Email, Company, Phone, Date

Usage Examples

Once setup is complete, your AI assistant can automatically collect feedback and capture leads:

Feedback Collection

  • • "I want to leave feedback about your service"
  • • "The app crashed when I tried to upload a file"
  • • "Love the new dashboard design!"
  • • "Your support team was incredibly helpful"

Lead Capture

  • • "I'm interested in your enterprise plan"
  • • "Can someone contact me about pricing?"
  • • "I was referred by John and want to learn more"
  • • "Schedule a demo for our team"

Troubleshooting

Common issues and solutions to help you get the most out of ChatRAG.

Embed widget not appearing?

Ensure the embed script is loaded correctly and your agent ID is valid. Check browser console for any errors.

Agent responses are inaccurate?

Try uploading more relevant content or adjusting your agent's instructions. Quality of data directly impacts response accuracy.

Notion integration not working?

Verify database names are exactly 'Feedback' and 'Leads' (case-sensitive). Check that all properties exist with correct types and names.

Feedback not appearing in Notion?

Ensure the Feedback database has all required properties: Customer Name (Text), Feedback (Text), and Date Submitted (Date). Check integration permissions.

Airtable integration not working?

Verify base names are exactly 'Feedback' and 'Leads' (case-sensitive). Check that all fields exist with correct types and names.

Feedback not appearing in Airtable?

Ensure the Feedback base has all required fields: Customer Name (Single line text), Feedback (Long text), and Date Submitted (Date). Check integration permissions and API access.

Still need help?

Can't find what you're looking for? I am here to help.

Contact Support

Ready to build your AI agent?

Join thousands of teams already using ChatRAG to deliver exceptional customer support.