Sending an N8N payload to Botpress

This may not be the place for this, but I figured I’d reach out and see if there’s anybody on this forum who could help me.

I am trying to send an HTTP request from N8N to Botpress so that I can using the body from the request and store it as a variable in Botpress. When I execute the HTTP node, it says “Invalid JSON response in body”, however it still sends to Botpress. Unfortunately, it is giving me “invalid payload” errors whenever I try to use the body outside of the testing stage for the bot.

Wondering if there’s anybody familiar enough with Botpress (or structuring payloads) that could help.

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Ash_Ketchum17,

Welcome to the community :cake:

It sounds like Botpress might not be happy with the data you are sending, Do you have an example of the data you are sending and the link to the Botpres documentation you are following?

Hey Jon,

Thanks so much for responding to my question and sorry for the delay in getting back to you.

What I’m essentially trying to do is send a JSON string to Botpress so that I can extract and assign it to a variable within my chatbot. For example, if I use N8N to get data from a row in an Excel Doc, I’d want to be able to get the data, send it to Botpress in the form of a payload, then have my chatbot send it to my user in the Botpress chat. Once again, this might be more of a Botpress issue, but figure I’d reach out in case anybody here knows how to properly format the payload.

I am using an HTTP node and sending a POST request to Botpress. The headers I am using are in the image below, and I believe they’re formatted correctly.

For the actual body, I am having a lot of trouble. I’ve tried all sorts of different formats, but am having no luck. Here is the documentation for sending a Webhook to Botpress Webhook - Botpress Documentation. This unfortunately, hasn’t given me much help. In my Botpress logs, I keep getting “missing conversation ID”, but that isn’t mentioned anywhere in the Botpress Webhook docs.

I found this thread on Github, which is essentially the exact same problem I am having: request/body must have required property 'conversationId' - Webhook integration · Issue #12787 · botpress/botpress · GitHub. The solution they found was to send the “Conversation ID” and “User ID” from Botpress to Postman, incorporate it into the payload, and then send it back to Botpress thereafter, which I have done (using N8N instead of Postman); however, I’m still having difficulty when it comes to how to structure the payload.

I am relatively new to using HTTP requests and am not sure exactly what I am doing wrong. I’ve tried formatting the payload in the exact same manner as the individual from the git thread, however, every time I just receive the same response from N8N: “invalid JSON in Body”.

Once again, not sure if this is the proper place to receive this kind of consultation, but wondering if anyone in here can help me. Happy to provide any additional information if it’d be helpful!

Thanks!

Also, just fyi I removed my “x-bp-secret” from the image - it’s just a secret passkey for your Botpress webhook".

image