Plug Samples #12: Verify Customer Mobile Numbers with OTP to Avoid Spam Entries

Plug Samples #12: Verify Customer Mobile Numbers with OTP to Avoid Spam Entries

Hi Everyone!

Verifying customer information is critical in business to filter out junk data and spammers. Whether it’s lead generation, appointment booking, or any other operation, ensuring quality data is essential for driving meaningful outcomes. A verified mobile number stands out as a dependable source of high-quality data. When automating processes with chatbots, you can enhance data quality by adding mobile number verification through OTP (One-Time Password)

We’ve developed a plug script that verifies customer mobile numbers using OTP (One-Time Password) integrated with Twilio. You can add this to your Codeless bot builder to make your bot smarter, your processes smoother, and your data more reliable.

Overview of verifying the mobile number with OTP:

We need two Plugs:
  • Plug 1 - Generate & send OTP to the mobile number:
  • Plug 2 - Verify the OTP 
Plug 1- Generate & send OTP to the mobile number:
  • Open SalesIQ, navigate to Settings > Developers > Plugs > Add.
  • Give a name, description for the plug. Select the Platform as Scripts, and click on Create Plug. 
  • The first step in building the plug is defining the parameters. Click on the parameters on top and declare the following. 
Input Parameter 
  • Name : phone | Type : Phone
Output Parameter 
  • Name : status | Type : String
  • Name : otp | Type : Number
Copy the code below and paste it into your plug builder. Then, make the following changes
  • In line #8, replace your account_sid (Navigate to the Twilio >  Select your account > Account info > copy the Account SID)
  • In line #12, the auth token (Navigate to the Twilio > Select your account > Account info > copy the Live/Test credential)
  • In line #19, replace your Twilio phone number. 
  1. response = Map();
  2. phone = session.get("phone").get("value").remove(" ");
  3. //Generate OTP
  4. otp = randomNumber(1000,9999);
  5. //Message body
  6. body = "Your OTP for Zylker is " + otp;
  7. //Navigate to your Twilio profile > Account > API Keys & Tokens > copy the Account SID 
  8. account_sid = "ACa988e5ee589d4c827439d1";
  9. url = "https://api.twilio.com/2010-04-01/Accounts/" + account_sid + "/Messages.json";
  10. //To get auth token, Navigate to your Twilio profile > Account > API Keys & Tokens > copy the Account SID and Auth token. 
  11. //auth = "<Account SID>:<Auth token>"
  12. auth = account_sid + ":e67e8be6805u8jc717cbd6a6a0";
  13. auth_encoded = zoho.encryption.base64Encode(auth);
  14. headers = Map();
  15. headers.put("Authorization","Basic " + auth_encoded);
  16. params = Map();
  17. params.put("To",phone);
  18. //Replace your Twilio number 
  19. params.put("From","+14173879299");
  20. params.put("Body",body);
  21. response = postUrl(url,params,headers);
  22. status = response.get("status");
  23. if(status == "delivery_unknown" || status == "undelivered" || status == "failed")
  24. {
  25. sms = "failed";
  26. }
  27. else
  28. {
  29. sms = "success";
  30. }
  31. info response;
  32. response.put("status",sms);
  33. response.put("otp",otp);
  34. return response;
Then, click Save, preview the plug, and Publish it.

Plug 2 - Verify the OTP 
  • Open SalesIQ, navigate to Settings > Developers > Plugs > Add.
  • Give a name, description for the plug. Select the Platform as Scripts, and click on Create Plug.
  • Click on parameters and declear the following.  


Input Parameter 
  • Name : systemotp | Type : Number
  • Name : visitorotp | Type : Number
Output Parameter 
  • Name : otpstatus | Type : String
Copy the code below and paste it into your plug builder
  1. response = Map();
  2. systemotp = session.get("systemotp").get("value");
  3. visitorotp = session.get("visitorotp").get("value");
  4. if(systemotp == visitorotp)
  5. {
  6. otp_status = "OTP verification successful";
  7. }
  8. response = Map();
  9. response.put("otpstatus",otp_status);
  10. return response;
Then, click Save, preview the plug and Publish it. 
NotesNote : Only published Plugs will be listed in Codeless Bot Builder. 

How to add Plugs to the Codeless bot builder?

Collect the Visitor's Phone Number
  • Use the Phone Card to get the visitor's phone number.

Generate and Send OTP
  • Configure Plug 1 to generate and send a unique OTP to the visitor:
  • Under Action Cards, select the Plugs Card and choose Plug 1.
  • Choose Phone as the input (context variable).
  • Get the OTP and its status as outputs, saving them in the bot context as system_otp and otp_status, respectively.
  • Click Save to store the configuration.

Check OTP Delivery Status
  • Add a Criteria Router Card to verify if the OTP was successfully sent:
  • In the Plug Success Flow, add a Criteria Router Card.
  • Create a rule: For a flow OTP sending failed flow by setting the context variable otp_status returning "failed" (OTP failed).
  • The Not Matched Flow represents successful OTP delivery to the visitor.

Handle OTP Input from Visitor
  • In the Not Matched Flow of the Criteria Router:
  • Use a Visitor Fields Card to collect the OTP entered by the visitor.
  • Save the visitor's input in a context variable (visitor_otp).

Verify OTP
  • Use Plug 2 to compare the generated OTP (system_otp) and the visitor-provided OTP (visitor_otp):
  • Provide both OTPs as inputs to Plug 2.
  • Assign a variable to save the verification result.

Next Steps Based on OTP Verification
  • If OTP verification succeeds: Proceed with the next flow.
  • If OTP verification fails: Prompt the visitor to re-enter the OTP and repeat the verification process using the button card.



    • Recent Topics

    • Spell Check Icon Disappeared yesterday for Agent Comments

      We always use "Public Comment" when communicating on tickets with our customers. For years we had the "Spell Check" icon when typing a comment. Yesterday, this icon disappeared for comments and is only avaialable when drafting a response via "Reply."
    • Spell Checker in Zoho desk

      Is there a way to set always check spelling before sending? Outlook does this and it is a handy tool to avoid typos
    • Adding additional records dynamically to a subset of fields

      I'm trying to create a service ticket layout which will be passed to a Creator application for Field Service Management (FSM) purposes. We need to be able to define a specific subset of service product fields such as "Service Product", "Service Product Serial Number", "Service Product Warranty End Date" and "Service Product Current Warranty Status". We may need to record more than one of these subsets, in case the customer has more than one product which has to be serviced on their site. It seems
    • When Will Existing Zoho Campaigns 2.0 Orgs Convert to 3.0?

      Hi Zoho team, I'm very excited to start using Campaigns 3.0, but I don't see any notifications related to moving my org to the new version. What is the roll-out plan for existing users? Thanks
    • Date Override hangs

      When trying to add date overrides, the system hangs on save and never goes through.
    • Date Selection?

      Is there no way to select a specific date in bookings? For example we have evaluations certain Saturday's a month and would like to be able to book just for those dates. Is there anyway to do this?
    • Zoho Desk API Custom Module not all data is showing up

      When i get a record by id for my new module: responseDetailed = invokeurl [ url :"https://desk.zoho.eu/api/v1/cm_tickets_CM/" + record.getJSON("id") type :GET parameters:"" connection:"desk_connection" ]; The response doesnt contain all fields, the field
    • Unable to receive email from domains related to arib.com. Zoho error in reports mention error 554 5.7.1 rfc not compliant

      Dear Zoho experts, I am not able to receive email from domain ariba.com and ansmtp.ariba.com. When I check the delivery logs of my Zoho account it shows the status as 'failure' and reason mentioned is 554 5.7.1 This mail is rejected as it is not RFC compliant.
    • Pausing journey's over holiday's

      Has anyone found a work around to pausing journey's for a brief time (around holiday's) and turning them back on after? My understanding is freezing the journey only keeps new leads from entering, not pausing the leads already in the journey.  Thank
    • Trying to show the actual Terms & Conditions on PDF

      Hi, On Zoho forms I am trying to have the actual terms and conditions that the user needs to accept also show on the pdf that they receive after. Right now it only says "Agreed". Please help.
    • Using decisions box as condition for a script "on validate"

      Hello, I have a script on validate to check few thing and cancel submission if need be. The script works perfecly. I add a condition (admin permission) for that script not to be initiated if a decision box is checked (I also tried radio button). I use
    • How to stop ex-employees of client companies from logging in to a Zoho Creator portal with MFA?

      Hi everyone, I manage a Zoho Creator portal for our clients and have a security concern about MFA for portal users. I’d like to know if anyone has faced this and how you handled it. Setup Creator plan: Enterprise “Enforce Multi-Factor Authentication (MFA)
    • [Free webinar] Learning Table Series | Chat with intent: From conversations to intelligent actions

      Hello everyone, We are excited to invite you to another edition of the Learning Table Series webinar. With AI-powered capabilities, the way users interact with applications is evolving. Instead of navigating multiple screens to find information, users
    • how do I move email responses to the top of the of the email body?

      when someone responds to my email, their response is at the very bottom of the email. I have to scroll down to the bottom to see what they wrote. how can I move the response to the top of the email?
    • OTP New email access

      adding a new email sends a OTP code to the new email which I can't access. It send an OTP code but I can't access it without getting the new OTP code.
    • M

      Hi Zoho Support team, I got notification error in my email account when i sending email to my client (reply). It said that i exceeded limit 1600 send email per day, however i never reach that number. Could you check that ?
    • How do I reorder the item table columns in my invoice template?

      There must be a way I just cannot find it. Anyone?
    • API - Add Tags to Search Articles

      The ability to "search articles" programmatically via API would be meaningfully enhanced by allowing that search to filter for (or out) certain tags. There are lots of potential use cases here. The one that caused me to write this post is for agentic
    • [Webinar] AI-powered writing and automation in Zoho Writer

      Live webinar on November 12, 2026 | Time: 2 PM IST | 2 PM EST Hi, When organizations create documents, they often start from scratch. Then they need to proofread and translate them. Doing all of this manually takes time, and errors and hard-to-read writing
    • What is "Child Sales Order"

      When I click system predefine "Created Sales Order" button, sometimes will display "Create Child Sales Order" instead of "Create Sales Order", in "Child Sales Order" Create Page, system will not allow you to save the record. only one solution is refresh
    • Zoho Tables is now live in Australia & New Zealand!

      Hey everyone! We’ve got some great news to share — Zoho Tables is now officially available in the Australian Data Center serving users across Australia and New Zealand regions! Yes, it took us a bit longer to get here, but this version of Zoho Tables
    • Enhancements for Currencies in Zoho CRM: Automatic exchange rate updates, options to update record exchange rates, and more

      The multi-currency feature helps you track currencies region-wise. This can apply to Sales, CTC, or any other currency-related data. You can record amounts in a customer’s local currency, while the CRM automatically converts them to your home currency
    • Introducing parent-child ticketing in Zoho Desk [Early access]

      Hello Zoho Desk users! We have introduced the parent-child ticketing system to help customer service teams ensure efficient resolution of issues involving multiple, related tickets. You can now combine repetitive and interconnected tickets into parent-child
    • ZoHo Mail & MCP connectors

      Is ZoHo working an MCP connector for mail?? I find it very useful in Gmail to have Claude summarize messages for me. Thanks Jim P.S. Sorry if this is the incorrect forum. Mods please adjust as necessary.
    • Optimize your Knowledge Base for better visibility by allowing search engine crawling and indexing

      All you need to know about no-follow and no-index in KB. What are article crawlability and indexability? Crawlability and indexability are vital for making an article visible and accessible to search engines. When a search engine crawls an article, it
    • Team ticket accessibility when tickets are set to private

      Hello! I would like to know if agents would be able to see tickets assigned to their team (but not to any specific user) if ticket sharing was set to Private. Thanks in advance, Luca
    • Now you can bring your Zoho Tables data to AI Assistants with Zoho MCP!

      Imagine asking your AI assistant questions about your Zoho Tables data, exploring records, or getting insights — all through natural language. With Zoho MCP (Model Context Protocol), you can connect Zoho Tables to compatible AI assistants and let them
    • Followed Tickets view

      Hello, following a ticket makes no sense at all / offers no additional value.... Of course I can install and use the add-on My Followed Tickets for Zoho Desk, but what does it do for me? Not much! It cannot be used across departments! The range of functions
    • iPhone Duo support for Zoho Desk app?

      When is iPhone Duo support expected for the Desk app? It’s miserable to use in its current form on the device. Please optimize for the new Duo!
    • Zia AI capabilities now available in all paid editions

      Hello everyone, We are expanding the availability of AI-powered features in Desk to the other paid subscriptions from 7th July 2026. Right now, the following AI-based features are available for Enterprise edition users: Intelligence: Sentiment analysis,
    • Solution to Import OST File into Office 365.

      In today’s digital workplace, organizations are rapidly moving toward cloud-based email systems for better flexibility, security, and collaboration. Microsoft 365 has become one of the most widely used platforms for business communication. A common requirement
    • Sales Tax paid upon Delivery and Installation of Job

      We are new to Zoho Books. We pay sales tax when we deliver and install a job in a customer's home. For instance, if I received an order in September but deliver it in November. How can I get a report of all delivered sales in the month of November so
    • This user is not allowed to add in Zoho. Please contact support-as@zohocorp.com for further details

      Hello, Just signed up to ZOHO on a friend's recommendation. Got the TXT part (verified my domain), but whenever I try to add ANY user, I get the error: This user is not allowed to add in Zoho. Please contact support-as@zohocorp.com for further details I have emailed as well and writing here as well because when I searched, I saw many people faced the same issue and instead of email, they got a faster response here. My domain is: raisingreaderspk . com Hope this can be resolved.  Thank you
    • How do i change my login email address

      I need help
    • Discover the Latest Hosted Pages Enhancements

      We've made several enhancements to Hosted Payment Pages in Zoho Billing, including a redesigned single page checkout, custom field configuration, mobile OTP verification, and the ability to share a single payment page for multiple items. You can also
    • Découvrez l’API Zoho Social : Créez des workflows personnalisés pour vos réseaux sociaux

      Chaque entreprise a sa propre façon de gérer ses activités sur les réseaux sociaux. Certaines publient leur contenu depuis un CMS interne, d'autres synchronisent leurs campagnes avec leur CRM. Les agences, quant à elles, gèrent plusieurs dizaines de marques,
    • New domain

      I need assistance to add a new domain. I already paid for the monthly upgrade. Please provide instruction on the steps needed to add a new domain to start an updated email address.
    • Stock management : updates of quantities

      Hello, We are having many troubles with Zoho CRM on Stock Management. - We changed some names and added some status to the possible Status of SO and PO. - Now, the stock management has gone crazy. If we create a S.O., it increase the quantity in demand
    • Splitting Expenses?

      If I have an expense that falls under more than one expense category, is it possible to split it out? What's the timeline for this feature? Is there any way around it at the moment? Thanks!
    • Can we do Image swatches for color variants?

      We want to do something like the attached screenshot on our new zoho store. We need image swatches instead of normal text selection. We want to user to select an image as color option. Is this doable? I don't see any option on zoho backend. Please h
    • Next Page