Botpress integration in bubble

Hi everyone! I’m working on integrating my Bubble.io wellness app with a Botpress Cloud chatbot (AI coach), and I’m running into challenges getting real-time, two-way data synchronization between the two platforms. Here’s what I’m trying to do:

I’m trying to integrate my Bubble app with Botpress Cloud using the API Connector, but I’m running into several issues. I’m trying to send user data (like weight and waist size) via a POST request to https://api.botpress.cloud/v1/bots/{botId}/users/{userId}/variables, and retrieve plans via a GET request from the same endpoint. However, I’m getting errors like “The API call returns a non-object and you picked JSON”

Requirements:

  • When a user submits data (like weight and waist size) in Bubble, I need to send that to Botpress and store it in user.variables.
  • Then, I need to fetch user-specific plans (nutrition, workout, supplement) from Botpress and display them in the Bubble UI.
  • I also want any updates made to plans in Botpress to be reflected automatically in Bubble, ideally using webhooks or a similar method.
    Can someone help me with this

Can you share the raw response that the api call received?

when i select data type json i get this error
There was an issue setting up your call.

The API call returns a non-object and you picked JSON. Please check.

and when i select data type empty

{
“body”: null,
“error”: {
“status_code”: 200,
“status_message”: “OK”,
“body”: “"\n<html lang=\"en\">\n \n <meta charset=\"UTF-8\" />\n \n <link rel=\"icon\" type=\"image/svg+xml\" href=\"/favicon/bp.svg\" />\n \n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n Botpress\n \n /* Default to light mode /\n body {\n background-color: white;\n color: black;\n }\n / Dark mode styles */\n @media (prefers-color-scheme: dark) {\n body {\n background-color: #121212;\n color: white;\n }\n }\n \n <link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&family=Noto+Sans+Mono:wght@100;200;300;400;500;600;700;800;900&display=swap\\\” rel=\"stylesheet\">\n \n <script type=\"module\" crossorigin src=\"/assets/index-v5pdz_yF.js\">\n <link rel=\"stylesheet\" crossorigin href=\"/assets/index-CtCLLa73.css\">\n \n \n <div id=\"root\">\n \n\n""
},
“returned_an_error”: false
}

this is the raw response

“body”: null,
“error”: {
“status_code”: 200,
“status_message”: “OK”,

Looks like there is no data being returned for the API call. I’d say you take a look at the logs in BotPress.

This topic was automatically closed after 70 days. New replies are no longer allowed.