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".
