Cliq Bots - How to make a bot respond to your messages?

Cliq Bots - How to make a bot respond to your messages?

Bots are just like your buddies with whom you can interact. They carry out your tasks, keep you notified about your to-dos and come in handy when you need constant updates from a third party application. 

So, how can you make your bot respond to a message?

The bot message handler is a piece of code triggered when a message is sent to the bot. Message handlers help you customise your bot responses to make it look conversational. The message input from the user can be either a string or an option selected from the bot suggestions. 

Let us try building a utility bot, that will bring us the top news from a particular category chosen from the list of suggestions. 
The sample workflow on triggering this handler is given below. 
  • The user pings the bot to get a list of current top trending news. 
  • Message handler of the bot identifies a keyword from the user's input and is triggered to respond with a list of categories for the user to choose from. 
  • Once the user selects an option, the message input is again captured to call the corresponding API.
  • This API response is shared by the bot to the user in a card format!
A sample code snippet for the above-mentioned scenario is given below. Take a look!

  1. response = Map();
  2. categories = {"Business","Entertainment","Gaming","General","Health-and-Medical","Music","Politics","Science-and-Nature","Sport","Technology"};
  3. if(message.containsIgnoreCase("NEWS") || message.containsIgnoreCase(" BREAKING NEWS") || message.containsIgnoreCase("HEADLINES"))
  4. {
  5. list = List();
  6. for each  category in categories
  7. {
  8. entry = Map();
  9. entry.put("text",category);
  10. list.add(entry);
  11. }
  12. suggestion = Map();
  13. suggestion.put("list", list);
  14. response.put("text","Hey " + user.get("first_name") + " ,choose one option from the list! I can help you with these. :smile:");
  15. response.put("suggestions",suggestion);
  16. }
  17. else if(categories.containsIgnoreCase(message))
  18. {
  19. url = getUrl("https://newsapi.org/v2/top-headlines?category=" + message.toLowerCase() + "&language=en&apiKey=<Insert_API_Key>");
  20. newslist = url.get("articles");
  21. rows = List();
  22. count = 0;
  23. for each  news in newslist
  24. {
  25. count = count + 1;
  26. row = Map();
  27. row.put("Headline",news.get("title"));
  28. row.put("View Link","[Read More](" + news.get("url") + ")");
  29. if(count <= 10)
  30. {
  31. rows.add(row);
  32. }
  33. }
  34. return {"text":"Hello! Here's the top news in the " + message + " category!","card":{"theme":"modern-inline","title":"Hi " + user.get("first_name") + " :smile:"},"slides":{{"type":"table","data":{"headers":{"Headline","View Link"},"rows":rows}}}};
  35. }
  36. else 
  37. {
  38. return {"text": "Hello There, this looks like an invalid category! Just try typing *News* or *Breaking News* or *Headlines*"};
  39. }
  40. return response;



The bot message handler is the easiest way to get started with building an interactive bot. So get started with it right away! 

Few useful links:




Comments and suggestions are welcome!

Best,
Manasa
Cliq



      • Sticky Posts

      • Automating Employee Birthday Notifications in Zoho Cliq

        Have you ever missed a birthday and felt like the office Grinch? Fear not, the Cliq Developer Platform has got your back! With Zoho Cliq's Schedulers, you can be the office party-cipant who never forgets a single cake, balloon, or awkward rendition of
      • Automate your status with Cliq Schedulers

        Imagine enjoying your favorite homemade meal during a peaceful lunch break, when suddenly there's a PING! A notification pops up and ruins your moment of zen. Even worse, you might be in a vital product development sprint, only to be derailed by a "quick
      • Bulk user onboarding for Cliq Channels in a jiffy

        As developers, we frequently switch between coding, debugging, and optimizing tasks. The last thing we want is to be burdened by manual user management. Adding users one by one to a channel is tedious and prone to errors, taking up more time than we could
      • Convert a message on Cliq into a task on Zoho Connect

        Message actions in Cliq are a great way to transform messages in a conversation into actionable work items. In this post, we'll see how to build a custom message action that'll let you add a message as a task to board on Zoho Connect. If you haven't created
      • Unfurling Unlimited Possibilities in Zoho Cliq 🔗

        Are you tired of your app links looking plain? Imagine if the shared links came to life with custom previews, organized data, and one-click actions, making chats more interactive. With the Cliq platform's unfurl handlers, let's see how developers can

        • Recent Topics

        • Zoho Desk - Cannot Invite or Register New User

          Hi who may concern, we encountered a problem that we cannot invite user or the visitor cannot register for a user at all through our help center portal, with the snapshot shown as below and the attachement. It always pops up that "Sorry, Unable to process
        • [ZohoDesk] Improve Status View with a new editeble kanban view

          A kanban view with more information about the ticket and the contact who created the ticket would be valueble. I would like to edit the fields with the ones i like to see at one glance. Like in CRM where you can edit the canvas view, i would like to edit
        • Knowledgeable Image Quality is very poor, any recommendations how to improve this?

          Hi All, We are looking at migrating our current knowledge base to Zoho so it can be kept in one location. Our current KB utilises a lot of images to try and make it easier for users and less wordy. Unfortunately, when I upload an image within an article,
        • Desk - CRM Integration: SPAM Contacts (Auto Delete)

          SPAM contacts is a useful feature, but when the CRM sync is used, it is very frustrating. When a contact is marked as SPAM on Desk, I wish to do the same on CRM. When a SPAM contact is deleted, I would like it deleted from CRM. The feature looks half-baked.
        • Multiple Selection/Select All for Approvals

          I have a suggestion from users regarding Approvals. In our environment, our Regional Managers can receive multiple requests for Approval or Rejection. They find it tedious to approve (or reject) each individual record. They would like to have a way to
        • Create a draft in reply to an email via Emails API

          Hi, I’d like to use the outgoing webhook to automatically create a draft reply to incoming mail. How can I use the Emails API to create a draft reply that is linked to an existing email thread? I couldn’t find the relevant method in the documentation.
        • Zoho Books | Product updates | June 2025

          Hello Users, We’ve rolled out new features and enhancements in Zoho Books, from the option to record advances for purchase orders to dynamic lookup fields, all designed to help you stay on top of your finances with ease. Introducing Change Comparators
        • How to remove an Instagram post on Zoho Social?

          Hi there, I wanted to delete yesterday's post on all social platform and managed to do so for Twitter and Facebook. I couldn't for Instagram as there is no option for delete. How can I delete successfully?
        • Convert Item to composite item

          When using Zoho CRM integrated with Zoho Inventory/Books, the item creation process is a little messy. After a few years of trial and error, we have settled on creating items in CRM, which are sync'ed to Zoho Inventory using Zoho's own internal integration.
        • 【開催報告】東京 ユーザー交流会 Vol.2 2025/6/13 CRM Plus/Formsの活用におけるポイントやおすすめ機能を紹介

          ユーザーの皆さま、こんにちは。コミュニティチームの藤澤です。 6月13日(金)に東京で「ユーザー交流会 Vol.2」を開催し、16名の方にご参加いただきました。ご参加くださった皆さま、ありがとうございました。 この投稿では、当日のセッションの様子や使用した資料を紹介しています。残念ながら当日お越しいただけなかった方も、ぜひご覧ください。 ユーザー活用事例セッション:マーケ・営業・サポートをつないで顧客体験を向上させる!Zoho CRM Plusのおすすめサービス活用事例 Zoho Champion
        • No Real DANE Support

          The issue in https://help.zoho.com/portal/en/community/topic/will-zoho-implement-dane was closed today claiming DANE was implemented. You never implemented DANE correctly, even if you think you did. DANE requires DNSSEC to work properly, you never added
        • Applying Price List to All Customers

          I just created a new price list as we have several items that have volume price breaks. To create my price lists, I followed the instructions in this article: https://www.zoho.com/us/inventory/help/items/price-list.html When it comes to applying my price
        • What's wrong with this deluge code to create a Bill?

          I know that all the data in the map is correct. The line items are pulled directly from a purchase order. // Add the purchase order ID to the bill billPOIds.add(poID); // Retrieve and merge the line items poLineItems = purchaseOrder.get("line_items");
        • 2 Ideas, Clone timesheet entry from monthly view and Notes in Weekly view

          While i love timekeeping I am finding some things slow me down.  Slow to the point of considering writing my own API call to do this. It would be so useful to be able to clone a timesheet entry from the monthly view.  It is somewhat painful to have to
        • Zoho Workdrive API call to find public external Link for a Folder

          Hi all, I can create new external share links for a WD Folder using this API call https://workdrive.zoho.com.au/api/v1/links . This works fine, however if there is already an external link created for a given folder, trying to create a new one fails (which
        • Converting Sales Order to Purchase Order

          Hi All, Firstly, this code works to convert a sales order(SO) to a purchase order (PO) via a button, however I am running into an issue when I convert the SO where the values from the line items are not pulled across from the SO to the PO. The ones in
        • Accessing and Using Formula Field

          Hi There, I created a formula field called 'Day of the Week' in the Leads module that takes the record created time and transforms it into the day of the week. The formula field returns the correct values. However, I am unable to find or use the field
        • Generate a link for Zoho Sign we can copy and use in a separate email

          Please consider adding functionality that would all a user to copy a reminder link so that we can include it in a personalized email instead of sending a Zoho reminder. Or, allow us to customize the reminder email. Use Case: We have clients we need to
        • Getting error "invalid warehouse_id" when trying to update any transaction in Zoho books

          I got a message from Zoho saying that the Warehouse and Branch has been merged into one category "Locations" Once I migrated to this setup I was no longer able to edit any invoice / create creadit notes - got an error saying "invalid warehouse_id" I never
        • 🇺🇸 🇨🇦 🇲🇽 Ask the Experts: A Live Q&A Session

          Session Closed Thank you to everyone who participated in this Ask the Experts session! Your questions, insights, and engagement made it a valuable discussion for the entire Zoho Recruit community. The comment section is now closed, but feel free to browse
        • Writing SQL Queries - After Comma Auto Suggesting Column

          When writing SQL Queries, does anyone else get super annoyed that after you type a comma and try to return to a new line it is automatically suggest a new column, so hitting return just inputs this suggested column instead of going to a new line? Anyone
        • Zoho Mail Storage Usage Discrepancy – Incorrect Storage Reporting

          Dear Zoho Support Team and Community, I previously raised a concern about inaccurate storage usage reporting in Zoho Mail but did not receive a clear or satisfactory response. To investigate further, I meticulously calculated the storage used by all folders
        • Microsoft Outlook Add-in Update: Enhancing Efficiency for Recruiters

          We've released an update to the Zoho Recruit Microsoft Outlook Add-in, which brings a host of features designed to streamline your recruiting process and boost productivity. Let's delve into the details: Associate Emails with records in Zoho Recruit You
        • How to report and analyze a multi-select field entries distinctly ?

          As many of CRM users I have many multi-select fields that allows me to choose more than one chose in one cell for a specific filed Like: Field A - A;BC - A;C -B;C But when reporting the field it will handle each cell as a "String" not multiple entries
        • Request For Quotation (RFQ) module

          Hello, Do you have any plans to implement a RFQ module in to ZOHO Inventory? I would like to chose items that I require a price for, select a number of different suppliers to e-mail and have them submit there pricing online. I would then like to see a
        • Partial payments for retainer invoices

          When a customer does not pay the entire retainer invoice there is no way to apply a partial payment. PLEASE add this function.
        • Export an email as an HTML file?

          How do we export an email in Zoho Marketing Automation as an HTML file? We have an advertising partner that needs our campaign email as an HTML file. We can't find any way to do this. If this is not possible, please explain why. It doesn't make sense
        • Function #30: Display list of associated PO on SO details screen

          Hello everyone, welcome back to our series! Imagine having the ability to effortlessly access and view details of all purchase orders linked to a sales order directly from the sales order itself. Well, today's script is designed to do just that for you.
        • 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
        • Select CRM Custom Module in Zoho Creator

          I have a custom module added in Zoho CRM that I would like to link in Zoho creator.  When I add the Zoho CRM field it does not show the new module.  Is this possible?  Do i need to change something in CRM to make it accesible in Creator?
        • Nimble enhancements to WhatsApp for Business integration in Zoho CRM: Enjoy context and clarity in business messaging

          Dear Customers, We hope you're well! WhatsApp for business is a renowned business messaging platform that takes your business closer to your customers; it gives your business the power of personalized outreach. Using the WhatsApp for Business integration
        • Custom Print Button in Page/Stateless Form

          [Zoho Creator] Unable to Add Custom Print Button to Page or Stateless Form We need the ability to add a custom print button on a page or stateless form in Zoho Creator to print a templated or formatted output (e.g., appointment confirmation, summary slip).
        • Unified customer portal login

          As I'm a Zoho One subscriber I can provide my customers with portal access to many of the Zoho apps. However, the customer must have a separate login for each app, which may be difficult for them to manage and frustrating as all they understand is that
        • Invitation-Based User Access in Zoho Analytics

          Hello everyone, We’re rolling out an important update on how users are added to your Zoho Analytics Organization and Workspaces. Previously, when admins added users, they were automatically added to the organization. Moving forward, to improve security
        • Ask the Experts 21: Power up your support game with Zoho Desk Automation

          " In every business, there are tasks to automate, Zoho Desk helps with features that integrate Assignments to manage tickets and teams to align,Macros for quick actions and workflows to streamline Contracts and schedules to hold things tight, Plans run
        • CRM calendar not syncing with Zoho Calendar

          The sync is not happening: This is my Zoho Calendar CalDAV synced with Outlook This is my Zoho CRM Calendar (sadly empty ...) I have enabled CalDAV Access. In Zoho Calendar, I have set up APP Calendar sync like this: What else can I check? Thank
        • Automating Employee Birthday Notifications in Zoho Cliq

          Have you ever missed a birthday and felt like the office Grinch? Fear not, the Cliq Developer Platform has got your back! With Zoho Cliq's Schedulers, you can be the office party-cipant who never forgets a single cake, balloon, or awkward rendition of
        • Page Variable Not Passed from Report to Form

          [Zoho Creator] Page Variable (Resource) Not Passed from Report to Form in Appointment Module We are facing a limitation in our Appointment Module related to the handling of page-level variables. We are using a page variable to select a resource, which
        • Zoho.eu and U.S. Cloud Act? Can U.S. request Zoho.eu data?

          Given the current political situation in the U.S. and possible near future implications for data privacy and security, I am curious about Zoho’s obligation to comply with the U.S. cloud act or other U.S. requests for private customer information from
        • Client Script | Update - Client Script Support For Custom Buttons

          Hello everyone! We are excited to announce one of the most requested features - Client Script support for Custom Buttons. This enhancement lets you run custom logic on button actions, giving you greater flexibility and control over your user interactions.
        • Next Page