Bot Send Templates Automatically

Bot Kirim Template Secara Otomatis

Diperbarui 5 months ago

How to Make Your Bot Send WhatsApp Templates Automatically

Why Let Bots Send Templates?

Imagine this: someone books an appointment through your website at 3 AM while you're sleeping. Twenty-four hours later, you want to send them a confirmation. Then the day before their appointment, you want to send a reminder. Then an hour before, another reminder. And after the appointment, a thank-you message with a review request.

Doing this manually for every customer would be a full-time job. But your bot can handle it all automatically, sending the right template at the right time to the right person. This is where automation becomes incredibly powerful.

Before reading this guide, make sure you understand what templates are, how to personalize them, and how to send them through the broadcast screen. This guide assumes you know those basics and are ready to automate.

How Bots Know When to Send Templates

Your bot follows instructions you give it. In those instructions, you tell the bot what situations should trigger a template send. The bot watches for these situations, and when they happen, it sends the appropriate template automatically.

You don't need to know programming or write code. You just explain to your bot in plain English (or Hebrew, or any language) what you want it to do. The AI understands your instructions and follows them.

Finding the Template Name

To tell your bot which template to send, you need to know the template's exact name. Finding this is easy:

  1. Go to the Templates screen in your Boti360 account
  2. Look at the list of your approved templates
  3. Each template has a name displayed next to it
  4. Copy that exact name—you'll use it in your bot instructions

Template names are usually short and descriptive, like "appointment_reminder" or "order_shipped" or "event_invitation". Use the exact name, including any underscores or capitalization.

Basic Instructions for Sending Templates

Here's the simplest way to tell your bot to send a template. Add this to your bot's instructions:

Example 1: Send immediately when someone asks

"When someone asks for an appointment reminder, send them the template called 'appointment_reminder'."

Example 2: Send after getting information

"After someone books an appointment, send them the template called 'appointment_confirmation' to their phone number."

Example 3: Send to a different number

"When someone gives you a phone number to contact, send the template called 'sales_info' to that number."

The bot understands natural language, so you can phrase it in different ways. The key is being clear about when to send and which template to use.

Sending Templates with Variables

If your template includes variables like {{1}}, {{2}}, {{3}}, you need to tell your bot what values to use for those variables.

Example template: "Hi {{1}}! Your appointment is on {{2}} at {{3}}."

Bot instructions: "When someone books an appointment, ask for their name, preferred date, and preferred time. After you have all three, send the template called 'appointment_confirmation'. Use their name for {{1}}, the date they chose for {{2}}, and the time they chose for {{3}}."

The bot will collect the information during the conversation, then fill in the template variables automatically when it sends.

Another example:

"When someone completes an order, send them the template called 'order_confirmation'. Use their name for {{1}}, their order number for {{2}}, and the total amount for {{3}}. The order number should start from 1001 and increment for each new order."

The bot can even generate values (like order numbers) or pull them from its memory of the conversation.

Sending to Different Phone Numbers

Sometimes you want to send a template to someone other than the person you're chatting with. Maybe someone books an appointment for their spouse, or a business manager gives you a list of numbers to contact.

Example instructions:

"When someone gives you a phone number, ask them for the person's name. Then send the template called 'event_invitation' to the phone number they provided. Use the name for {{1}} and 'July 15th' for {{2}}."

Another example:

"After someone tells you they want to send appointment reminders to their customers, ask them to provide a list of phone numbers with appointment times. For each number in the list, send the template called 'appointment_reminder' with the corresponding time."

The bot understands that it should send to a different number than the one it's chatting with.

Timing Your Template Sends

Bots can send templates immediately or remember to send them later (though "later" in this context means during the conversation or based on triggers you set up).

Immediate send: "When someone asks for a quote, calculate it and send the template called 'price_quote' right away with the calculated amount."

Conditional send: "After collecting someone's event registration, ask if they want a confirmation message. If they say yes, send the template called 'registration_confirmation'."

For true scheduled sends (like "send 24 hours before appointment"), you'll need to combine your bot with external tools or services. The bot itself works in real-time during conversations.

Handling Multiple Templates

A single bot can send different templates based on the situation. Just explain each scenario clearly:

"You help manage appointments and events. Here's when to send templates:

  • When someone books an appointment, send 'appointment_confirmation' with their name, date, and time
  • When someone RSVPs to an event, send 'event_rsvp' with their name and event name
  • When someone asks for directions, send 'location_info' with the event address
  • When someone cancels, send 'cancellation_confirmed' with their name and original date"

The bot will figure out which template to send based on what's happening in each conversation.

Example: Complete Appointment Bot

Here's a full example of bot instructions that use templates effectively:

"You are an appointment scheduling assistant for Sunshine Dental.

When someone wants to book an appointment:

  1. Ask for their name
  2. Ask for their preferred date
  3. Ask for their preferred time
  4. Ask for their phone number
  5. Confirm the details with them
  6. If they confirm, send them the template called 'appointment_confirmation' using their name for {{1}}, the date for {{2}}, and the time for {{3}}

When someone wants to reschedule:

  1. Ask for their current appointment date
  2. Ask for their new preferred date and time
  3. Confirm the change
  4. Send them the template called 'appointment_rescheduled' with their name for {{1}}, the new date for {{2}}, and the new time for {{3}}

When someone wants to cancel:

  1. Ask them to confirm they want to cancel
  2. If they confirm, send them the template called 'cancellation_confirmed' with their name for {{1}}

Always be polite and professional. If you're not sure about something, ask the person for clarification."

This bot handles three different scenarios, each with its own template, all automated.

Example: Sales Follow-Up Bot

"You are a sales assistant for TechGear Shop.

When someone asks about a product:

  1. Answer their questions about features and pricing
  2. Ask if they'd like to receive a detailed product guide
  3. If they say yes, ask for their phone number
  4. Send the template called 'product_info' to their number with the product name for {{1}} and the price for {{2}}

When someone is ready to buy:

  1. Collect their order details
  2. Calculate the total
  3. Send them the template called 'order_confirmation' with their name for {{1}}, order items for {{2}}, and total price for {{3}}

When someone asks about delivery:

  1. Ask for their order number
  2. Send them the template called 'shipping_update' with their name for {{1}}, order number for {{2}}, and estimated delivery date for {{3}}

Be helpful and friendly. Focus on understanding what they need."

This bot handles the entire sales process with automated template sends at key moments.

Testing Your Bot's Template Sending

Before letting your bot send templates to real customers, test it thoroughly:

  1. Chat with your bot as if you're a customer
  2. Go through the scenarios that should trigger templates
  3. Use your own phone number for testing
  4. Verify that the bot sends the correct template at the right time
  5. Check that all variables are filled in correctly

Testing costs a few cents per template (the usual template sending fee), but it's worth it to catch any issues before customers see them.

Common Mistakes to Avoid

Spelling the template name wrong: If you write "appointment_reminder" in your instructions but the actual template is called "appointment-reminder" (with a dash), the bot won't find it. Copy the exact name from your templates screen.

Forgetting to tell the bot what values to use for variables: If your template has {{1}}, {{2}}, {{3}} but you don't tell the bot what those should be, it won't know what to fill in. Always specify what each variable should contain.

Not collecting the information first: If your template needs someone's name and appointment time, but your bot sends the template before asking those questions, the variables will be empty. Make sure the bot gathers all needed information before sending.

Sending templates inside the 24-hour window: Remember, you only need templates when messaging outside the 24-hour window. If someone just messaged you, the bot can reply normally for free without using a template.

Being vague in instructions: "Send a template when someone wants one" is too vague. "Send the template called 'appointment_confirmation' after someone books an appointment and confirms all details" is clear and specific.

Combining Manual and Automated Sends

You don't have to choose between sending templates manually through the broadcast screen and having bots send them automatically. Use both:

Manual broadcast sends work great for:

  • Announcing sales or events to your entire customer list
  • Sending appointment reminders to everyone with appointments tomorrow
  • Following up with leads you collected at an event

Automated bot sends work great for:

  • Responding to individual requests in real-time
  • Sending confirmations immediately after someone takes action
  • Providing information during conversations

Use the broadcast screen for bulk sends to many people at once. Use bot automation for personalized, contextual sends during individual conversations. Together, they cover all your template sending needs.

What's Free, What Costs Money

Let's be crystal clear about costs:

Free:

  • Having a bot (creating and configuring bots is free in Boti)
  • Conversations within the 24-hour window (bot or manual, completely free)
  • Receiving messages (unlimited, free)

Costs AI tokens (Boti usage):

  • Bot using AI to understand and respond to messages
  • Each message the bot analyzes and replies to uses tokens

Costs money (paid to Facebook):

  • Sending templates (~2-10 cents per template)
  • This applies whether you send manually or through a bot
  • The template send itself costs money, not the bot automation

So bot automation doesn't cost extra beyond the template sending fees you'd pay anyway. The bot just handles the sending automatically instead of you doing it manually.

Advanced: Integration with External Systems

For really advanced use cases, your bot can work with external systems to determine when to send templates. For example:

  • Integrate with Google Calendar to send appointment reminders based on scheduled events
  • Connect to your order system to send shipping updates when orders ship
  • Pull data from Google Sheets to send personalized templates to a list

These advanced integrations require some technical setup, but they enable powerful automation. If you're interested in this level of automation, check out Boti's tools and integrations documentation.

What's Next?

You now understand how to automate template sending with bots. To complete your template knowledge:

Automation is where the real power of WhatsApp templates comes in. Set it up once, and your bot handles customer communications 24/7 without you lifting a finger. Your customers get instant responses, you save time, and your business runs smoother.