Botpress Integration

Botpress (opens in a new tab) is a low-code chatbot builder platform for building conversational AI agents. This guide outlines how to integrate Botpress with Weavel to leverage advanced analytics capabilities.

Import data from Botpress

Easily import your Botpress bot's user interactions and conversation logs into Weavel. This integration allows Weavel's AI to analyze the data, providing insights into user behaviors and bot performance that can enhance your conversational strategies.

This is a one-time import process that transfers your historical data from Botpress to Weavel.

  1. Access Import Settings: Go to Settings > Importers and choose Botpress.
  2. Enter Botpress Details: Input your Botpress Bot ID (UUID) and Personal Access Token (PAT). Specify the start date for data import.
    • Botpress Bot ID (UUID) is an unique identifier can be found in the URL of your Botpress project dashboard.
    • Botpress Personal Access Token (PAT) is used to authenticate the data import process.
    • Specify the start date from which you want to begin importing your conversation data.
  3. Start Import: Click Import to begin transferring data to Weavel.

The import process may take anywhere from a few minutes to several hours, depending on the volume of data.

Log messages in real time

You can directly log data from the Botpress studio in real time by using the Weavel integration. To enable real-time data logging from Botpress to Weavel, integrate directly with Botpress Studio. This integration allows you to view your bot's conversations and analysis reports on Weavel in realtime, and also enables you to send Track Events to Weavel - such as user form submissions, button clicks, and other custom events.

You can follow the interactive tutorial below to integrate Weavel with Botpress Studio.

Or if you prefer, you can follow the step-by-step guide on Botpress (opens in a new tab).

Advanced usage (w/ action cards)

Identify users

Example

Use this card to identify users in Weavel. This will populate the user's profile in Weavel with the provided user id, name, email, and other details.

Log track event

You can use this function to log track events to Weavel. This is useful for tracking user interactions and events in your bot, such as button clicks, successful form submissions, and other custom events.

Log message metadata

Example

Use this card to log metadata for specific messages. This is useful for capturing additional context for specific messages, such as user feedback score, details for AI generated messages (knowledge base, AI model, etc.), etc.

Some additional setup is required for this action card to work:

  1. Add four workflow variables to your bot: incomingMessageId, outgoingMessageId, messageId, and metadata. If you have copied the hooks from the previous section, you will see that these variables are used to store the message ids for incoming and outgoing messages.

  2. Just after the card that sends/receives the message where you want to log metadata to, add an Execute code action card to set the messageId variable. Copy one of the following code snippets into the card:

// If you want to log the user's message
workflow.messageId = workflow.incomingMessageId
// If you want to log the assistant's message
workflow.messageId = workflow.outgoingMessageId
  1. Before the Log Message Metadata action card, add an Execute code action card to declare the metadata as a JSON string. Refer to the example below:
workflow.metadata = JSON.stringify({
  feedbackScore: 5,
  model: 'gpt-3.5-turbo'
})