https://discord.gg/botpress logo
hey everyone, I need some help using Botpress, bas...
# 🌎general
r
hey everyone, I need some help using Botpress, basically I have created a bot that gathers user data such as their name, email, and phone number. This data is then sent to a Zap on Zapier using a get command on zapier, and using axios.post in execute code on botpress. Zapier checks if a record of this user exists in a database, if it does, it creates a variable zapier_search_success and sets it to true, if it doesn't find a record, this variable is set to false. my question now is, how can i send this variable back from zapier to botpress. i assume it would be by using a post on zapier and a get on botpress, but i do not know what url to use and how to get it. I would really appreciate if someone can help me out
e
Hey @ripe-notebook-8972, the best way to solve this would be to make the request to database directly from the Execute Code, so that you get an instant response of whether the user exists already or not. But if that's not possible, you can achieve that with our Webhook integration and with the Triggers feature, here's an outline of the steps. 1. Capture user email and phone 2. Make request to a Zapier webhook with the data 3. In the zap, check in database if the user exists 4. Set a value to a variable called user_exists or something 5. Make a request to the Botpress webhook (browse the hub, install it, copy the URL and paste it on Zapier, use a specific path like
webhook-url.com/user_info
so that you can use the same webhook for different operations) (include the variable in the request body) 6. Create a Trigger node with the Webhook event that will be activated when a request is made to the webhook (add a filter that checks
event.payload.path === 'user_info'
) 7. Grab the variable with
event.payload.body.user_exists
8. Proceed however you need
r
thank you!
e
However I'm afraid that when you start the conversation from the Trigger, it will be another conversation
We are working on a way to allow choosing to continue the previous one
3 Views