T
Typebot5w ago
waqas

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
Baptiste
Baptiste4w ago
You can get Result ID from the set variable block https://docs.typebot.io/editor/blocks/logic/set-variable#result-id
waqas
waqasOP4w ago
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?
Anthony
Anthony4w ago
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
waqas
waqasOP4w ago
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.

Did you find this page helpful?