Template showcasing an efficient use of a node to confirm an email address.
From the previous node we want the AI to first know the email from the user, then we want it to send a secret code to that email, if you noticed there is another tool called VerifyCode which should be used after the SendEmail tool has been used, we also mention that in the node.
You can see that we’ve simply let the AI know “Hey this is used to send a secret code to the user’s email” but we only mentioned the name, email parameters but not the code, this is because the code is a secret and we don’t want the AI to know about it.
Even if we tell the AI to not tell the user about the code a clever prompt engineer will make it spit out anything already provided to its context. This tool’sserverUrl
is a make.com hook that sends0192
to the email provided to it from the payload, you can also test the functionality of the tool by clicking the “Test” button after you’ve filled in dummy data.
VerifyCode
is used.
You can see that we’ve mentioned the code
parameter in the node’s description, this is because the code is a secret and we don’t want the AI to know about it.
This tool’s serverUrl
is a make.com hook that verifies the code provided to it from the payload, you can also test the functionality of the tool by clicking the “Test” button after you’ve filled in dummy data, if you filled in 0192 it will return a positive response, if you filled in anything else it will return a negative response.
Let’s first start by opening the debugger, then resetting that agent, now we want to first emphasize on a very important part of the nodes system which is the router, by default once you’re on a node you are in an infinite loop until you break out, so if I keep asking the AI random questions it will stay on the node it’s currently on which in this case is the start node.![]()
Alright now let’s mention an email address and see what happens..As you can see the AI now has detected the email instantly, sent a human like response as if it is a human actually going to do something and send a confirmation code to that email, from the debug messages you can see the tool input, output and whether the router chose to stay on the current node or switch to another one, in this case it chose to stay since we still have not verified the email with VerifyCode tool.
In the respnose it mentioned that it has actually sent a code to the email, now let’s see if the AI can actually verify the code.Yes it did!
Alright now let’s make it harder a bit for the AI and mention a wrong code.As you can see the AI now knows that the code is incorrect and it will ask the user to try again.
Now let’s try a correct code.As you can see the AI in the following steps:![]()
Again says a human like response like “1 sec please..” In a voice call such message make it sound super realistic
Used the verify code tool again on the new code.
Got the reponse from the verify tool with a positive response.
Based on the response of that tool it has switched to the next node.
Generated a new response based on the instructions of the new node that it has switched to.