{"id":3493,"date":"2020-05-13T09:56:15","date_gmt":"2020-05-13T05:56:15","guid":{"rendered":"https:\/\/techxmedia.com\/?p=3493"},"modified":"2020-07-23T09:15:41","modified_gmt":"2020-07-23T05:15:41","slug":"a-developers-guide-to-building-a-whatsapp-chatbot","status":"publish","type":"post","link":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/","title":{"rendered":"A developer\u2019s guide to building a WhatsApp chatbot"},"content":{"rendered":"\n<p>Long ago, I built a web app for an enterprise (200k+ employees). Feedback on the web app prompted me to do an experiment. What would happen if I were to create a WhatsApp&nbsp;<a href=\"https:\/\/www.toptal.com\/chatbot\" target=\"_blank\" rel=\"noreferrer noopener\">chatbot<\/a>&nbsp;to solve the specific use case, instead of a web app? Would people like it better? Would it be more useful?<\/p>\n\n\n\n<p>But the story is much bigger than that. Chatbots have so much potential! In this WhatsApp chatbot tutorial, I wanted to share my learning journey, best practices I discovered, and my predictions on the app vs. chatbot question. And beyond: Will chatbots one day replace all traditional apps?<\/p>\n\n\n\n\n\n<p>The company I worked for had an office for around 2,000 employees in the middle of downtown Tel Aviv. The parking space is very limited, so people park in spaces intentionally designed for double-parking, where one car is blocking another. In every double-parking space, the first driver parks inside, and the second parks outside.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"from-a-whiteboard-to-a-web-app\">From a whiteboard to a web app<\/h2>\n\n\n\n<p>Before there was an app, there was a big board. All drivers marked where they were parking, and their names and phone numbers. Before leaving the office, a driver had to check whether anyone was blocking their car. If so, they would have to call the other driver and hope that they were not in the middle of a meeting so they could go and move their car out of the way.<\/p>\n\n\n\n<p>To make the process better, I created a web app.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/bs-uploads.toptal.io\/blackfish-uploads\/uploaded_file\/file\/241231\/image-1587985401428-d33fb9216565368efffb29bab8d8e2ff.png\" alt=\"The original web app concept, showing rows of inside and outside double-parking spaces with numbers and sometimes names. Those with a name are blue, and those without a name are green.\"\/><\/figure>\n\n\n\n<p>It was simple. No back end. No server hosting. No database maintenance. Not even any UI framework. No webpack and no JS bundles at all! Just vanilla JavaScript.<\/p>\n\n\n\n<p>It was hosted by using GitHub\u2019s free static page hosting. The database was FireBase, so we had realtime support and JSON support, and no need for a back end.<\/p>\n\n\n\n<p>The user interface was straightforward. Users would see all parking spots and click on an empty one to fill in their details. If they were already parked, it would take the data from the browser\u2019s local storage. If they clicked on a registered slot, they would see the relevant contact details and could choose to call the driver.<\/p>\n\n\n\n<p>It was working great for almost a year. Less than one day of development helped and saved time for many people\u2014a good investment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"from-web-app-to-chatbot\">From a web app to chatbot<\/h2>\n\n\n\n<p>One day, Facebook announced that they are going to release an API for WhatsApp. The next day, my brother bought an Amazon Echo, featuring Alexa. Around that time, I also started to see Google Assistant everywhere.<\/p>\n\n\n\n<p>I started to think that maybe the world was moving toward chatbots, so I should experiment. Would users prefer to use chatbots? Would I need to give less support? Would it introduce any new meta-features simply by leveraging different infrastructure?<\/p>\n\n\n\n<p>I got some feedback on the regular web app, and I believed it might address it if I were to create a WhatsApp chatbot:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The app didn\u2019t work well on some old mobile phones.<\/li><li>It didn\u2019t work underground (where the parking is\u2014there is no good mobile signal there).<\/li><li>Drivers wished to send messages to the blockers instead of opening the phone dialer.<\/li><li>Drivers wanted to get push notifications if someone was blocking them, instead of opening the web app every time before leaving.<\/li><\/ul>\n\n\n\n<p>It\u2019s important to remember that the developers of chat platforms like&nbsp;<a href=\"https:\/\/www.toptal.com\/python\/telegram-bot-tutorial-python\" target=\"_blank\" rel=\"noreferrer noopener\">Telegram<\/a>&nbsp;or WhatsApp had worked days and nights for years to ensure the stability of their apps. By using their resources and developing only a small engine for answering questions, that would leave the hard work of maintainability to chat platform developers. All I had to do was dig into how to make a WhatsApp chatbot.<\/p>\n\n\n\n<p>Immediately after I started developing the new parking assistant chatbot, I realized how fantastic the idea was. It was so easy and fast to add new features, and I didn\u2019t even need to do end-to-end testing.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>No signal? No problem.<\/p><\/blockquote>\n\n\n\n<p>Not only that, I no longer needed a complicated CI\/CD process. If it is working in a chat emulator, it would work everywhere. No&nbsp;<code>.apk<\/code>, no Xcode, no App Store, nor Google Play. The chatbot was able to send messages to users without me needing to register devices, use PubSub or similar services for push notifications, or save user tokens. No need for an authentication system\u2014I was using the user\u2019s phone number as identification.<\/p>\n\n\n\n<p>No signal? No problem. I didn\u2019t need to add offline support using manifest files: WhatsApp gave it to me out of the box. The message would go out soon enough, when the user would go to an upper level where wifi was better.<\/p>\n\n\n\n<p>Then I realized that every time a chat platform would introduce a new feature, my app would immediately benefit from it. Wow\u2014now that\u2019s a really good investment. (To be fair, there is also the risk that new features may limit functionality or create breaking changes that require more development effort, so think carefully before implementing business-critical tasks).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"writing-parking-assisstant-a-prototype-whatsapp-chatbot\">Writing&nbsp;<em>parking a<\/em><em>ssistant<\/em>, a prototype WhatsApp chatbot<\/h2>\n\n\n\n<p>To create a WhatsApp chatbot, the first challenge is to get messages from WhatsApp to your program. The simplest solution I found is to use a shared Twilio phone number. It\u2019s just for development\u2014when moving to production, developers will want to use a dedicated phone number.<\/p>\n\n\n\n<p>Twilio\u2019s free numbers are each shared across many Twilio users. To differentiate an app\u2019s end users from those of other Twilio users\u2019 apps, end users have to send a predefined message to the chatbot.<\/p>\n\n\n\n<p>After a user sends a special message to the shared number, all the messages from their number will be directed to your Twilio account and webhooks. This is why a dedicated number is needed in production\u2014there\u2019s no guarantee that a given user will only want to use one app on a given shared number.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sending-whatsapp-messages\">Sending WhatsApp messages<\/h2>\n\n\n\n<p>On Twilio\u2019s \u201cProgrammable SMS Dashboard,\u201d there\u2019s a \u201cWhatsApp Beta\u201d link in the left-hand navbar:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/bs-uploads.toptal.io\/blackfish-uploads\/uploaded_file\/file\/241232\/image-1587985474883-cf85fe8e4e7f8b8f322d86b0f11b6b1e.png\" alt=\"A screenshot of Twilio's &quot;Programmable SMS Dashboard,&quot; showing a graph of recent messages, and another graph of recent errors and warnings. The fourth option in the navbar is &quot;WhatsApp Beta.&quot;\"\/><figcaption>Clicking that, developers will see a page with the option \u201cSandbox.\u201d<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/bs-uploads.toptal.io\/blackfish-uploads\/uploaded_file\/file\/241233\/image-1587985513067-60d20bdfa1da807ef1e8e370cda5d18a.png\" alt=\"A screenshot of the setup step of Twilio's WhatsApp sandbox, waiting for a special WhatsApp message to be sent to a particular number.\"\/><\/figure>\n\n\n\n<p>To associate users, they will need to send one special message to the number Twilio provides. Once users do that, we can start sending messages to them and process messages from them, via Twilio.<\/p>\n\n\n\n<p>Here is&nbsp;<a href=\"https:\/\/www.twilio.com\/docs\/whatsapp\/tutorial\" target=\"_blank\" rel=\"noreferrer noopener\">an example<\/a>&nbsp;of sending a message using cURL:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl 'https:\/\/api.twilio.com\/2010-04-01\/Accounts\/{user_account}\/Messages.json' -X POST \n  --data-urlencode 'To=whatsapp:+{to_phone_number}' \n  --data-urlencode 'From=whatsapp:+{from_phone_number}' \n  --data-urlencode 'Body={escaped_message_body}' \n  -u {user_account}:user_token\n<\/code><\/pre>\n\n\n\n<p>This is a simple text message. But you can also attach media (images, etc.) to your messages. Here\u2019s a Node.js example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function sendWhatsApp(to, body, media) {\n  const auth =\n    \"twilio_clientid:twilio_api\"\n  const sendURL =\n    \"https:\/\/api.twilio.com\/2010-04-01\/Accounts\/{account_id}\/Messages.json\"\n  const res = await fetch(sendURL, {\n    headers: {\n      Authorization: \"Basic \" + Buffer.from(auth).toString(\"base64\"),\n    },\n    method: \"POST\",\n    body: objToFORM(\n      JSONRemoveUndefined({\n        To: \"whatsapp:+972\" + to.replace(\/-\/g, \"\").replace(\/^0\/, \"\"),\n        From: \"whatsapp:+18454069614\",\n        Body: body,\n        MediaUrl: media,\n      }),\n    ),\n  })\n}\n\nfunction objToFORM(obj) {\n  const params = new URLSearchParams()\n  for (var a in obj) {\n    params.append(a, obj&#91;a])\n  }\n  return params\n}\n\nfunction JSONRemoveUndefined(obj) {\n  return JSON.parse(JSON.stringify(obj))\n}\n<\/code><\/pre>\n\n\n\n<p>That\u2019s it: Now we can start sending messages to clients! But it\u2019s important to remember the two most crucial technical limitations of WhatsApp messages:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>When the bot receives a message, you can send one text reply for free. More than that cost money.<\/li><li>The bot can send messages to users only during the 24-hour window starting when it receives a message from a user. Outside of this window, the bot can send only messages using approved templates, as we will see later on.<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"receiving-whatsapp-messages\">Receiving WhatsApp messages<\/h2>\n\n\n\n<p>Sending messages was fairly easy, but receiving and processing messages is even easier.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/bs-uploads.toptal.io\/blackfish-uploads\/uploaded_file\/file\/241234\/image-1587985669617-bcaa14699f68ef445e2c19cecaf30953.png\" alt=\"A screenshot of the &quot;Twilio Sandbox for WhatsApp&quot; page. The Sandbox Configuration section has two endpoint URL fields, for &quot;when a message comes in&quot; and &quot;status callback URL.&quot; The Sandbox Participants section lists user ids (in the format &quot;whatsapp:&quot; followed by a phone number) and has the same instructions as before on how to invite friends to the sandbox via sending a special message.\"\/><\/figure>\n\n\n\n<p>On Twilio\u2019s \u201csandbox\u201d page, developers can define where Twilio should send messages it receives at the shared WhatsApp number. During development, services like Ngrok or Serveo can provide public URLs that route to local developer machines.<\/p>\n\n\n\n<p>Twilio WhatsApp messages look like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"NumMedia\": \"0\",\n  \"SmsSid\": \"{sms_id}\",\n  \"SmsStatus\": \"received\",\n  \"Body\": \"Example Message from user\",\n  \"To\": \"whatsapp:+{phone_number}\",\n  \"NumSegments\": \"1\",\n  \"MessageSid\": \"{message_sid}\",\n  \"AccountSid\": \"{account_sid}\",\n  \"From\": \"whatsapp:+{phone_number}\",\n  \"ApiVersion\": \"2010-04-01\"\n}\n<\/code><\/pre>\n\n\n\n<p>That is all we need. We can use any programming language to get this message, parse it, and try to understand what the users are asking. This will probably result in some CRUD operations on a database, after which the bot can deliver the appropriate information (or success\/fail message) to the user in its reply. Those are the basics of how to create a WhatsApp chatbot.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"message-templates\">Message templates<\/h2>\n\n\n\n<p>As mentioned, chatbots can send freestyle messages only to users who are \u201ccurrently\u201d interacting with them, i.e., during the 24-hour window. But if you wish to send messages to new users, or outside of the window, you must use pre-approved message templates. This is to prevent spam.<\/p>\n\n\n\n<p>In my use case, I wanted to update drivers when someone was blocking them, even if they aren\u2019t users of the chatbot. In Twilio, click on \u201csender\u201d and \u201cconfigure.\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/bs-uploads.toptal.io\/blackfish-uploads\/uploaded_file\/file\/241235\/image-1587985712858-affeba9474316be6c6ed2d640d3aa2eb.png\" alt=\"A screenshot of Twilio's &quot;WhatsApp Enabled Senders&quot; page, listing numbers, their business display names, and statuses (one listed is marked Approved, the other, &quot;Waiting for Approval from WhatsApp.&quot;)\"\/><\/figure>\n\n\n\n<p>This is the template I chose:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{1}} is blocking your exit from the parking lot. I will notify you when they leave.\n<\/code><\/pre>\n\n\n\n<p>Several days later, Facebook approved my template, and I could start to send those messages to everyone who had WhatsApp, not just drivers who had sent a message to the chatbot.<\/p>\n\n\n\n<p>Sending a message from a template is exactly like sending a regular message, using the same API. WhatsApp automatically sees that it matches a template and approves the message.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"not-only-for-parking-assistant\">Not only for&nbsp;<em>parking assistant<\/em><\/h2>\n\n\n\n<p>This strategy is exciting for me when I imagine an online store: Perhaps one day people will be able to buy anything using chatbots. It would be as easy as sending WhatsApp messages and attaching images. Just imagine if users were able to attach real money to each WhatsApp message. It would be very straightforward to buy things. Users would easily be able to purchase anything by speaking with a supplier\u2019s chatbot.<\/p>\n\n\n\n<p>Imagine a chatbot that replaces Waze or <a href=\"https:\/\/techxmedia.com\/tag\/google-2\/\">Google<\/a> Maps. You send it a text message of your destination. The chatbot platform is tracking your location, and the chatbot sends you a recorded message that plays automatically with the realtime spoken direction of the navigation.<\/p>\n\n\n\n<p>It\u2019s not fantasy. WhatsApp currently supports location sharing in real time\u2014all that they need is the option to autoplay received messages, and voil\u00e0.<\/p>\n\n\n\n<p>Think about a Waze chatbot or a taxi chatbot instead of the Gett or Uber apps. You send a message saying where you are, then the taxi arrives, and you pay using WhatsApp. So simple.<\/p>\n\n\n\n<p>Some readers may be thinking, \u201cDon\u2019t users prefer graphical interfaces, and not just typing?\u201d I believe that chatbot platforms will give the chatbot owner the option to send buttons, images, and pure HTML boxes during the conversion. Facebook already supports&nbsp;<a href=\"https:\/\/developers.facebook.com\/docs\/messenger-platform\/webview\" target=\"_blank\" rel=\"noreferrer noopener\">Webview for Messenger<\/a>. Users don\u2019t need to install anything, just use their preferred instant-messaging app.<\/p>\n\n\n\n<p>These advantages are why developers are looking to create WhatsApp chatbots to handle important tasks, like giving&nbsp;<a href=\"https:\/\/techcrunch.com\/2020\/03\/21\/india-whatsapp-mygov-corona-helpdesk-bot\/\" target=\"_blank\" rel=\"noreferrer noopener\">instant authoritative answers<\/a>&nbsp;about the coronavirus pandemic, to help curb the spread of misinformation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"tldr-7-conclusions-about-migrating-web-apps-to-chatbots\">TL;DR: 7 conclusions about migrating web apps to chatbots<\/h2>\n\n\n\n<p>In summary:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Many times, developing a chatbot can cut development time significantly, because there\u2019s no need to design and plan a graphical user interface. (That said, it\u2019s worth looking at the finer points of chatbot UX design before beginning, to learn from&nbsp;<a href=\"https:\/\/www.toptal.com\/designers\/ux\/chatbot-fails\" target=\"_blank\" rel=\"noreferrer noopener\">the mistakes of others<\/a>.)<\/li><li>It is much easier to add new features to chatbots. Developers don\u2019t need to redesign or change any current elements. The chatbot just needs to start understanding the new type of message.<\/li><li>Chatbots are much more accessible by default to people with special needs.<\/li><li>No need to customize a cross-platform solution. The chatbot platform does that already.<\/li><li>Users trust chatbots much more for sharing information. You don\u2019t need to ask for permission or show warnings \u2013 e.g., the user can simply choose an image from their gallery and send it to your chatbot\u2014permission to access the image gallery is already given to the chat platform.<\/li><li>Chat platforms make it easy to handle push notifications. Push notifications are what makes the difference between apps that users forget and apps users will engage with regularly.<\/li><li>Chat platforms handle moving between offline and online conditions for you.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-build-a-whatsapp-chatbot-parting-advice-and-best-practices\">How to build a WhatsApp chatbot: Parting advice and best practices<\/h2>\n\n\n\n<p>The merits of writing a chatbot are pretty clear. Developers who are ready to build one are advised to start small, with a chatbot that understands one message. And handles it well.<\/p>\n\n\n\n<p>Chatbots should stick to short messages. People don\u2019t read long messages. When you have something important to send that can\u2019t be expressed concisely, it\u2019s better to split messages to several small ones.<\/p>\n\n\n\n<p>Chatbots with personality are received better. Even some bare-minimum \u201chuman speak\u201d goes a long way compared with a \u201csystem message formality\u201d approach: \u201cI will update the parking map for you,\u201d instead of, \u201cThe database has been updated.\u201d A chatbot should leave the user with the sense that it\u2019s a machine that\u2019s there to serve the user, rather than a black box performing technical operations they may not be in a position to understand.<\/p>\n\n\n\n<p>This WhatsApp chatbot tutorial didn\u2019t get into the specifics of parsing the&nbsp;<a href=\"https:\/\/www.toptal.com\/java\/email-sentiment-analysis-bot\" target=\"_blank\" rel=\"noreferrer noopener\">natural-language messages<\/a>&nbsp;users will send to chatbots. But aspiring providers of&nbsp;<a href=\"https:\/\/www.toptal.com\/services\/chatbot\" target=\"_blank\" rel=\"noreferrer noopener\">chatbot development services<\/a>&nbsp;are welcome to peruse the&nbsp;<a href=\"https:\/\/github.com\/Aminadav\/whatsapp-parking-assistant\" target=\"_blank\" rel=\"noreferrer noopener\">source code<\/a>&nbsp;of the WhatsApp Parking Assistant bot (particularly&nbsp;<code>hackparkDialogFlow.ts<\/code>, which accepts requests from the user as actions) to get a feel for how that aspect works.<\/p>\n\n\n\n<p>For a more in-depth article about how to detect different types of user messages\u2014while also following the dependency injection approach to programming\u2014see Toptal\u2019s&nbsp;<a href=\"https:\/\/www.toptal.com\/typescript\/dependency-injection-discord-bot-tutorial\" target=\"_blank\" rel=\"noreferrer noopener\">TypeScript chatbot tutorial<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Long ago, I built a web app for an enterprise [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":3494,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[1],"tags":[460],"contributor":[],"class_list":["post-3493","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-other-tech-events","tag-google-2"],"featured_image_src":"https:\/\/techxmedia.com\/en\/wp-content\/uploads\/2020\/05\/Copy-of-Copy-of-Copy-of-Copy-of-Copy-of-Copy-of-...-2-796x417-1.png","author_info":{"display_name":"Techx Admin","author_link":"https:\/\/techxmedia.com\/en\/author\/techxadmin\/"},"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"Long ago, I built a web app for an enterprise (200k+ employees). Feedback on the web app prompted me to do an experiment. What would happen if I were to create a WhatsApp chatbot to solve the specific use case, instead of a web app? Would people like it better? Would it be more useful? But the\" \/>\n\t<meta name=\"robots\" content=\"max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n\t<meta name=\"author\" content=\"Techx Admin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_GB\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TECHx Media - Online media and publishing platform for the technology community, covering top news and trends from MEA region&#039;s tech and business world.\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"A developer\u2019s guide to building a WhatsApp chatbot - TECHx Media\" \/>\n\t\t<meta property=\"og:description\" content=\"Long ago, I built a web app for an enterprise (200k+ employees). Feedback on the web app prompted me to do an experiment. What would happen if I were to create a WhatsApp chatbot to solve the specific use case, instead of a web app? Would people like it better? Would it be more useful? But the\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/techxmedia.com\/en\/wp-content\/uploads\/2025\/12\/TECHx-Social.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/techxmedia.com\/en\/wp-content\/uploads\/2025\/12\/TECHx-Social.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1640\" \/>\n\t\t<meta property=\"og:image:height\" content=\"856\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-05-13T05:56:15+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-07-23T05:15:41+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"A developer\u2019s guide to building a WhatsApp chatbot - TECHx Media\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Long ago, I built a web app for an enterprise (200k+ employees). Feedback on the web app prompted me to do an experiment. What would happen if I were to create a WhatsApp chatbot to solve the specific use case, instead of a web app? Would people like it better? Would it be more useful? But the\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/bs-uploads.toptal.io\/blackfish-uploads\/uploaded_file\/file\/241231\/image-1587985401428-d33fb9216565368efffb29bab8d8e2ff.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/a-developers-guide-to-building-a-whatsapp-chatbot\\\/#blogposting\",\"name\":\"A developer\\u2019s guide to building a WhatsApp chatbot - TECHx Media\",\"headline\":\"A developer\\u2019s guide to building a WhatsApp chatbot\",\"author\":{\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/author\\\/techxadmin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/Copy-of-Copy-of-Copy-of-Copy-of-Copy-of-Copy-of-...-2-796x417-1.png\",\"width\":796,\"height\":417,\"caption\":\"WhatsApp -techxmedia\"},\"datePublished\":\"2020-05-13T09:56:15+04:00\",\"dateModified\":\"2020-07-23T09:15:41+04:00\",\"inLanguage\":\"en-GB\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/a-developers-guide-to-building-a-whatsapp-chatbot\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/a-developers-guide-to-building-a-whatsapp-chatbot\\\/#webpage\"},\"articleSection\":\"OTHER TECH EVENTS, Google\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/a-developers-guide-to-building-a-whatsapp-chatbot\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/category\\\/other-tech-events\\\/#listItem\",\"name\":\"OTHER TECH EVENTS\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/category\\\/other-tech-events\\\/#listItem\",\"position\":2,\"name\":\"OTHER TECH EVENTS\",\"item\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/category\\\/other-tech-events\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/a-developers-guide-to-building-a-whatsapp-chatbot\\\/#listItem\",\"name\":\"A developer\\u2019s guide to building a WhatsApp chatbot\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/a-developers-guide-to-building-a-whatsapp-chatbot\\\/#listItem\",\"position\":3,\"name\":\"A developer\\u2019s guide to building a WhatsApp chatbot\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/category\\\/other-tech-events\\\/#listItem\",\"name\":\"OTHER TECH EVENTS\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/#organization\",\"name\":\"TECHx Media\",\"description\":\"Online media and publishing platform for the technology community, covering top news and trends from MEA region's tech and business world.\",\"url\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/cropped-Arabic-English-Logo-01.png\",\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/a-developers-guide-to-building-a-whatsapp-chatbot\\\/#organizationLogo\",\"width\":4498,\"height\":4498,\"caption\":\"Main logo\"},\"image\":{\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/a-developers-guide-to-building-a-whatsapp-chatbot\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/author\\\/techxadmin\\\/#author\",\"url\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/author\\\/techxadmin\\\/\",\"name\":\"Techx Admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/a-developers-guide-to-building-a-whatsapp-chatbot\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/18a470c190a7a32a7e57749d2acd9952b82ae199e328f0a9d5a2cbd4136b4591?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Techx Admin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/a-developers-guide-to-building-a-whatsapp-chatbot\\\/#webpage\",\"url\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/a-developers-guide-to-building-a-whatsapp-chatbot\\\/\",\"name\":\"A developer\\u2019s guide to building a WhatsApp chatbot - TECHx Media\",\"description\":\"Long ago, I built a web app for an enterprise (200k+ employees). Feedback on the web app prompted me to do an experiment. What would happen if I were to create a WhatsApp chatbot to solve the specific use case, instead of a web app? Would people like it better? Would it be more useful? But the\",\"inLanguage\":\"en-GB\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/a-developers-guide-to-building-a-whatsapp-chatbot\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/author\\\/techxadmin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/author\\\/techxadmin\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/Copy-of-Copy-of-Copy-of-Copy-of-Copy-of-Copy-of-...-2-796x417-1.png\",\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/a-developers-guide-to-building-a-whatsapp-chatbot\\\/#mainImage\",\"width\":796,\"height\":417,\"caption\":\"WhatsApp -techxmedia\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/a-developers-guide-to-building-a-whatsapp-chatbot\\\/#mainImage\"},\"datePublished\":\"2020-05-13T09:56:15+04:00\",\"dateModified\":\"2020-07-23T09:15:41+04:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/\",\"name\":\"TECHx Media\",\"description\":\"Online media and publishing platform for the technology community, covering top news and trends from MEA region's tech and business world.\",\"inLanguage\":\"en-GB\",\"publisher\":{\"@id\":\"https:\\\/\\\/techxmedia.com\\\/en\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"A developer\u2019s guide to building a WhatsApp chatbot - TECHx Media","description":"Long ago, I built a web app for an enterprise (200k+ employees). Feedback on the web app prompted me to do an experiment. What would happen if I were to create a WhatsApp chatbot to solve the specific use case, instead of a web app? Would people like it better? Would it be more useful? But the","canonical_url":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/","robots":"max-snippet:-1, max-image-preview:large, max-video-preview:-1","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/#blogposting","name":"A developer\u2019s guide to building a WhatsApp chatbot - TECHx Media","headline":"A developer\u2019s guide to building a WhatsApp chatbot","author":{"@id":"https:\/\/techxmedia.com\/en\/author\/techxadmin\/#author"},"publisher":{"@id":"https:\/\/techxmedia.com\/en\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/techxmedia.com\/en\/wp-content\/uploads\/2020\/05\/Copy-of-Copy-of-Copy-of-Copy-of-Copy-of-Copy-of-...-2-796x417-1.png","width":796,"height":417,"caption":"WhatsApp -techxmedia"},"datePublished":"2020-05-13T09:56:15+04:00","dateModified":"2020-07-23T09:15:41+04:00","inLanguage":"en-GB","mainEntityOfPage":{"@id":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/#webpage"},"isPartOf":{"@id":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/#webpage"},"articleSection":"OTHER TECH EVENTS, Google"},{"@type":"BreadcrumbList","@id":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/techxmedia.com\/en\/#listItem","position":1,"name":"Home","item":"https:\/\/techxmedia.com\/en\/","nextItem":{"@type":"ListItem","@id":"https:\/\/techxmedia.com\/en\/category\/other-tech-events\/#listItem","name":"OTHER TECH EVENTS"}},{"@type":"ListItem","@id":"https:\/\/techxmedia.com\/en\/category\/other-tech-events\/#listItem","position":2,"name":"OTHER TECH EVENTS","item":"https:\/\/techxmedia.com\/en\/category\/other-tech-events\/","nextItem":{"@type":"ListItem","@id":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/#listItem","name":"A developer\u2019s guide to building a WhatsApp chatbot"},"previousItem":{"@type":"ListItem","@id":"https:\/\/techxmedia.com\/en\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/#listItem","position":3,"name":"A developer\u2019s guide to building a WhatsApp chatbot","previousItem":{"@type":"ListItem","@id":"https:\/\/techxmedia.com\/en\/category\/other-tech-events\/#listItem","name":"OTHER TECH EVENTS"}}]},{"@type":"Organization","@id":"https:\/\/techxmedia.com\/en\/#organization","name":"TECHx Media","description":"Online media and publishing platform for the technology community, covering top news and trends from MEA region's tech and business world.","url":"https:\/\/techxmedia.com\/en\/","logo":{"@type":"ImageObject","url":"https:\/\/techxmedia.com\/en\/wp-content\/uploads\/2025\/04\/cropped-Arabic-English-Logo-01.png","@id":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/#organizationLogo","width":4498,"height":4498,"caption":"Main logo"},"image":{"@id":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/techxmedia.com\/en\/author\/techxadmin\/#author","url":"https:\/\/techxmedia.com\/en\/author\/techxadmin\/","name":"Techx Admin","image":{"@type":"ImageObject","@id":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/18a470c190a7a32a7e57749d2acd9952b82ae199e328f0a9d5a2cbd4136b4591?s=96&d=mm&r=g","width":96,"height":96,"caption":"Techx Admin"}},{"@type":"WebPage","@id":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/#webpage","url":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/","name":"A developer\u2019s guide to building a WhatsApp chatbot - TECHx Media","description":"Long ago, I built a web app for an enterprise (200k+ employees). Feedback on the web app prompted me to do an experiment. What would happen if I were to create a WhatsApp chatbot to solve the specific use case, instead of a web app? Would people like it better? Would it be more useful? But the","inLanguage":"en-GB","isPartOf":{"@id":"https:\/\/techxmedia.com\/en\/#website"},"breadcrumb":{"@id":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/#breadcrumblist"},"author":{"@id":"https:\/\/techxmedia.com\/en\/author\/techxadmin\/#author"},"creator":{"@id":"https:\/\/techxmedia.com\/en\/author\/techxadmin\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/techxmedia.com\/en\/wp-content\/uploads\/2020\/05\/Copy-of-Copy-of-Copy-of-Copy-of-Copy-of-Copy-of-...-2-796x417-1.png","@id":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/#mainImage","width":796,"height":417,"caption":"WhatsApp -techxmedia"},"primaryImageOfPage":{"@id":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/#mainImage"},"datePublished":"2020-05-13T09:56:15+04:00","dateModified":"2020-07-23T09:15:41+04:00"},{"@type":"WebSite","@id":"https:\/\/techxmedia.com\/en\/#website","url":"https:\/\/techxmedia.com\/en\/","name":"TECHx Media","description":"Online media and publishing platform for the technology community, covering top news and trends from MEA region's tech and business world.","inLanguage":"en-GB","publisher":{"@id":"https:\/\/techxmedia.com\/en\/#organization"}}]},"og:locale":"en_GB","og:site_name":"TECHx Media - Online media and publishing platform for the technology community, covering top news and trends from MEA region's tech and business world.","og:type":"article","og:title":"A developer\u2019s guide to building a WhatsApp chatbot - TECHx Media","og:description":"Long ago, I built a web app for an enterprise (200k+ employees). Feedback on the web app prompted me to do an experiment. What would happen if I were to create a WhatsApp chatbot to solve the specific use case, instead of a web app? Would people like it better? Would it be more useful? But the","og:url":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/","og:image":"https:\/\/techxmedia.com\/en\/wp-content\/uploads\/2025\/12\/TECHx-Social.jpg","og:image:secure_url":"https:\/\/techxmedia.com\/en\/wp-content\/uploads\/2025\/12\/TECHx-Social.jpg","og:image:width":1640,"og:image:height":856,"article:published_time":"2020-05-13T05:56:15+00:00","article:modified_time":"2020-07-23T05:15:41+00:00","twitter:card":"summary_large_image","twitter:title":"A developer\u2019s guide to building a WhatsApp chatbot - TECHx Media","twitter:description":"Long ago, I built a web app for an enterprise (200k+ employees). Feedback on the web app prompted me to do an experiment. What would happen if I were to create a WhatsApp chatbot to solve the specific use case, instead of a web app? Would people like it better? Would it be more useful? But the","twitter:image":"https:\/\/bs-uploads.toptal.io\/blackfish-uploads\/uploaded_file\/file\/241231\/image-1587985401428-d33fb9216565368efffb29bab8d8e2ff.png"},"aioseo_meta_data":{"post_id":"3493","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-07-05 17:51:58","updated":"2025-06-05 14:36:37","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/techxmedia.com\/en\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/techxmedia.com\/en\/category\/other-tech-events\/\" title=\"OTHER TECH EVENTS\">OTHER TECH EVENTS<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tA developer\u2019s guide to building a WhatsApp chatbot\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/techxmedia.com\/en\/"},{"label":"OTHER TECH EVENTS","link":"https:\/\/techxmedia.com\/en\/category\/other-tech-events\/"},{"label":"A developer\u2019s guide to building a WhatsApp chatbot","link":"https:\/\/techxmedia.com\/en\/a-developers-guide-to-building-a-whatsapp-chatbot\/"}],"_links":{"self":[{"href":"https:\/\/techxmedia.com\/en\/wp-json\/wp\/v2\/posts\/3493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techxmedia.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techxmedia.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techxmedia.com\/en\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/techxmedia.com\/en\/wp-json\/wp\/v2\/comments?post=3493"}],"version-history":[{"count":0,"href":"https:\/\/techxmedia.com\/en\/wp-json\/wp\/v2\/posts\/3493\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techxmedia.com\/en\/wp-json\/wp\/v2\/media\/3494"}],"wp:attachment":[{"href":"https:\/\/techxmedia.com\/en\/wp-json\/wp\/v2\/media?parent=3493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techxmedia.com\/en\/wp-json\/wp\/v2\/categories?post=3493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techxmedia.com\/en\/wp-json\/wp\/v2\/tags?post=3493"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/techxmedia.com\/en\/wp-json\/wp\/v2\/contributor?post=3493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}