The Slash Command Series - Build a command to create polls!

The Slash Command Series - Build a command to create polls!

Your team has decided to go for lunch and you're in charge of the menu. But before you decide on the menu, it's important to know their preferences. For instance, what if somebody is vegan and you haven't taken that into account!

Now now, we know hard it is to arrange the menu for a small group of 4, let alone for 50.   How can Cliq help this situation you may ask? Ah, simple. Create a poll using Cliq's slash commands!

With /poll command you can just post a message in channel, ask everybody to vote and get the list. The /poll command  helps you collect data, interpret, analyze and make a decision. Let's take a look at the command workflow, it's pretty easy. :D  

Command Workflow  

The command syntax would be   /poll -topic" " - optn " " 

The user would have to just specify the question (topic) and options in the command syntax and execute the command in a chat window. A poll message card is posted with the question and the options as buttons. Now, to wait for everybody to take their pick! 

The poll question and the options are stored as records in Zoho Creator and when an option is chosen, the selection made is also stored as a record.

To put it in a nutshell, this command is a classic example of multiple workflows and integration with other Zoho Products ( i.e Zoho Creator) 

Now there are four parts to the command execution- three in Cliq and one in Creator. Breaking down the command creation and execution  

Store the questions and results - Creator Application 

  • Create an application in Zoho Creator - Refer this  How to create an application help page in Zoho Creator. 
  • Create two forms - for Poll Questions and one for the Poll Results with the necessary fields. 
  • Use the zoho.creator.createRecord task and zoho.creator.getRecord task in your command and function execution code to create and get records from Creator.  Refer this  help page  

Sample Syntax for the create record task :

 

zoho.creator.createRecord("ownerName","appLinkName","formLinkName",dataMap,"connectionLinkNam", userAccess )

 

Get the owner name, appLinkName and formLinkName from the creator application URL. 

 

URL Format:  https://app.zohocreator.com/ownerName/appLinkName#formLinkName

 

Sample URL:  https://app.zohocreator.com/scottfisher5/poll-command#Questions

 

Note: We've attached a sample Poll application file for you. Download and import this file in your creator account to get an idea of the Poll application. 

Connect to the storage - Cliq Connections (authenticated)

Connections are used to integrate your application with other Zoho Applications or Third Party Web Services in an authenticated manner. 

Create a connection to invoke operations on the Creator Application from Cliq, using Cliq Platform. Use the connectionLinkName and define the userAccess parameter in the creator deluge tasks. 

Share the poll with  a group - Cliq commands 

Create a poll command and specify the command parameters. Command parameters will help fetch the question and the options given by the user in the poll. 

The command execution code is attached here. Copy the code in your deluge editor and try executing the command!


  1. message = Map();
  2. card = Map();
  3. card.put("theme","poll");
  4. b = options.get("Topic");
  5. a = options.get("Optn");
  6. buttonnames = a.toList(",");
  7. info buttonnames.size();
  8. card.put("title","POLL");
  9. message.put("text",b);
  10. dataMap = {"Question":options.get("Topic"),"Answers":options.get("Optn"),"Creator":user.get("email")};
  11. respFromCreator = zoho.creator.createRecord("ownerName","appLinkName","formLinkName",dataMap," connectionLinkName ",  
  12. userAccess );
  13. creatorId = respFromCreator.get("values").get("ID");
  14. buttons = List();
  15. for each  name in buttonnames
  16. {
  17. button = {"label":name,"hint":"Choose an option.","type":"+","action":{"type":"invoke.function","data":{"name":"FunctionName","owner":"yourname@yourdomain.com"}},"key":creatorId};
  18. buttons.add(button);
  19. }
  20. info buttons;
  21. if(buttons.size() > 0)
  22. {
  23. button = {"label":"View Result","hint":"Select an option.","type":"+","action":{"type":"invoke.function","data":{"name":"FunctionName","owner":"yourname@yourdomain.com"}},"key":creatorId};
  24. buttons.add(button);
  25. }
  26. info creatorId;
  27. card.put("thumbnail","<insert_image_url>");
  28. message.put("card",card);
  29. message.put("buttons",buttons);
  30. message.put("card",card);
  31. //aa = zoho.cliq.postToChat(chat.get("id"),message);
  32. info message;
  33. return message;

Variables used in the code

Line no 12: You'll find these in your creator application URL

Line no 18 & 24: Give your function name and email ID.

Poll Votes and Results - Cliq Buttons and Functions

  Functions work in association with buttons. Our aim for the function here should be  

  • To allow users to select an answer and store the selection in Creator.
  • To get the list of all answers for the poll when a user clicks the 'View Result' button.
  • To restrict users from answering a poll more than once. 

When a user clicks the 'View Result' option, the function will get records from Creator to display the total number of responses received for the poll. (u se the button name as the criteria for this)

Likewise, when a user tries responding to the poll twice, use the parameter 'Key' to identify if the user has already responded. If yes, then go ahead and show an error message. If no, take the user's response to the poll. 

That sure was a lengthy read. Well, have a look at this video for better understanding! 

So what are you waiting for? Go on and create a poll! Let us know how this command helps you and your team. 

If you're new here, welcome! Take a look at our slash command guide . You can also learn how to connect to accuweather.com and get weather forecast right inside your chat window. Cool right? Then, check this out !

Questions and discussions are welcome!

Until next time,

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
      • Accelerate Github code reviews with Zoho Cliq Platform's link handlers

        Code reviews are critical, and they can get buried in conversations or lost when using multiple tools. With the Cliq Platform's link handlers, let's transform shared Github pull request links into interactive, real-time code reviews on channels. Share
      • App Spotlight : PagerDuty for Zoho Cliq

        App Spotlight brings you hand-picked apps to enhance the power of your Zoho apps and tools. Visit the Zoho Marketplace to explore all of our apps, integrations, and extensions. In today's fast-paced world, seizing every moment is essential for operational
      • 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

        • Recent Topics

        • Zoho One - Syncing Merchants and Vendors Between Zoho Expense and Zoho Books

          Hi, I'm exploring the features of Zoho One under the trial subscription and have encountered an issue with syncing Merchant information between Zoho Expense and Zoho Books. While utilizing Zoho Expense to capture receipts, I noticed that when I submit
        • Rich Text For Notes in Zoho CRM

          Hello everyone, As you know, notes are essential for recording information and ensuring smooth communication across your records. With our latest update, you can now use Rich Text formatting to organize and structure your notes more efficiently. By using
        • Time based workflow without edit/action

          Hello I need help solving this problem if possible. We have Deals come into the CRM via Live Transfer which have the field properties: Stage = New Channel = Inbound Some of them don't get answered so we want these to automatically go into our Outbound
        • What's New - August 2025 | Zoho Backstage

          Every month, Zoho Backstage grows with you. These updates aren't just features and fixes, they're about making your workday smoother, your events more impactful, and your attendees happier. We’ve listened, learned, and shaped this release to keep things
        • prevent selling expired items

          Hello. I need to make a constraint on expired batch items not to be sold. Is it possible in Zoho Inventory? if so, then how? Thanks for further help.
        • Product details removed during update from other system

          We maintain our product details in an other system. These details are synchronized with Zoho at the end of each day, through an API. This has worked perfectly sofar. But last Monday, all product codes and some other product data have been wiped during
        • Client Customer

          I purchased a customer user license, but we cannot see the project I added in the customer account. I would like to ask for support on what we should do.
        • Add Ability to Use Zoho Finance Tags

          For Zoho Finance (Books and Inventory), the current actions do not allow us to affect the tags associated with the entities in question (customers, vendors, items, etc.). Please consider adding this functionality into the actions.
        • Embeded Signing doesn't work on Safari Browser

          We have implemented Zoho Sign in our website by using embeded signing, It works perfectly on Chrome. But it fails on Safari, We get stuck on Zoho Sign Page during redirection from Zoho Sign to our website after signing the document, Please let us know
        • Dataprep Webhook Limits and Cannot update column with Dataprep

          I have two problems : 1 - I am using Airflow to trigger my pipeline, and when I tested it, it worked fine a couple of times. However, after that, I received an error: {"code":429,"message":"Request rate limited"}. I didn’t send too many requests — maybe
        • Power of Automation :: Automatic removal of project users once the project status is changed.

          A custom function is a software code that can be used to automate a process and this allows you to automate a notification, call a webhook, or perform logic immediately after a workflow rule is triggered. This feature helps to automate complex tasks and
        • New in Zoho Forms: Google reCAPTCHA v3 for smarter spam protection

          Hello form builders, Spam submissions are one of the biggest challenges when you share your forms online. They not only clutter your data but can also waste valuable time. To help you combat this without making life harder for genuine respondents, we’re
        • Project Management Bulletin: August, 2025

          We’ve touched a grand 19 years since we started pioneering project management solutions with Zoho Projects. What started as a simple one-page interface is now a suite of products with Zoho BugTracker, Zoho Sprints, and our new debut Zoho Projects Plus,
        • Zoho Sign and Zoho Workdrive Integration

          Hello, there. I want to know if it's possible to save a signed document from Zoho Sign in an specific folder for each signer in Zoho Workdrive.  For example: If John Doe signs the document in Zoho Sign I want to save it automatically in a folder named
        • Office 365 and CRM mail integration: permission required

          Has anyone run into this weird problem? My email server is Office 365. When I try to configure Zoho CRM to use this server, a Microsoft popup window opens requesting user and password. After entering that, I get a message in the Microsoft window saying
        • Empowered Custom Views: Cross-Module Criteria Now Supported in Zoho CRM

          Hello everyone, We’re excited to introduce cross-module criteria support in custom views! Custom views provide personalized perspectives on your data and that you can save for future use. You can share these views with all users or specific individuals
        • How do you list multiple contacts for a lead?

          My sales team wants to be able to add additional contacts for leads, how do we do that? Is there a different way we should be using the lead / contact functionality? Moderation update (9th September 2025): Our developers have built an extension to achieve
        • Modifying Three Dot Menu Options

          Is there a way to modify the three dot menu options that display in a Report header? They currently display: Show As (List, Calendar, Timeline), Print, Import, Export. I'd like to remove the Show As and Print options, since they aren't applicable for
        • Elevate your CX delivery using CommandCenter 2.0: Simplified builder; seamless orchestration

          Most businesses want to create memorable customer experiences—but they often find it hard to keep them smooth, especially as they grow. To achieve a state of flow across their processes, teams often stitch together a series of automations using Workflow
        • Field Not Updating in FSM Script - Service and Parts module.

          Dear Team, I am reaching out regarding a script I have implemented in Zoho FSM to automate the calculation of the End of Service date based on the End of Sale date in the Service and Parts module. Overview of the script: Fetches the End_of_Sale__C and
        • Zadarma + Zoho CRM Integration – Missed Calls Saved as Contacts Instead of Leads

          Hello everyone, I’m looking for input from anyone with experience using the Zadarma + Zoho CRM integration. Currently, I’m seeing that missed calls are automatically being created as Contacts instead of Leads. From a CRM perspective, this doesn’t make
        • Zoho Books | Product updates | September 2025

          Hello users, We’ve rolled out new features and enhancements in Zoho Books. From PayNow payment method to applying journal credits to invoices and bills in other locations, explore the updates designed to enhance your bookkeeping experience. Integrate
        • How to update Multiple Users field in Quote Module from Deal Module

          Scenario : Deal Module having Multiple User Field (Presales Engineer) which having more than 1 User and through Deluge Script I need to get that Users Details and need to put into Multiple User Field (Presales Engineer) of Quote Module. Note: Both Module
        • Auto-sync field of lookup value

          This feature has been requested many times in the discussion Field of Lookup Announcement and this post aims to track it separately. At the moment the value of a 'field of lookup' is a snapshot but once the parent lookup field is updated the values diverge.
        • Clone a Module??

          I am giong to repurpose the Vendors module but would like to have a separate but very similar module for another group of contacts called Buyers. I have already repurposed Contacts to Sellers. Is it possible to clone (make a duplicate) module of Vendors
        • Advance PDF creation from CRM data

          I'm trying to create a PDF export of data in the CRM. My problem is I want a pretty complicated format for the data. I'm trying to export multiple modules worth of data, with nested one-to-many relationships between the modules. Along with that, I want
        • how to disable staff selection Zoho Booking integrated to SalesIQ?

          currently there is only one Consultant in my Zoho Bookings like this I integrate Zoho Bookings into Zoho SalesIQ to create a chatbot. Unfortunately, even though I only have one consultant for a consultation, the user have to pick the consultant. It will
        • How to change the text in WhatsApp Zobot integrated to Zoho Booking?

          I have integrated Zoho Bookings into Zoho SalesIQ, I want to change the text in WhatsApp when creating a booking in Zobot how to change those text?
        • how to differentiate if whatsapp comes from certain landing page?

          I create a Zobot in SalesIQ to create a Whatsapp bot to capture the lead. I have 2 landing pages, one is SEO optimized and the other want is optimized for leads comes from Google Ads. I want to know from which landing page this lead came through WhatsApp
        • YouTube Live #1: AI-powered agreement management with Zia and Zoho Sign

          Hi there! We're excited to announce Zoho Sign’s first YouTube live series, where you can catch the latest updates and interact with our Zoho Sign experts, pose questions, and discover lesser-known features. We're starting off by riding the AI wave in
        • Introducing Profile Summary: Faster Candidate Insights with Zia

          We’re excited to launch Profile Summary, a powerful new feature in Zoho Recruit that transforms how you review candidate profiles. What used to take minutes of resume scanning can now be assessed in seconds—thanks to Zia. A Quick Example Say you’re hiring
        • Updating Subform Record from other Form

          Just wanted to ask how to properly approach this. I have 2 forms and would like to trigger an auto update on the subform once record submitted. block below only updates 1 row for each recordRow in input.AV_System { AssetRecord = Site_Asset_Services[SOR_No
        • when I email a invoice how can i see it was sent and also were i can go to see all emails sent

          when I email a invoice how can i see it was sent and also were i can go to see all emails sent?
        • Problem with Email an invoice with multiple attachments using API

          I have an invoice with 3 attachments. When I send an email manually using the UI, everything works correctly. I receive an email with three attachments. The problem occurs when I try to initiate sending an email using the API. The email comes with only
        • Zoho Books - Hide Convert to Sales Order if it can't be used.

          Hi Books team, I noticed that it is not possible to convert a Quote to a Sales Order when a Quote is not yet marked as accepted. My idea is to not show the Convert to Sales Order button when it is not possible to use it, or show it in a grey inactive
        • How do I bulk archive my projects in ZOHO projects

          Hi, I want to archive 50 Projects in one go. Can you please help me out , How can I do this? Thanks kapil
        • Cross-Data Center Collaboration and / Or allowing users to choose DC

          Dear Zoho Cliq Support Team, We are writing to request a significant enhancement to Zoho Cliq that would greatly benefit our geographically dispersed development team. Current Challenge: Currently, Zoho Cliq automatically routes users to specific data
        • Zoho Flow - Update record in Trackvia

          Hello, I have a Flow that executes correctly but I only want it to execute once when a particular field on a record is updated in TrackVia. I have the trigger filters setup correctly and I want to add an "update record" action at the end of the flow to
        • New Mandatory One-Click Unsubscribe Link Overshadowing Custom Unsubscribe Link

          I was recently informed by Zoho CRM Support that they are now mandated by the large email service providers like Google and Yahoo to provide a one-click unsubscribe option in the header (not the body) of all mass emails. I have a custom unsubscribe link
        • Supervisor Rules - Zoho Desk

          Hi, I have set up a Supervisor Rule in Zoho Desk to send an email alert when a ticket has been on hold for 48 hours. Is there a way to change it so that the alert only sends once and not on an hourly basis? Thank you Laura
        • Next Page