Interworky
  • Home
  • Introduction to Interworky
  • Getting Started
    • Account Setup Guide
    • LM Studio (Self Hosted LLM)
  • Integration
    • Integration to WordPress WebSites
    • Integration to Wix Websites
    • Integration to Squarespace Websites
    • Integration to Next.js Websites
    • Integration to React Websites
  • Integration Django Websites
  • Features Overview
    • AI Agent Customization
      • Website Sync
      • Naming & Personality
      • Profile Picture
      • Opening Statement
      • First Message
      • Custom Knowledge Base
      • Customizing the Theme
      • Knowledge Files
    • Capabilities
      • Managed Capabilities
      • Custom Capabilities
      • Importing Custom Capabilities via Postman Collection
    • Interworky Dashboard
    • Interworky AI Agent
    • Post-Visit Survey AI Agent
    • Appointments System
  • Support and Resources
Powered by GitBook
On this page

Integration Django Websites

Step-by-Step Guide: Integrating Interworky AI Agent into Django websites

PreviousIntegration to React WebsitesNextAI Agent Customization

Last updated 2 months ago

Step-by-Step Guide: Integrating Interworky AI Agent into Django

1. Log into the Interworky Dashboard

Create an account or Login at

  • After creating your Interworky account, log into the Interworky dashboard.

  • Navigate to the Integration Page.

  1. Locate the Embed Code

On the Integration Page, locate the Embed Code section and capture your API key.

3. Adding Interworky to Your Django Project

Django supports embedding JavaScript in templates. Follow these steps:

Method 1: Directly Adding the Script to Your Django Template

  1. Open your Django template file where you want to add the chatbot (e.g., base.html or index.html).

  2. Paste the Interworky script inside the <body> tag.

📌 Example (base.html in Django Templates Folder):

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Django Website</title>
</head>
<body>
    
    <!-- Your Website Content -->

    <!-- Interworky AI Chatbot Integration -->
    <script 
        src="https://storage.googleapis.com/multisync/interworky/production/interworky.js"
        data-api-key="your-api-key-here">
    </script>

</body>
</html>

📌 ^^ Replace "your-api-key-here" with your Interworky API key from the dashboard.

Method 2: Using Django’s Static Files Approach

If you prefer to load the script dynamically, follow these steps:

  1. Create a new JavaScript file in your Django static folder:

mkdir -p static/js
touch static/js/interworky.js
  1. Add the script to interworky.js:

document.addEventListener("DOMContentLoaded", function() {
    const script = document.createElement("script");
    script.src = "https://storage.googleapis.com/multisync/interworky/production/interworky.js";
    script.setAttribute("data-api-key", "your-api-key-here"); // Replace with your API key
    document.body.appendChild(script);
});
  1. Include this script in your Django template (base.html):

{% load static %}
<script src="{% static 'js/interworky.js' %}"></script>
  1. Verify the Integration

  • Open your Django website in the browser.

  • Check if the Interworky chatbot widget appears.

If you don’t see it, check the browser console (F12 → Console) for errors.

If you have any questions about the Interworky Django Integration, reach out to our support team at hello@interworky.com.

https://interworky.com
Integration Page on Interworky Dashboard