< Go back to blog
Tutorials

January 28, 2025

How to Add Content to a Knowledge Base Using Dumpling AI’s API

Keeping your knowledge base up-to-date is vital for ensuring accurate and efficient access to information. Dumpling AI’s Add to Knowledge Base API simplifies this process by automating content uploads and indexing. By integrating this API with Make.com, you can create a seamless workflow for updating your knowledge base.

In this guide, we’ll explore the API, describe how Make.com modules can be configured, and outline their inputs, uses, and potential applications.

What Does the API Do?

The Add to Knowledge Base API allows you to upload content into a specific knowledge base, where it’s split into smaller chunks, embedded, and made searchable for similarity-based queries.

Automating the Process with Make.com

Make.com offers a visual interface to automate workflows. Here’s how you can set up a scenario for updating your knowledge base.

Step 1: Set Up the Trigger Module

Module: Google Drive: Watch Files

  • Inputs:
    • Folder ID: Specify the folder to monitor for new files.
    • File Type: Choose the file type (e.g., PDF, DOCX).
  • Use: Detects new files in the specified folder.

Step 2: Retrieving the File from Google Drive

This ensures the PDF file is retrieved in a format that can be processed by Dumpling AI.

  1. Add Google Drive Module for File Retrieval
    • Add Google Drive: Get a File.
    • Connection: Use the existing Google Drive connection.

File ID: Map the file ID from the previous Google Drive trigger ({{1.id}}).

Step 3: Extract Text from the File

Module: Dumpling AI: PDF to Text

  1. Add Dumpling AI Module
    • Add Dumpling AI: PDF to Text.
    • Connection: Choose your Dumpling AI account.
    • Input Method: Set to Base64.
    • File: Map the base64-encoded file data from the previous Google Drive step ({{base64(3.data)}}).
  2. Configure Extraction Settings

Pages: Leave blank to extract text from all pages or specify page numbers if needed.

Step 4: Adding Extracted Text to Dumpling AI’s Knowledge Base Using HTTP Request

This step uses the HTTP request module to send the extracted text to Dumpling AI’s knowledge base via the API.

Add HTTP Request Module

  1. Add HTTP: Make a Request.
  2. Configure the module:
    • Method: POST.
    • URL: https://api.dumplingai.com/api/v1/knowledge-bases/add.

Headers:
{

  “Content-Type”: “application/json”,

  “Authorization”: “Bearer YOUR_API_KEY”

}

  • Body Type: Raw.

Request Body:

{

  “knowledgeBaseId”: “YOUR_KNOWLEDGE_BASE_ID”,

  “name”: “{{2.name}}”,

  “content”: “{{3.text}}”

}

Step 4: Notify the Team

Module: Slack: Send a Message

  • Inputs:
    • Channel ID: Specify the Slack channel for notifications.
    • Message: Craft a message to inform the team about the update.

Use: Keeps stakeholders informed about new knowledge base updates.

Best Practices for Using Make.com with Dumpling AI

  1. Optimize Content:
    Ensure the uploaded content is concise and relevant to minimize credit usage (1 credit per 10,000 characters).
  2. Monitor Usage:
    Use Make.com’s error-handling features to retry failed requests or alert you about issues.

Review API Documentation:
Refer to the Dumpling AI API Documentation for details on rate limits and advanced configurations.

Conclusion

This workflow is a game-changer for businesses handling large volumes of documents. Automating the process ensures your knowledge base stays up-to-date with minimal effort. Whether it’s contracts, research papers, or reports, all your critical information is just a search away. If you’d like to learn how to add resources to your Dumpling AI knowledge base using the dedicated Dumpling AI module in Make.com, be sure to check out this detailed guide: Here

Related Posts

How to Use Dumpling AI’s Scrape URL Endpoint in Make.com
Tutorials

How to Use Dumpling AI’s Scrape URL Endpoint in Make.com

February 3, 2025

How to Use Dumpling AI’s Get YouTube Transcript Endpoint in Make.com
Tutorials

How to Use Dumpling AI’s Get YouTube Transcript Endpoint in Make.com

January 31, 2025

Understanding the Dumpling AI Generate AI Image with FLUX.1 Dev in Make.com
Tutorials

Understanding the Dumpling AI Generate AI Image with FLUX.1 Dev in Make.com

January 25, 2025

Understanding the Dumpling AI Generate AI Images with FLUX.1 Schnell
Tutorials

Understanding the Dumpling AI Generate AI Images with FLUX.1 Schnell

January 22, 2025

Understanding Dumpling AI Search Knowledge Base Module in Make.com
Tutorials

Understanding Dumpling AI Search Knowledge Base Module in Make.com

January 19, 2025

How to Find All URLs on a Domain for Scraping
Tutorials

How to Find All URLs on a Domain for Scraping

January 16, 2025