As a remote digital marketing professional in a reputed digital marketing agency, I constantly look for ways to reduce manual work while improving response speed for businesses for our clients.
One of the most common problems I see across service businesses, agencies, and even D2C brands is this:
Customers message on WhatsApp, but replies are slow, inconsistent, or completely missed.
So I decided to build a WhatsApp automation for one of our clients where:
- Anyone who messages the business number
- Gets an AI-powered response instantly
- Can ask questions, get information, or even book a meeting
- Without a human sitting there all day
As a result of this whatsApp automaion system, our client is able to reply within second for each lead incresing appointment by 37% in a single month.
In this article, I’ll explain exactly how I set this up, step by step, using real tools, official Meta APIs, and an AI agent in the backend.
This is the same system I use for testing automation ideas and client workflows.
What This Automation Can Do
Once set up, this system allows you to:
- Automatically respond to any incoming WhatsApp messages
- Use an AI agent to understand user intent
- Send smart replies of all the custom questions of the lead(not fixed auto-replies)
- Later connect CRMs, calendars, or booking systems
- Scale customer communication without hiring support staff
This is extremely useful for:
- Service businesses
- Agencies
- Coaches & consultants
- Lead generation funnels
- Support automation
The Overall Architecture (Before We Start)
Before jumping into tools, it’s important you to understand the logic behind this WhatsApp automation system:
- WhatsApp receives a message
- A trigger detects the incoming message
- An AI agent processes the message
- The AI generates a response
- The response is sent back to WhatsApp
Please note that there are two different WhatsApp credentials involved in this process. I have seen most people get stuck in this thing. I’ll explain both clearly so that you will not be confused.
So, Let’s start the Process to build WhatsApp automation step by step:
Step 1: Setting Up WhatsApp Access via Meta Business
WhatsApp automation officially works through Meta (formerly Facebook).
To begin, you need to log into Meta’s business system.
Go to:
👉 https://business.facebook.com/
You need to log in using your personal Facebook account.
Creating or Selecting a Business Portfolio
Once logged in:
- If you already have a business portfolio, you’ll see it immediately
- If not, expand the left menu and click Create Business Portfolio
This portfolio represents your business inside Meta’s ecosystem.
After that:
- Go to Settings (bottom-left)
- Under Accounts, click Apps
Step 2: Creating a Meta App (Required for WhatsApp API)
Now we need to create an app so Meta can issue credentials.
- Click Add App
- Choose Create a New App ID
- If prompted, confirm your account by:
- Adding a mobile number, or
- Adding a credit card (Meta requirement, not a charge)
Once confirmed, continue.
App Creation Details (Important Choices)
- Enter an app name (this is internal)
- Choose Other as the use case
- Select Business as the app type
(This is required for WhatsApp access)
Choose the correct business portfolio and create the app.
Step 3: Getting App ID and App Secret (First Credential)
After creating the app:
- Go to App Settings → Basic
- Here you’ll find:
- App ID
- App Secret
These two values are used to authenticate incoming WhatsApp messages.
Copy both and paste them into your automation tool’s WhatsApp Trigger credentials.
Once saved, you should see:
✅ Connection tested successfully
This confirms that Meta can now send WhatsApp messages to your automation.
Step 4: Understanding Why Two WhatsApp Credentials Are Needed
This is the most tricky part our our process and this part confuses most people.
I will explain why we need 2 whatsapp credentials here.
WhatsApp automation uses:
- Trigger credentials → to receive messages
- Send-message credentials → to reply back
The second one uses:
- Access Token
- WhatsApp Business Account ID
So we now go back to Meta to set this up.
Step 5: Setting Up WhatsApp API Access
Inside Meta Business:
- Go to WhatsApp
- Click API Setup
You’ll see:
- A test WhatsApp number (provided by Meta)
- Option to add a real business number later
For now as we creating the demo account only so, the test number is enough.
Add:
- A recipient phone number (your own WhatsApp number for testing)
Generating the Access Token
Now you need to click Generate Access Token.
Meta will ask for permissions such as:
- Managing WhatsApp accounts
- Accessing conversations
Approve and continue.
Now you’ll see:
- Access Token
- WhatsApp Business Account ID
These two values are used to send messages back to WhatsApp.
Copy them carefully and paste it on a notepad.
Step 6: Connecting the AI Agent
Now comes the intelligence layer.
In the automation workflow:
- Add an AI Agent node
- Connect an AI chat model (for example via ChatGpt or OpenRouter)
This gives our WhatsApp automation a “brain”.
Once we use AI Chat model, Instead of fixed replies, the automation system now can:
- Understand user input
- Generate contextual responses
- Hold conversations
Step 7: Passing WhatsApp Messages to the AI Agent
To make this work correctly:
- The AI agent must receive the actual message sent on WhatsApp
So inside the agent:
- Set User Message to “Define Below”
- Map the WhatsApp message body variable into the agent input
This ensures:
- Whatever the user types on WhatsApp
- Is what the AI sees and responds to
Step 8: Sending the AI Response Back to WhatsApp
Our Next step will be:
- Add a WhatsApp Send Message node
- Use the second credential (Access Token + Business Account ID) we got earlier.
Instead of sending static text:
- Map the AI agent’s output
- This sends the AI-generated reply back to WhatsApp
Now our WhatsApp automation loop is complete.
Step 9: Testing the Full Automation
Our automation is almost completed. Before production we need to do some small taks:
- Manually execute the workflow
- Send a WhatsApp message like “Hi” or “Tell me a joke”
You should see:
- WhatsApp trigger receives the message
- AI agent generates a response
- Reply appears back in WhatsApp
At this point, we have a working WhatsApp AI assistant. It can answer all our business related quires and not just yes or no kinds of reply.
Our WhatsApp AI assistant is ready to work.
Important Cost & Security Considerations
One thing I always tell business owners:
If your AI model uses paid credits, every incoming message costs money. This money we need to pay to meta directly.
If someone spams your number:
- Your AI usage cost increases
- The expense falls on you
To manage this you can take some measures like :
- Add rate limits
- Add human handoff
- Use memory or intent filters
How Businesses Can Use This Practically
From my experience, this setup works well for:
- Lead qualification
- FAQ handling
- Appointment booking
- Customer support triage
- Internal automation testing
It doesn’t replace humans — it filters and assists them.
Final Thoughts
WhatsApp is one of the most powerful business communication channels today.
By combining it with AI automation:
- Response times improve
- Manual workload drops
- Customer experience scales
If you’re a digital marketer or business owner, learning this setup is a long-term advantage, not a gimmick.

Very information post. Can you please explain us how to generation real india voice using AI ? Thanks in advance
Thanks Nishanth ! Sure we will write a detailed article on AI voice generation as well