T
Typebot3mo ago
JM

Triggering a Zapier action via Open AI Assistant

Use case: user converses with Open AI assistant and if the user wants to book a call, a zap is triggered from the Assistant itself. I’m assuming this is ideally done via function calling? If so, can anyone provide me an example, spelling it out as much as possible? I’m not a coder but would still appreciate seeing how it works.
4 Replies
Baptiste
Baptiste3mo ago
Not necessarily a function call. I guess it can be done with another OpenAI block that would serve as an "evaluator" of the current user prompt I'll work on an example and will share it with you Here is an example: https://app.typebot.io/typebots/cltygt85l0003e5m73metuets/edit I'm using an intermediary AI block (Mistral here but it can be any other chat completion compatible blocks) to define if the user would like to proceed You can achieve the same for your use case Another work around would be to define your function and in the function body only add something like this: setVariable('Should execute zap', true) Then you can add a Condition block below that checks if the variable is set
JM
JM3mo ago
Appreciate your input and for putting that example together, @Baptiste. Thanks! The 'evaluator' idea is great. I believe you did a similar video on it in the Typebot documentation pages where I initially got the idea from. If I'm correct, we put these evaluator blocks to say 'continue' if the LLM determines that the user wants to book a call for example. Then that condition triggers the Zapier block? The cool thing is that it works, but it does get a little slow, especially if there are 2 or three of these evaluator blocks, and can get clunky to manage. Still, this is my fallback method.
No description
JM
JM3mo ago
So I was really excited to try your suggestion to set a variable via a function as it would be more streamlined and quicker. I took your example flow and edited it to test if an assistant would have triggered my zap, and it worked! (Feel free to let me know if I got anything wrong in the flow.) My next step will be to try and see if it works as well with multiple functions defined, but even the fact I've got just one function somehow working without going the full coding route is a huge win. Many thanks.
No description
Baptiste
Baptiste3mo ago
That's great to hear 🤘
Want results from more Discord servers?
Add your server
More Posts