Full transcript of “Building Whatsapp AI Agent - Simplest way”. Click a timestamp to open the video at that moment. Need another video? Use the YouTube transcript generator.
0:00 So guys welcome back to the channel. Many people had requested for the WhatsApp bot. Ok? There are many challenges in creating a WhatsApp bot. First of all, WhatsApp Meta permissions are very dangerous. Second thing, if we talk about WhatsApp bot, then what can we do? We can create a WhatsApp bot that interacts with us right now. Just for testing. Ok? In this video, I am going to show you that. In the upcoming videos, I will show you how to link out your new number i.e. your business number with this. How will he match with your agent? I am figuring out some things in this whole thing. I still don't understand how a WhatsApp bot can exactly feasibly function from a business point of view. But I'll show you once I get that figured out. But in this we will test a simple connection to see how a WhatsApp bot is created? What are we going to do in this and everything. Let's get started with this video. First of all, let's go to our
0:46 new work flow. Ok? Let's create a new workflow and I'll name it WhatsApp Bot. Now, let's do one thing first. By going to Add First Step here, you will get WhatsApp Business Cloud here. Now in Business Cloud, let me tell you what things you have to keep in mind. What do we have to do now? WhatsApp chat should be triggered when a message arrives. This is what we have to do for now. Ok? I am giving you an overview. I am giving you a step by step guide on how you can implement these things in your work flow. So I have turned on messages here. Now look here, my new WhatsApp Auth account credential was already connected. That's why it is showing. Let's do one thing. Let us create a new pure account. So what do you need to do here? Tap on Create New Credentials. After tapping on Create New Credentials, look here you have got Client ID and Client Secret. Now what is this client ID and client secret
1:31 ? how to do it? We will see that in detail. Now for this you will need your Facebook account. Because WhatsApp works for Facebook i.e. Meta. That means Meta has purchased WhatsApp. So whatever WhatsApp integration connection there will be, it happens through Meta. So what do you do? You have to go here and type business. Facebook.com and login here. The account you have is a business. Log in to Facebook.com. If you do not have a business account. Ok? So let me show you where to create it from. On the new tab you have to type business. Facebook facebook.com Settings. Do this slash settings thing. Now you will see how many Business accounts you have created. So I have three different business accounts here. There is an advertising account , an AI account, and a time
2:16 pass account on which we do testing. So basically it is important to have a backup account. In case an account gets banned or something happens then you have a backup account on which you are testing. So for now I will select my account with FED AI here. If you don’t have an account then create one. If you are not able to understand then you will find many videos which will show you exactly how to make it. Now we have come to this window. Now look here, you will see the account section. And in this account section you will see the apps section. Tap on this app section. I have come here. Now you have to add a new app here. what do I do here? I will add it. After adding, create new app ID. Let me tap on this. After tapping on Create New App ID, now look, we have to enter our name here. So I put N8 NAI agent. And you have to enter your email.
3:04 Contact email etc. After doing all these things, tap on Next. Now what are the use cases? Here you will find the Others option right at the bottom. You will see all these things later and learn about them later. This is a very complex thing. Right now it is not to be touched. So I go to others. After going to Others, right at the bottom there will be another section called Others. By tapping on this we will go next. I tapped on this and there is a next button here. Tap on this. The account will be created. Here you have to tap on Business and then tap on Next. As soon as you do this, you have to verify the details of your app. N8 N AI Agent Whatever your XYZ email address is, you do that and create the app. Now see, your app has been created. You have to enter the password. What can you do with your password? Directly whatever app you have, it has already been created.
3:49 Now wait a little. Your app will open. Now look here, your app has been created. Now here you can do different integrations. Here you will see an option WhatsApp. So, here I will tap on the option to set up WhatsApp. Ok? I tap on the Setup option here. And let's see what it is giving us. After tapping, it takes some time for everything to happen on Facebook Business Account. The internet I have is almost 1000 Mbps. But still it is a bit slow because it takes time for all this to happen. Ok? Now we have arrived here. Our account here has been completely setup. Your window will look something like this. What do you do now ? First of all look here, you will get the option of app settings. Right? Tap on this app settings option. And here you will see an option for basics. Tap on this basic option. As soon as you tap on the Basic option, you will
4:37 see Client ID and Client Secret here. Right? So first of all copy this client ID and go to your NA and paste it here in the client ID. Now it's the client secret. What do you do now? I have to go back here. Now here is the client secret. Right? You have to show this. Show and copy this client secret. And go here and paste it. And after pasting it here, tap on the save button. Look here the credential has been connected successfully. Right? Now let me back it up. Now look, this WhatsApp trigger of ours has been activated. But we are going to rename it. Now this renaming part is a little important. So this should not be forgotten. I pay here. CHAT R E C I E V E D RECEIVE. I will receive the chat. What will we do now? This is all of ours,
5:24 meaning the integration of WhatsApp has now been successful. We have not added numbers etc. yet. He will add it now. First of all let's tap on the plus button here. Let's add an AI agent. In AI Agent, we define below in place of connect rigger here. There is no need to touch anything here right now. Here below you will see the chat model option. Tap on this chat model option and select whatever chat model you want. I select Open AI. Usually my account is already connected. If you don't know how to connect your account then watch my older videos. In that I have already told how to do the account connection. Ok? So here our chat model is added. Let me add one more thing here. That is our simple memory. Ok ? I will add simple memory. Done. This is what happened to us. Now I do one thing. Now I tap back here once and WhatsApp it back here once again.
6:10 Ok? After going to WhatsApp, now look here send message, which means this will be triggered after we receive this chat message. This will go to our AI agent and through the AI agent we will be able to send the message back from here through our WhatsApp. So I send the message here. Now look, after sending the message, here you will have the option to create new credentials. Do that. Now what is he asking for here ? There he asked for ID and secret. Right? Here it is asking for Access Token and Business Account ID. This thing is a bit important. So what do you do? Once you go back to the Facebook tab where you made all these settings. Now here you will see the option of API settings below. The option of API settings will be visible in WhatsApp.
6:55 Go to that API setup option. As soon as you go to the API setup option, your API setup window will open. Now look here, we have found the access code button. Right? Now I do one thing. First of all, here you can add a test number, what you can do is, here you will already get the test number, if mine is already here, that is why you can add the phone number as per your requirement, here you will get the test number, so select the test number, my test number is already coming because I have created it before, so if you get the test number, then select this test number and on which number you want to text or which number you want to connect, enter that panel, connect, which means you will get text from that number. Here I am showing you the internal WhatsApp connection for your own bot. So
7:42 I will enter my number here. After entering the number, the option to Generate Access Token appears above. Right? Generate it. As soon as you generate it will ask you for confirmation once again. Continue as Abhijeet. Now look, it will show you two options. This is to get all current and future WhatsApp accounts, I will do this for now. And I will continue this. After continuing, I will save it here. And here I got it. Done. Now see, my access token has been created. Now let me copy this access token. After copying I will come back to my WhatsApp. Here I will paste the access token. Now here I have got the option of Business ID. I will go back to my Facebook and look here you will find the Business Account ID. Tap on this business account ID.
8:29 Go back once you tap. Paste the business ID here and save it from here. Now look, the connection was tested successfully. Right? Whatever the message is, just send it. For now, the sender number here, we will add the text number that we had added. Please enter your number in the recipient phone number. Ok ? You entered your number in the recipient phone number. Now let's place the message text here and I will just paste the text body here. Done. Now let me back off from here. Now look, this has become everything to us. Now we have to go to our WhatsApp. This was your test number on WhatsApp, this was the one which came on your test number. What do you have to do ? First of all you have to save that number on your phone. That means the one with taste. Save the test number. And after saving the test number, save its name. AI Agent Save whatever X and J you want to enter as your name.
9:14 And do one thing here, come and tap on execute work flow and text on that number. Hey you will not get a reply. Why wo n't the reply come now? Because there are still a lot of problems we have to deal with here. So what you are seeing here is that there is a problem with the AI agent. What's wrong with AI agents ? Ah there is a problem with the user message here. I am here how can I help me? I have to enter the message input here. So for now, I will keep it on the connected chat trigger. And let me do that by executing the work flow here. Ok? As soon as I do hey. Look, here I am facing a problem with the session ID. But this message reached my WhatsApp. So I tap on AI Agent here. Now look, you will see my WhatsApp message here. Define this body here and paste it here. Ok? That means, whatever your message is,
10:02 you have to enter this hey message in the body parameter here. So you did this. Now you go back once. Now what is the problem here? Let me tell you. I am not able to note down the ID in the simple memory. So what do you have to do there? You will need to enter a manual ID. I'll give you the ID. Ok? I have given the ID in the description below. Enter the ID which gets automatically connected to your WhatsApp. Ok? The option of Define Below will come here. Now paste what I have given you here. After pasting it looked red. Why? Why did the raid come? Let me tell you. Let's go back to canvas. LOOK C H A T R E C I E V E D. What we have here is RACEI. C.I.E.V.E.D. Now look, this spelling should match. Chat Received The spelling you have written may be wrong. It
10:47 could be wrong here as well. So here you just have to repair that spelling and put it here. And now this is yours, I think you can test it. Let's do one thing. Let me execute the work flow here. And once again I will text on this number. Like I text on this number. Look, our text is gone now. Went through AI agent. Now here in these business nodes, we are facing a problem. Let's sort out what problems are coming up. You have to enter your country code in the recipient phone number. Ok? I did not enter the country code so that is why it went wrong for me. So what do I do? Once I execute this work flow and enter the country code everything should be working fine for me now. Letts C. Now look, the WhatsApp message was sent and I received the WhatsApp message successfully. I also have the spelling of SEO C Success wrong. Don't worry. So let me show you what changes I have to make here.
11:34 Whenever you go to this message, in the place of success, the output appears here. Delete success from the text body. Now the output i.e. the reply given to you by the AI agent is available here. Right? Paste that message here. Ok? Drag and drop that message here. Now you can chat comfortably with your WhatsApp bot. Once I activate it. After activating, all these things will be sorted automatically. hey like i do it. Look at this. Now, I will start receiving messages from this WhatsApp bot. Hey again how can I help you today? I want to know the best non veg places in Pune. Ok? Now see, I will start getting replies from WhatsApp bot and my own bot. My agent is connected with WhatsApp.
12:20 In this video, I am just showing you the connection to WhatsApp. Ok? We will discuss it in detail later. How to do the client's projects, what rates to give, everything. But look here all these things have started coming. Which one do you suggest for first timers? Now which one do I suggest you for first timer. Now we have added memory here, that is why it already has a context. So for the first timer look at Barbecuation, here at number four it has given us Barbecuation. This means that our memory is working smoothly here. The model that we have used is GPT 4.1. So this is a simple connection that I wanted to show you just how you can connect your WhatsApp with your own bot. What is there in it? What are the explorations in? What are the things we can do in the future? We will see everything. This was just a short connection video. I hope you liked this video.