Help on HTTP post
# 🤝help
f
I am using N8N (Zapier alternative) to send data from an HTTP request node to Botpress, so that I can receive data and use it in a conversation. I'm able to receive the 'POST' request via webhooks and see the data in "discover events", but then when I try to use the data in conversation it says it's missing a "conversation" and "bot" id. I then sent that data to N8N, and then tried again by sending the HTTP post request with the Bot ID and Client ID attached, but I still got the same error. Anybody know why this is happening? Am happy to provide more detail. Thanks!
c
Can you show me your flow and where you're using the n8n integration? I too am using an N8N integration but instead of using the webhooks module I am using the code card with an axios post request then returning the response from n8n using the "webhook response" card in n8n.
f
Hey @careful-kitchen-31087, thanks for the response I hadn't seen your message. I am going to tag you in another help post that I made which has all the details in it, but I hadn't thought to try your method using the "webhook response" card and axios post request. That sounds like it'd be so much easier than what I'm trying to do! Would you be willing to share your code card with me (excluding any private details) or help walk me through how you were able to do it? I'm relatively new to post requests and have had difficulty getting N8N to send the data back correctly. Thanks and just let me know!
Hey @careful-kitchen-31087, wondering if you saw my previous message and the other thread I tagged you in? Still trying to figure this out but I'd be extremely interested in learning more about your approach to integrating with N8N if you'd be willing to share?
c
@freezing-morning-36045 I did not! Can you share the link here?
f
Absoluetly! Here is a link: https://discord.com/channels/1108396290624213082/1111009377525186570/threads/1223702597408522240 (down below as well). I tagged you as well! I'm very novice when it comes to HTTP post requests, so forgive me if I use improper terminology or don't explain things adequately. I'm happy to elaborate or clarify anything if needed! Basically just trying to setup a POST request so I can send data from N8N to Botpress and use it in coversation. I've tried a lot of different strategies at this point, but nothing has worked. In the thread, the method I tried was to setup a webhook node in Botpress and send the data from N8N using my webhook trigger. While I was able to receive the data within the Botpress emulator, when I tried to use it in an actual conversation, it said the payload was missing the "conversation" and/or "userid". I tried to circumnavigate this by setting up a Webhook node in N8N, sending the conversation/userId to N8N from Botpress, and then send the payload from N8N to Botpress with the Id's attatched, but I kept receiving the same error. I'm not sure if I simply structured the payload incorrectly or if this method just doesn't work, but I'd be very interested to try the method you proposed? I hadn't thought of using a return node and setting up an axios post request simply because, once again, I'm not the most well-versed in HTTP post requests, but at this point I am keen on trying any method that will allow me to send the data from N8N to Botpress and use it in conversation!
c
you have to await the response inside the code card, then move forward. Also, make sure in n8n on the first workflow trigger card you have it set to respond at the end with the workflow response card not immediately (this was a big dumb moment for me)
f
Hey @careful-kitchen-31087, just figured out how to get it to work! Thank you so much for your input. I've been at this for months with no luck, so you just saved me HOURS (if not days) of trial and error!
2 Views