InteGreat 06: Integrate your Zoho Creator app with Whatsapp using Twilio

InteGreat 06: Integrate your Zoho Creator app with Whatsapp using Twilio

Hi folks,

We're back with a new post in our InteGreat series, and this time we're going to walk you through how to integrate your Zoho Creator application with Whatsapp using Twilio.

Before we dive into this integration, let's quickly cover some basics.


What is Whatsapp? How do businesses leverage it?

WhatsApp Messenger, or simply WhatsApp, is a cross-platform messaging app that lets you make video and voice calls, send text messages, and more.

With the introduction of Whatsapp Business, more businesses are using it as a means to communicate and engage with their customers and leads. They also use it for sending information, such as appointment details, shipping details, and confirming booking requests.


What is Twilio?
Twilio is a communications platform that allows software engineers to build voice and SMS capabilities into applications. Many of our customers integrate their Zoho Creator apps with Twilio to send SMS notifications, such as appointment reminders, transaction details, status updates on orders, and device approvals.

In this post, we'll talk about how to integrate your Creator app with Whatsapp, to communicate relevant information to your customers. That is, whenever a user or a customer submits data in a form, we can trigger a notification to the user, sharing relevant information. We can automate this entire process using Twilio on Creator's form workflow option that's enabled using an API. 


Why use Twilio to integrate a Creator app with Whatsapp?

Whatsapp doesn't provide a direct, end-user API, however, they allow you to host a small service, which in turn talks to Whatsapp servers. But hosting your own server can be challenging in terms of reliability, security, and knowledge, so we're using the cloud-based service option.

Twilio is one of the established messaging service providers that we support integration for. So you can opt to use the Twilio API to act as host to communicate with Whatsapp.


Before we do that, though, we need to set a few things to configure the integration.


Step 1: Set up a Whatsapp Business account, set up your Facebook Business Manager account, and set up a Twilio account using the same Whatsapp Business account mobile number.

Step 2: After you create the Twilio account, request access to enable the Twilio number for Whatsapp messages, and verify your Facebook Business Manager account.

Step 3: Create an appointment/registration form in your Creator application to collect the mobile numbers and the consent for Whatsapp notifications. 

Now, let's go in-depth into each of these steps:


Step 1: Setting up the accounts

Whatsapp Business account: First, choose the mobile number from which the notification is to be triggered, and use that mobile number to set up Whatsapp Business account.

Facebook Business Manager account: Then, please do set up your Facebook profile to create a Business Manager account, if you already haven't set up one. You can use your Facebook username and password to sign in to Business Manager.

To create a Business Manager account:

  1. Go to business.facebook.com/overview.
  2. Click Create account.
  3. Enter a name for your business, your name, and work email address and click Next.
  4. Enter your business details and click Submit.

Twilio account: Next, do sign up for a Twilio account with the same mobile number with which you've set up the Whatsapp Business account.

Once these initial setups are configured, you can proceed to request access and verification.

Step 2: Request access and verification

Now, WhatsApp uses your Facebook Business Manager account to identify your business and associate your phone number with it.

Twilio provides a sandbox environment, where users can test the API code with a sandbox from the number provided by Twilio, which can used used to test the API. To use your own number for notifications, you need to submit a request to Whatsapp with your business requirement. They need to approve it to trigger Whatsapp messages via the API. Whatsapp doesn't provide a direct, end-user API URL, so we're integrating it on top of the Twilio API and using that in the Creator application.

Please note that WhatsApp has final discretion to approve companies to use the API. You can follow the steps given below to request access and complete the verification process:

1) Twilio: Request access to enable your Twilio numbers for WhatsApp.
2) Twilio: Submit a sender profile and message templates.
3) Facebook: Approve Twilio to send messages on your behalf.
4) Facebook: Verify your Facebook Business Manager account.
5) Twilio: Twilio completes your WhatsApp sender registration.


Step 3: Configuring the code

Once you've completed the verification process and set the Whatsapp account, you can make use of the Twilio API on a Zoho Creator workflow to trigger a Whatsapp message.

For that, let's create a simple appointment or registration form in your Creator app.

Along with the other fields, you need to add the following fields:

  • Phone number type field to collect the mobile number of the customer/user
  • Decision box type field to get consent for Whatsapp notification



Once you've created the form, on On create on success, you need to add the code to trigger the Whatsapp notification based on the value in the Decision box field to send notifications.

Please find the below sample code added with the post URL call to trigger the notification via the Twilio API.

  1. if(input.I_agree_to_receive_whatsapp_notification == true)
  2. {
  3. mp = Map();
  4. mp.put("To","whatsapp:" + input.Mobile_Number);
  5. mp.put("From","whatsapp:+91**********");
  6. mp.put("Body","Your appointment is coming up on" + input.Appointment_Date_Time.todate());
  7. header = Map();
  8. username = zoho.encryption.base64Encode("<TWILIO_ACCOUNT_SID>:<TWILIO_AUTH_TOKEN>");
  9. header.put("Authorization","Basic " + username);
  10. resp = postUrl("https://api.twilio.com/2010-04-01/Accounts/<TWILIO_ACCOUNT_SID>/Messages.json",mp,header);
  11. info resp;
  12. }

Script explanation:

  1. Here, "I_agree_to_receive_whatsapp_notification" is the Decision box field, and we are using the if condition to trigger notifications only to the user who checked this field while submitting data in the form.

  2. Mobile_Number is the phone number field where the user enters their mobile number while submitting the form.

  3. The From in the code part is a static phone number from which the notification will be sent to all users for which the above setup and verifications were done. The business name and the logo as submitted in step 2 for "Submit a sender profile and message template" will reflect on the from part of the Whatsapp message to the customers.

  4. The Body part is the content of the Whatsapp message, where you can have both the static and form field content passed against it. 

  5. The "To" number (dynamic content) and the "body" of the Whatsapp message are the content filled in on the Creator form, and need to be passed to a data map.

  6. Authenticate the API on the Creator end with basic authentication, as below.
    username = zoho.encryption.base64Encode("<TWILIO_ACCOUNT_SID>:<TWILIO_AUTH_TOKEN>");
    header.put("Authorization","Basic " + username);
     

    The account SID (string identifier) and Authtoken will be available in the settings option under Twilio account, as in the screenshot given above.

    Note: A string identifier (SID) is a unique key that's used to identify specific resources. Here, the account SID is used to identify the Twilio account from which the API is triggered.

  7. Construct the Twilio Whatsapp API call in the below format:

    postUrl("https://api.twilio.com/2010-04-01/Accounts/<TWILIO_ACCOUNT_SID>/Messages.json",mp,header);

    Here, both the header map (header) and the data map (mp) are passed as arguments for the POST URL call to authenticate and trigger the Whatsapp message via API. 



    8. Please don't forget that WhatsApp requires that your application implement explicit user opt-ins to deliver messages over WhatsApp on the mobile number provided, while submitting the data on the Creator form and triggering the notification only for consenting users. Whatsapp also recommends that business owners track and save these details for future reference.

    Please note that sending messages to end users without an opt-in may result in users blocking your business, as well as the suspension of your WhatsApp Business account.
We hope this tip was useful to you! If there are any questions, feel free to ask in the comments below, and we'll be happy to address them for you!



        • Recent Topics

        • Using Custom Fonts for All Users without Installing on Each Users System

          Hi, Couple of questions, is it possible to upload a Custom Font to Zoho Writer and have all users see/use that font without installing it manually on each users system? If so, does this need to be done by the Super Admin or can anyone with Admin permissions
        • CRM - QR Codes and Bar Codes

          Hi I am using CRM to run my service team - Asset maintenance business We need to move to and generate a QR code for each Asset we look after. And we need Bar code reading for the testing we do. (pre-bar-coded sample bottles are provided by the lab) Does
        • Access Tokens and Webhooks

          I have a linux server application that I want to be able to talk to the cliq chatbot and get a response back to that linux server application. This is for the linux server application to check the chat/channel's message history in Cliq. The Zoho API console
        • unable to add email aliases

          Hi, just verified and set up my domain but whenever I try to add another email alias I get a rather unhelpful error popup just saying AS101, doesn't matter if I tick set as mailbox address or not.
        • Collaborators can't see Zia

          Hello Zoho Writer Team, I recently shared a document with a collaborator, but she mentioned that Zia is not active and unable to assist her in adding content. Could you please guide me on how to resolve this issue? Looking forward to your assistance.
        • In what case it's better to use Developer Console? Only for marketplace?

          As I can see from the documentation, the limitations are challenging. No Custom API No Page Variables No Custom Connections.
        • Default Reminder for tasks set to Pop-up instead of email

          Try to save a click every time we create a task we want it to default to pop-up instead of email. Also default is to have reminder unchecked anyway to change so reminder is checked and method is pop-up default instead of email? Attached picture. Thanks,
        • Why wont Zoho Support Grammarly!! --- PLEASE VOTE FOR THIS to show Zoho we need this

          The spell check and grammar in ZOHO are so buggy and a waste of time. Please support Grammarly! I'm sure I'm not the only one — there are other CRMs that support this. If you're not planning to add this feature, Please let others know before accepting
        • Zoho Book not Connecting to Bank

          Is anyone else having issues with Zoho Books connecting to their bank? We have not been able to connect to the Co-operative bank feeds since Dec. Zoho are blaming the Co-op but the Co-op says that it has to be a Zoho issue as no other accounting software
        • Dashboard Auto-refresh

          Why is there no Auto-refresh on the Dashboard? People have been asking for the last 6 years for this function from what I can see in my reasearch, it seems like a very simple intergration for Zoho to achieve. on Sept. 2, 2014, this was added: Support
        • Can't connect to Blogger & Wordpress

          Hello Zoho Support Team, Thank you for providing Zoho Writer—it’s a fantastic tool that I truly enjoy using. However, I’ve encountered an issue when attempting to connect it to Blogger or WordPress for automatic posting. When I try to establish the connection,
        • Weekly Tips: SecurePass For Extra Security

          Imagine sensitive data from your organisation sent via email is being accessed by unintended recipients. The sensitive data can range from Personal Identification Information to a tender quotation or a client’s NDA document. The unintended access could
        • Multiple Blueprints on different fields at the same time.

          It looks only 1 Blueprint can run at the same time, it makes sense for many Blueprints on the same field (Eg. Stage). But what about multiple Blueprints on "different" fields? the multiple options must be available. (Eg. Stage, Documents Status, Contract
        • Changing VAT start date

          Good Evening, Kindly asssit with this issue. 1. When setting up, I set my start vat date as October 29th. The system as has taken my month end date as 29th instead of either 30th or 31st depending on the month. 2. IS it possible to file past months at
        • Headers in Subfrom - Zoho CRM

          Currently we cannot add any headers to CRM Subform If we have very large subforms and we want to logically group the rows it becomes really hard to do it Please add a header feature so we can add headers to a subform to logically and visually group different
        • Bank entriy is nov month why this shifted to jan 2025 month

          bank entries for november month i entered but why this is transfer to jan 2025 month.
        • Migrate email domain from old .yyy to .zzz over time using aliases

          Hi, I have an email domain that I've used for a long time that I'd like to migrate from. I have purchased a new domain and over time would like to use the new user@newdomain email address. I would prefer to have the alias point to the old (in use) address
        • mx

          hello please if shopify domain doesn't allowed forwarding email when ensuring it with zoho mx what's other alternative options?
        • Delay in Listing Customer data while creating transaction

          After importing customer data into Zoho Books, I attempted to create an invoice but couldn't find the display name in the search results. However, it appeared when using the advanced search. When I manually add a customer name, the display name becomes
        • This Operation has been restricted. Please contact support-as@zohocorp.com for further details

          Hello, I get the error This Operation has been restricted. Please contact support-as@zohocorp.com for further details. I have attached an error image to this email, and my domain name is 27investments.com.vn I hope to receive support from you. Best
        • Zoho Mail blocked by SpamCop/Mimecast 136.143.188.16

          I cannot send emails to people whose domains use Mimecast or other systems that read SpamCop. This isn't the first time that this has happened. Please arrange a fix ASAP. Thanks
        • Can sent or receive email from certain domain

          Hi i have a problem with emails that have ...@otenet.gr. Otenet is the biggest provider in Greece but i can't communicate with its emails. (Message rejected due to: domain owner discourages use of this host Remote-MTA: dns; mx.otenet.gr) Please help Thanks
        • existing warehouses need to be migrated to the Locations module

          Upgrade to Locations We've enhanced the Branches module to include warehouses and renamed it as Locations. To enable the Locations feature, your existing warehouses need to be migrated to the Locations module. Once migrated, these warehouses will appear
        • Transaction Rules & Customer Payments

          So I have a situation as follows. We have many clients who are all invoiced on the 1st of each month on a recurring invoice for 1 of 10 plans. This means that almost all payment dates are the same (some people pay late) and that a lot of the amounts are
        • User Filter for Dynamic Date Dimensions in Zoho Analytics

          One challenge I frequently encounter is the need to create multiple versions of the same report—one for yearly data, another for quarterly data, another for monthly, and so on. While this works, it leads to unnecessary duplication, making maintenance
        • Zoho CRM Mobile App Calls Module Missing

          Hello all, After the last update I have two things. 1. I do not see the calls module at all - not via search, not anywhere 2. In home I do not see any scheduled calls, tasks, etc. If this in the new update or is my app gone wrong somewhere?
        • Show value in a field based on selection

          Hello, I'm new at Zoho Forms, I'm trying to do the following: Let's say there are two fields, (A) is a drop-down list for items, and field (B) is for a dedicated code of each item. Is it possible to apply a conditional logic once you select an item from
        • Manage a rental inventory

          Hi Zoho team, We have a company that is renting furniture and decor in the event industry. 1. Can Zoho Inventory manage inventory for rentals? 2. If no, can we create some features with Zoho creator that can integrate with Inventory to manage our rentals?   3. We have 2 warehouse, can we easily do inventory transfer between warehouse? Thank you for for help, Peter
        • Zoho Sign up forms on Wordpress website not working smoothly

          We have set up the forms on the website and linked them to respective email journeys. But when wesubmit the form the email generated/sent to user is not consistent. Sometimes the journey email is sent, sometimes a email verification message is sent ,
        • Zoho Deluge Online Training Workshop 2025

          Master Deluge and Automate Zoho Applications An Extensive Online Training The Zoho Deluge Online Training is an extensive 2-day workshop designed specifically for developers, business users, and automation enthusiasts who want to master Deluge—Zoho’s
        • Possibility to show Images during Blueprint Transitions

          We use Blueprints heavily in our business to keep a structured process and to use a lot of automations. In fact, we automated so much, that our co workers sometimes don't know what really is happening. It would be helpful if we could show the users a
        • Zoho User Group Meetups 2025: Mis de eerste editie van het jaar niet!

          Beste Zoho Dutch Community, Bij Zoho geloven we in het belang van het aanbieden van gratis trainingen, zodat u het meeste uit uw Zoho Apps kunt halen bij het beheer van uw bedrijf. Daarom komen de ZUGs (Zoho User Groups) Meetups in maart terug naar Nederland
        • Accessing Attachments in Zoho Recruit Extension for API Integration

          Hi, I am currently developing a Zoho Recruit extension to integrate with a third-party application. As part of this, I need to retrieve the attachment file from the current record and include it in an API request. However, I couldn’t find a relevant Zoho
        • Cannot set Subform Multiline field to read-only using Client Script

          I am using client script to set different subform fields as read-only It works for Single Line Fields, but when I try to set a Multiline field as Read-only it doesn't work var subform = ZDK.Page.getSubform("Subform_1"); var item_Code_old = subform.getField('Item_Code_Old').setReadOnly(true);
        • Set Custom Icon for Custom Modules in new Zoho CRM UI

        • Whatsapp integration update.

          Please, there is no way on WhatsApp integration to know if a message has been read, or has been managed by a member of the team. There should be a way to add contextual info or something please.
        • When converting a lead to an account, the custom mandatory fields in the account are not treated by zoho as mandatory

          In my Account module I have a number of custom fields that I have set as mandatory. When I enter a new customer as a new account they work, I can't save the record without populating them. However when I convert a lead, my CRM users are able to save the
        • Initiate conversations anytime with WhatsApp's Templates

          Previously, in Bigin's Messages module, you could only reply to customer-initiated messages, but with this enhancement, you can now initiate conversations using WhatsApp templates. A WhatsApp template is a pre-designed message template designed to start
        • [Training] Zoho Deluge Online Training Workshop

          Hello Everyone, We are much elated to invite you all to our upcoming Zoho Deluge online training workshop. Master deluge and automate Zoho applications The Zoho Deluge Online Training is an extensive 2-day workshop designed specifically for developers,
        • Not possible to remove mandatory system fields?

          Is there no way to make things like under Calls "Call Duration" or "Call Start Time" or under Potentials "Close Date" not mandatory? These fields are useless for my organization and waste time but the box is grayed out to not make them mandatory. It's
        • Next Page