that's exactly what i was looking for, thank you!
No i'm not in the emulator, i've published the bot and have the proper zapier subscription to facilitate the functionality so now it's just a matter of getting it all set up properly.
Here's what i've done:
I set up an execute code card to perform the following post webhook:
const currentDateAndTime = luxon.DateTime.now().toISO()
const sendData = {
"conversationId": event.conversationId,
"curDateTime": currentDateAndTime,
"info1": "test"
}
const webhookUrl =
try {
const response = await axios.post(webhookUrl, sendData)
const webhookResponse = response.data
console.log(webhookResponse)
workflow.test2 = webhookResponse;
} catch (error) {
console.log(error)
}
This sends perfectly and is passing the information directly to zapier, and i'm even getting the proper information in the post webhook that is
leaving zapier
I set up a trigger which goes to an execute code card, and the following is the code i currently have in there (i think this is probably where i'm falling short in establishing the connection)
const webhookUrl = 'my botpress webhook url'
try {
const response = await axios.get(webhookUrl)
const webhookResponse = response.data
event.conversationId = event.payload.body.conversationId
workflow.test2 = webhookResponse;
console.log(webhookResponse)
} catch (error) {
console.log(error)
}
when i run the chatbot through the chat option in the dashboard (not in the emulator) and go to zapier, its still giving me a 502 error code when it tries to send the info to botpress.
Looking forward to your response! This will be super helpful once this gets set up