Welcome back.
In this video, I'm going to present you a demo and overview of the WhatsApp AI, customer support and
low ticket sales agent and explain how it works node by node.
And at the end, I've got a task for you.
After watching the video, please download the workflow and try to connect all the credentials and modify
this solution to your needs.
If you have been following this course lesson by lesson, you should already have most of the required
accounts connected like WhatsApp, OpenAI, or Google Drive, so you can simply click on a specific
node and choose the account you want to connect, for example, Google Drive and so on.
Now, just to remind you, you can manage all your credentials in this section for each project separately.
So just go to credentials and you can manage all your accounts right here.
However, as I mentioned in one of the previous lessons, some platforms like WhatsApp may require you
to refresh your credentials from time to time and re-enter the API keys manually.
Also, you have not used Google Gemini in any of the previous projects, so if you are stuck setting
that up or need help connecting any platform, feel free to go to the dedicated section on setting up
credentials.
Next in this project, we'll be using Supabase vector database to give our WhatsApp agent long term
memory.
So to find out exactly how to use Supabase, configure everything and complete the setup.
Please refer to the next lesson called How to Build an Agent That Remembers Everything.
Where I will show you step by step how to do it.
Alright, now it's your turn.
Watch the rest of this video.
Download and import the workflow.
Connect all your accounts and make this WhatsApp agent your own.
Alright guys, so let's do a quick demonstration.
So I trained my WhatsApp I agent using my company's information like the services we offer using the
first part of the workflow.
So now when I click on the workflow, it's waiting for the trigger to fire in the second part of the
workflow.
With this one.
So let's simulate a message.
Imagine a client type something like what services do you offer?
And as you can see.
The workflow has been triggered.
And now agent is working on a response to the user.
And yeah adaptive AI offers a range of services designed to enhance business operations and customer
engagement, including etc..
So basically the agent created a response using the information stored in a base vector store.
And this is where we pulled all the details from the word file that we pulled from Google Drive using
the first part of the workflow.
This one, and this is the fourth file in Google Drive.
Okay.
So now let's test the voice message feature.
So click on the test workflow.
And I'm going to ask the same question.
What services do you offer.
And we should receive similar response from our agent.
It takes like ten, 15 seconds.
Yeah.
As you can see, adaptive AI provides a variety of services, including.
In this video, I will walk you through how to set up a WhatsApp AI agent that's trained on your company's
data and can retain conversation history.
So you can set up, set this up for yourself, or even sell it for your clients.
So this agent can handle text and voice messages and retrieve relevant information, and then reply
naturally by keeping the context of the conversation.
So let's get started.
So this is the first part of the workflow.
And the workflow starts with when clicking the test workflow node.
And this is manual trigger that lets you test the setup by running the workflow on demand.
Next we have uh, the Google Drive node.
So this node downloads a file from a specific Google Drive folder.
So you can select which document you want to process and store in the database.
So this is where your company's documents, like PDFs or word files are retrieved for further processing.
Um.
Next.
Once the file is retrieved, uh it's passed to Supabase vector store node.
So here, uh, the queue is stored as part of your knowledge base.
So this step ensures that the data is available for processing in the next steps.
So after storing, uh, after storing the workflow moves to recursive characters.
Uh splitter text splitter node.
So this splits the document into smaller chunks.
And splitting is crucial because AI models Perform better with smaller, structured, structured pieces
of text.
So next up the default data loader node.
So it organizes the text chunks and ensures they're ready for embedding.
So this step format the data for smooth processing.
After formatting the chunks are passed to the embeddings OpenAI node.
So this node generates a numerical embeddings for each chunk of text, making it easier to compare and
retrieve relevant information later.
And finally, the embeddings are sent back to the base vector store.
So these embeddings are stored in the database and creates a searchable vector store.
So this is essential for enabling enabling your AI to retrieve the right information when queried.
So this is the second part of the workflow.
So the workflow starts with the WhatsApp trigger node.
This listens for incoming messages like texts or audio and from from your clients on WhatsApp.
One.
Once a message is received, it moves on to the next steps in the workflow.
So the trigger connects to a split out message pass node.
So this node checks whether the incoming messages, uh, is text or audio.
So if the message is uh, an audio, uh, it's passed to the get audio URL and download uh audio nodes.
So this nodes uh fetch and download the audio file file and then uh Google Gemini audio node uh processes
it to transcribe the voice into text.
So Transcription.
Tenants voice messages into text so the AI can process them like regular text messages.
Next.
Once the message is transcribed, or if it's already text, it goes to the Getusers message node.
And this node organizes and formats the message, pulling out important details like the type of message,
the text content, and who sent it.
So it extracts the sender's phone number and message text so they are ready to use in the next steps.
So the information go to AI in this case is AI tools agent.
So next the Postgres chat memory node comes into play.
And this node lets the AI remember the conversation history, including previous messages and context
like the client's name or earlier questions.
So this basically this makes for follow up questions easy to handle without the client needing to repeat
themselves.
And it keeps the interaction feeling natural.
So now we move to supervised vector store.
Uh, this is where the agent searches your company's knowledge base to find the most relevant information.
So it works with, uh, embeddings.
OpenAI model, um, to match the client's questions, to stored knowledge and pull up the best possible
answer.
So after gathering all the data, the OpenAI chat model node, uh, generates response.
Uh, it combines the client's question and the retrieved knowledge and the conversation history to create
a helpful and natural reply.
And the final step is to reply to the, uh, user node.
This sends the response back to the client through WhatsApp.