How can I get the resultId that belongs to the current user in my website's JavaScript code?
I need to call a webhook from my JavaScript code, and the webhook URL requires resultId in its path. My Typebot chatbot is listening for the webhook request.
4 Replies
You can get Result ID from the set variable block
https://docs.typebot.io/editor/blocks/logic/set-variable#result-id
Typebot Docs
Set variable - Typebot Docs
Thanks Baptiste for your reply.
I need to access the Result ID in my website's JavaScript code, where my Typebot chatbot is hosted. Is there a method available to pass the Result ID to my website's code?
Heya waqas,
Why not doing it the opposite way, with your website listening for a webhook and Typebot making an HTTP Post Request to that webhook with ResultID as its body?
Not sure it fits your use case but that's my first thought
Hi @Anthony , thanks for the suggestion! However, this approach doesn’t fit my use case. I need to call the webhook from the website to the chatbot to trigger a specific flow with some data inputs, rather than having the chatbot send a webhook to the website.