Convert a message on Cliq into a task on Zoho Connect

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 a board in Zoho Connect, then head over to this help document to know how to create one. 

For this example, we've created a board for the Zylker Campaigns team in Zoho Connect. The board has three sections: User Interface, Content Marketing, Customer Support. We'll see how the marketing team discusses about upcoming marketing initiatives and keeps track of tasks in their connect board. 



The workflow behind creating this message action is pretty simple. 

1. Once a user clicks on the Add Connect Task message action, the action's handler is triggered to display a form. 
2. The user fills all the information required. We use the form change handler to modify the form field values based on the users' inputs. For example, display networks that the user is a part of by default and on selecting a specific network, we'll show the list boards that the user is a part of under the selected network. The same applies for sections as well. 
3. On choosing the respective network, board and section, the user can add the task title, description, due date, assignee and more. Note that, the message on which the action was performed will be displayed as the task title by default. This can be modified.
4. On clicking Add Task, the form submit handler is invoked to create a task in Connect with all the provided details. 

Prerequisites
Create a connection between Cliq and Connect: 
You'll need an active connection between Cliq and Connect. To create a connection, 
  1. Click on your display picture. This will open up the user panel. Now, click on Bots & Tools
  2. Click on the Connections icon present on the left side menu of the Bots & Tools page. 
  3. Now, click on Create Connection
  4. In the Add Connections view, select the Zoho Oauth option. 
  5. Name your connection. For example you can name your connection: zoho_connect or zohoconnect and choose the following scopes: zohopulse.networklist.READ, zohopulse.tasks.READ, zohopulse.tasks.CREATE
  6. Make sure the Use Credentials of Login User option is enabled. 
  7. Click on the Create and Connect button to generate the invoke URL task with the connection name. 
We'll be using this invoke URL task in our code. 

Create a message action 

To create a message action on Cliq, 

  1. Click on your display picture. This will open up the user panel. Now, click on Bots & Tools. 
  2. Click on Message Actions in the left pane.
  3. Click on the Create Message Action button and fill in the required details. 
    Action Name: Provide your message action name. This field is mandatory.
    Hint: Brief explanation about the message action.
    Access Level: Decide who gets to access your message action. Choose between Organization, Team and Private. Default option is Private.
    Choose what kind of messages should have the message action. Options are Text messages, Attachments and Links. For this example, we're choosing messages of the type Text
  4. Click on Save & Edit Code. 
Create a form function

To create a form function on Cliq, 

  1. Click on your display picture. This will open up the user panel. Now, click on Bots & Tools.
  2. Click on Functions in the left pane. Click on the Create Function button and fill in the required details. 
  • Name: Give your function name. Ensure to use the same function name in your form's code as well. 
  • Description: Briefly describe how your function works. 
  • Function Type: Choose the component with which the function should be associated. For this example, we're using the function of the type: Form 

Step 1: Configuring the message action handler
The message handler is triggered to return the Create Task form as a response. 

  1. messageText = message.get("content").get("text");
  2. getNetworks = invokeurl
  3. [
  4. url :"https://connect.zoho.com/pulse/api/allScopes"
  5. type :GET
  6. connection: "" // Give your connection name
  7. ];
  8. getNetworks = getNetworks.get("allScopes").get("scopes");
  9. netWorkOptions = List();
  10. for each  network in getNetworks
  11. {
  12. networkList = Map();
  13. networkList.put("label",network.get("name"));
  14. networkList.put("value",network.get("id"));
  15. netWorkOptions.add(networkList);
  16. }
  17. inputs = list();
  18. inputs.add({"type":"select","name":"networks","label":"Network","hint":"Select a network","placeholder":"Select a network!","mandatory":true,"value":"","options":netWorkOptions,"trigger_on_change":true});
  19. inputs.add({"type":"select","name":"boards","label":"Boards","hint":"Select a board","placeholder":"Select a board!","mandatory":true,"value":"","options":netWorkOptions,"disabled":"true","trigger_on_change":true});
  20. inputs.add({"type":"select","name":"sections","label":"Section","hint":"Select a section","placeholder":"Select a section!","mandatory":true,"value":"","options":netWorkOptions,"disabled":"true"});
  21. inputs.add({"name":"title","label":"Title","placeholder":messageText,"value":messageText,"hint":"Enter your task name","min_length":"0","max_length":"50","mandatory":true,"type":"text"});
  22. inputs.add({"type":"textarea","name":"note","label":"Description","hint":"Describe your task.","placeholder":"To be done by Tuesday","mandatory":false});
  23. inputs.add({"name":"duedate","label":"Due by","placeholder":"Give your task's due date.","mandatory":false,"type":"date"});
  24. inputs.add({"type":"select","name":"priority","label":"Priority","hint":"Choose your task priority","placeholder":"High","mandatory":true,"value":"High","options":{{"label":"No Priority","value":"None"},{"label":"Low","value":"Low"},{"label":"Medium","value":"Medium"},{"label":"High","value":"High"}}});
  25. addTask = {"name":"addTask","type":"form","title":"Add a task","hint":"Add a task to a board in Zoho Connect. ","button_label":"Add Task","inputs":inputs,"action":{"type":"invoke.function","name":"connectTask"}};
  26. return addTask;





Step 2: Configuring the form change handler

The form change handler will be triggered when the user is filling up the form. The handler is responsible for modifying the form field values based on the user's inputs. 

  1. targetName = target.get("name");
  2. inputValues = form.get("values");
  3. networkID = inputValues.get("networks").get("value");
  4. actions = list();
  5. if(targetName.containsIgnoreCase("networks"))
  6. {
  7. getBoards = invokeurl
  8. [
  9. url :"https://connect.zoho.com/pulse/api/myBoards"
  10. type :GET
  11. parameters:{"scopeID":networkID}
  12. connection:"" // Give your connection name
  13. ];
  14. getBoards = getBoards.get("myBoards").get("boards");
  15. boardOptions = List();
  16. for each  board in getBoards
  17. {
  18. boardList = Map();
  19. boardList.put("label",board.get("name"));
  20. boardList.put("value",board.get("id"));
  21. boardOptions.add(boardList);
  22. }
  23. actions.add({"type":"update","name":"boards","input":{"type":"select","name":"boards","label":"Boards","hint":"Select a board","placeholder":"Select a board!","mandatory":true,"options":boardOptions,"trigger_on_change":true}});
  24. }
  25. else if(targetName.containsIgnoreCase("boards"))
  26. {
  27. boardId = inputValues.get("boards").get("value");
  28. getResponse = invokeurl
  29. [
  30. url :"https://connect.zoho.com/pulse/api/boardSections"
  31. type :GET
  32. parameters:{"scopeID":networkID,"boardId":boardId}
  33. connection:"" // Give your connection name
  34. ];
  35. getSections = getResponse.get("boardSections").get("sections");
  36. sectionOptions = List();
  37. for each  section in getSections
  38. {
  39. sectionList = Map();
  40. sectionList.put("label",section.get("name"));
  41. sectionList.put("value",section.get("id").toString());
  42. sectionOptions.add(sectionList);
  43. }
  44. getMembers = getResponse.get("boardSections").get("members");
  45. if(getMembers.isempty() == false)
  46. {
  47. boardMembers = List();
  48. for each  member in getMembers
  49. {
  50. memberList = Map();
  51. memberList.put("label",member.get("name"));
  52. memberList.put("value",member.get("zuid"));
  53. boardMembers.add(memberList);
  54. }
  55. actions.add({"type":"update","name":"sections","input":{"type":"select","name":"sections","label":"Section","hint":"Select a section","placeholder":"Select a section!","mandatory":true,"options":sectionOptions}});
  56. actions.add({"type":"add_after","name":"duedate","input":{"type":"select","name":"members","multiple":true,"label":"Assignees","hint":"Add assignees","placeholder":"Assign task to a member","mandatory":false,"options":boardMembers}});
  57. }
  58. else
  59. {
  60. actions.add({"type":"update","name":"sections","input":{"type":"select","name":"sections","label":"Section","hint":"Select a section","placeholder":"Select a section!","mandatory":true,"options":sectionOptions}});
  61. }
  62. }
  63. return {"type":"form_modification","actions":actions};



Step 3: Configuring the form submit handler

We'll call the create task API in form submit handler. The submit handler typically receives all the inputs filled by the user and will be triggered on form submission. 

  1. response = Map();
  2. formValues = form.get("values");
  3. scopeID = formValues.get("networks").get("value");
  4. boardId = formValues.get("boards").get("value");
  5. sectionId = formValues.get("sections").get("value");
  6. title = formValues.get("title");
  7. priority_value = formValues.get("priority").get("value");
  8. parameters = {"scopeID":scopeID,"boardId":boardId,"sectionId":sectionId,"title":title,"priority":priority_value};
  9. desc = formValues.get("note");
  10. if(desc != "" && !desc.isEmpty())
  11. {
  12. parameters.put("desc",desc);
  13. }
  14. duedate = formValues.get("duedate");
  15. if(duedate != "" && !duedate.isEmpty())
  16. {
  17. duedate = duedate.toList("-");
  18. eyear = duedate.get(0);
  19. emonth = duedate.get(1);
  20. edate = duedate.get(2);
  21. parameters.put("eyear",eyear);
  22. parameters.put("emonth",emonth);
  23. parameters.put("edate",edate);
  24. }
  25. assignee = formValues.get("members");
  26. if(assignee != {} && !assignee.isEmpty())
  27. {
  28. userIds = list();
  29. for each  assgineeID in assignee
  30. {
  31. userIds.add(assgineeID.get("value"));
  32. }
  33. parameters.put("userIds",userIds.toString());
  34. }
  35. addTask = invokeurl
  36. [
  37. url :"https://connect.zoho.com/pulse/api/addTask"
  38. type :POST
  39. parameters:parameters
  40. connection:"" // Give your connection name
  41. ];
  42. if(addTask.get("addTask").get("stream").isEmpty() == false)
  43. {
  44. taskTitle = "[" + addTask.get("addTask").get("stream").get("task").get("title") + "](" + addTask.get("addTask").get("stream").get("url") + ")";
  45. taskpriority = addTask.get("addTask").get("stream").get("task").get("priority");
  46. tasksection = addTask.get("addTask").get("stream").get("task").get("section").get("name");
  47. taskboard = addTask.get("addTask").get("stream").get("partition").get("name");
  48. response = {"text":"Task added in " + taskboard + ". Take a look at the task details below.","card":{"title":"Task Details","theme":"modern-inline"},"slides":{{"type":"label","title":"Task Details: ","data":{{"Title":taskTitle},{"Priority":taskpriority},{"Section":tasksection},{"Board":taskboard}}}}};
  49. }
  50. return response;






End notes: 

Message actions in Cliq are super versatile like all other Cliq platform components. You can choose to create a message action that's specific to a message type. This example can be customized even to suit messages of the type attachments and links. So go ahead and give it a try! You can download the source code file attached with this post or access this link here: https://workdrive.zohoexternal.com/external/6OxchwzzBCF-J8HFH

Useful Links: 
Zoho Connect Rest API Guide: https://www.zoho.com/connect/api/intro.html



      Zoho Campaigns Resources


        • Desk Community Learning Series


        • Digest


        • Functions


        • Meetups


        • Kbase


        • Resources


        • Glossary


        • Desk Marketplace


        • MVP Corner


        • Word of the Day


        • Ask the Experts


          • 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

          Zoho CRM Plus Resources

            Zoho Books Resources


              Zoho Subscriptions Resources

                Zoho Projects Resources


                  Zoho Sprints Resources


                    Zoho Orchestly Resources


                      Zoho Creator Resources


                        Zoho WorkDrive Resources



                          Zoho CRM Resources

                          • CRM Community Learning Series

                            CRM Community Learning Series


                          • Tips

                            Tips

                          • Functions

                            Functions

                          • Meetups

                            Meetups

                          • Kbase

                            Kbase

                          • Resources

                            Resources

                          • Digest

                            Digest

                          • CRM Marketplace

                            CRM Marketplace

                          • MVP Corner

                            MVP Corner




                            Zoho Writer Writer

                            Get Started. Write Away!

                            Writer is a powerful online word processor, designed for collaborative work.

                              Zoho CRM コンテンツ






                                ご検討中の方

                                  • Recent Topics

                                  • GSTIN Public Search API

                                    Does zohobooks have an api using which i can search GST numbers and get their details?
                                  • Multiple locations but one parent company

                                    I am trying to configure my accounts that have multiple locations under one parent company to show separate locations in the portal.   
                                  • Using the "Like" operator in Custom Formula

                                    HI there, Can someone please explain the way to use the "LIKE" operator in an IF statement to compare strings? I have tried the following but am not getting the results I'm after. if( "CurrentStatus" like 'Rejected*','Unsuccessful','Pipeline') Thanks Matt
                                  • Choice-based Field Rules on Global Lists

                                    Hi, The new Choice-based Field Rules should also be able to work with Global Lists not just local lists. Thanks Dan
                                  • Customer Parent Account or Sub-Customer Account

                                    Some of clients as they have 50 to 300 branches, they required separate account statement with outlet name and number; which means we have to open new account for each branch individually. However, the main issue is that, when they make a payment, they
                                  • 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
                                  • How can I populate dropdown data with information from another source or app?

                                    I want to maintain a list of items in another app (say in excel or another database) and sync those as items in a drop down menu, instead of copy pasting to import. Is this kind of a feature available?
                                  • Mass Print Attachments from Selected Records in Custom Module

                                    Dear Zoho CRM Team, We’d like to request a feature enhancement regarding the handling of attachments. Use Case: We have a custom module that stores invoices uploaded by our affiliates. Currently, we need to open each record individually to print these
                                  • ABA Files payment description

                                    Hi, is there a way to automate the payment description on the ABA file creation. When you paying many vendors having to put this in each time is very time-consuming. I couldn't see if there was a way to workflow this to automate using deluge.
                                  • Is there a Waiting Room Before The Webinar Starts?

                                    It appears that there is no waiting room before a webinar starts. For example, with most webinar software you can collaborate with your co-presenter, set up your presentation and check to make sure everything sounds right before you go live. Zoho Meeting/Webinar
                                  • How to handle this process need using a Blueprint?

                                    See one minute screen recording: https://workdrive.zohoexternal.com/external/eb743d2f4cde414c715224fc557aaefeb84f12268f7f3859a7de821bcc4fbe15
                                  • GDPR Contd. - Handling Lawful Bases for Your Customers using Zoho CRM.

                                    Hello folks,   Continuing from our previous GDPR post, we bring to you the first cut of GDPR centric enhancements that are released for handling lawful bases for your customers in Zoho CRM. For your understanding we have split the entire process into three sections: Identifying Data Processing Basis Updating the Data Processing Basis in Zoho CRM  Consent Management in Zoho CRM 1. Identifying Data Processing Basis The fundamental principle to handle the personal data of your data subjects is to process
                                  • Upgrade the Lato font to the Lato 2 font

                                    While there's not a major difference, I noticed that Zoho doesn't use the upgraded Lato 2 font but it instead uses the standard one. Lato 2 enhances the look of letters and numbers when you italicize them, among little things that get tweaked. Is it possible
                                  • Validation Rule (Date)

                                    Hi There,  Can any anyone help me with the validation rule? I'm trying to fire a rule whereby the End Date cannot be before Start Date.  Any takers?  Manoj Nair
                                  • Masked Field Type with Permission-Controlled Visibility in Zoho CRM

                                    Dear Zoho CRM Team, Greetings, We would like to request a new feature that would enhance data security and access control within Zoho CRM, especially when handling sensitive internal information. Use Case: Our team occasionally needs to store sensitive
                                  • TDS Filing

                                    Is there any option for automatic 26Q and 24Q filing in Zoho books. Even Tally has this option. Why don't Zoho has this ? Is there any customisation available for this ?
                                  • How to properly setup Databridge on Linux Server?

                                    Hello guys, i am running a Linux server on which I am installing the Zoho Databridge via command line. The Zoho tutorial ( https://help.zoho.com/portal/en/kb/analytics/user-guide/import-connect-to-data/databases-and-datalakes/articles/postgresql-3-3-2021#1_How_do_I_install_Zoho_Databridge
                                  • Running Balance in Account Statement.

                                    Running balance should come by default in the accounting statements but in ZOHO we need to customize every time to get the running balance in accounting statement. I did not understand, when the bank account statement opened from Bank Menu can show the
                                  • Haven't used banking function for years and now want to reconcile and clean up my account

                                    I'm in the UK and have been using Zoho Books for my private mental health practice since 2018. Up until recently, I've entered everything manually and not reconciled any items with my bank account. Every year, I run a report for that year and use that
                                  • invalid element hsn_or_SAC

                                    Hi, I am trying to record expense in Zoho expense. when submitting I am facing this issue invalid "element hsn_or_SAC" please help me with this. Regards, Abdul Hameed M
                                  • Configuración

                                    Hola acabo de instalar Zoho CRM y quiero configurarlo correctamente. Al respecto me surgen algunas dudas tales como la diferencia entre: Cuentas, posibles Clientes y Contactos. ¿Conceptualmente que son cada uno? ¿Como se se relacionan entre ellos? Si
                                  • Plug Sample #14: Automate Invoice Queries with SalesIQ Chatbot

                                    Hi everyone! We're back with a powerful plug to make your Zobot smarter and your support faster. This time, we're solving a common friction point for finance teams by giving customers quick access to their invoices. We are going to be automating invoice
                                  • Recap - Desk Story Series

                                    In our exploration of the Wheels of Ticketing Series, we kicked things off by diving into a fundamental element of Desk Ticketing: the fields. These fields serve as the building blocks that gather essential information about tickets, customers, organisations,
                                  • Customization of Chat Transcript Emails in Zoho SalesIQ

                                    Hi Zoho SalesIQ Team, I hope you're doing well. We would like to request the ability to customize the email template that is sent to clients when they request a chat transcript from SalesIQ. Currently, when a client clicks the button to receive their
                                  • Tip of the Week #60– Reduce response time with shared inboxes!

                                    When customer messages are scattered across different platforms and team members aren't sure who's responding, delays are inevitable. Slow responses frustrate customers and create a poor experience for your brand, especially when expectations are high.
                                  • 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
                                  • Hybrid project management in IT and software development services

                                    Project management models serve a wide range of audience, however the highest takers for Agile project management methodology are the IT and software services industry. The flexibility to develop and release software iteratively with continuous improvement,
                                  • Introducing Forms in Zoho Sheet

                                    We hereby bring you the power of ​forms in Zoho Sheet. ​Now, build and create your own customized forms using Zoho Sheet. Be it compiling a questionnaire or rolling out a survey, Zoho Sheet can do it all for you. Forms is an excellent feature that helps you collect information in the simplest of ways and having it in Zoho Sheet takes it a notch higher. Build Simple yet Powerful forms Building forms using Zoho Sheet is fairly simple. The exclusive 'Form' tab lets you create one quickly. Whether you
                                  • Introducing Zoho CRM for Everyone: A reimagined UI, next-gen Ask Zia, timeline view, and more

                                    Hello Everyone, Your customers may not directly observe your processes or tools, but they can perceive the gaps, missed hand-offs, and frustration that negatively impact their experience. While it is possible to achieve a great customer experience by
                                  • How to overcome Zoho Deluge's time limit?

                                    I have built a function according to the following scheme: pages = {1,2,3,4,5,6,7,8,9,10}; for each page in pages { entriesPerPage = zoho.crm.getRecords("Accounts",page,200); for each entry in entriesPerPage { … } } Unfortunately, we have too many entries
                                  • Zoho Payroll: Product Updates - June 2025

                                    This June, we’re taking a giant step forward. One that reflects what we’ve heard from you, the businesses that power economies. For our customers using the latest version of Zoho Payroll (organizations created after Dec 12, 2024) in the United States,
                                  • Issue with Missing Scope for Creating Service Report via Zoho FSM API

                                    Hello @Latha Velu , I am currently working on creating a connection to create a Service Report in Zoho FSM using the API. However, while configuring the required scopes, I noticed that the scope ZohoFSM.modules.ServiceReports.CREATE which
                                  • What's New in Zoho Inventory | January - March 2025

                                    Hello users, We are back with exciting new enhancements in Zoho Inventory to make managing your inventory smoother than ever! Check out the latest features for the first quarter of 2025. Watch out for this space for even more updates. Email Insights for
                                  • Overdue payments pending approval max

                                    I needed to validate update the email to pay for goods sold out, travel expenses and cars and vehicles for office, office supplies, properties purchase etc
                                  • How do I mass edit time entries?

                                    Since you can not filter or sort time entries by what has and has not been invoiced (you can only see the icon but not separate invoiced from non-invoiced), I would like all time to initially be entered in as un-billable and I can change to billable as I bill them. (since you can see this separation)  So my question is HOW do I mass edit this? Can it be done?
                                  • Zoho Booking Page Footer

                                    Is there any option available to add social media, like LinkedIn, on the Zoho Booking page?
                                  • Global Sets for Multi-Select pick lists

                                    When is this feature coming to Zoho CRM? It would be very useful now we have got used to having it for the normal pick lists.
                                  • Custom SMTP is now available in Zoho Sign

                                    Hi there! Want to send Zoho Sign emails from your organization's or personal email server? Look no further! Zoho Sign has introduced custom Simple Mail Transfer Protocol (SMTP) for Enterprise users across all data centers. By enabling custom SMTP, you
                                  • Subform edits don't appear in parent record timeline?

                                    Is it possible to have subform edits (like add row/delete row) appear in the Timeline for parent records? A user can edit a record, only edit the subform, and it doesn't appear in the timeline. Is there a workaround or way that we can show when a user
                                  • Allow breakdown of per diem for meals provided

                                    Would it be possible to break the per diem down into what you get for each meal. The reason for this is we want to offer per diem but if a meal is provided by a customer or sales we need to remove this from the per diem bucket for that day. We break down
                                  • Next Page