Message actions are user actions or interactions performed on a message. Usually, when a message is sent or received, a user is likely to perform some task after the message has been sent/received. All chat interfaces come with a default set of message actions such as Reply, Forward, Delete, Share and so on. But what if these options do not satisfy your requirements?
Cliq solves this shortcoming by providing an option to create custom message actions!
Let us consider a situation where the #design channel is rife with discussions on a particular design. Now once the decision is made, it is important to add the new template design to the Zoho Docs folder the team maintains. Or if the team wants to add this design to their list of tasks in Trello, they can go ahead and create a message action for that too! This requirement can be satisfied by creating two custom message actions - Upload to Zoho Docs and Create a card in Trello.
This scenario is just a simple example of how message actions can be utilized. Similarly, custom message actions open up abundant possibilities for each type of message ( text, attachment, URL)
Sample Scenario
The sample scenario here focuses on how to upload messages of the type (attachments) to Zoho Docs!
Breaking down the Zoho Docs Message Action Workflow -
- A user selects the 'Upload to Zoho Docs' option for an attachment.
- The Zoho docs action handler is triggered
- The link between Cliq and Zoho Docs is established using 'Connections'
- The file is uploaded successfully.
Prerequisites
- Learn how to create a message action and the attributes passed when a message action handler is triggered in our help page.
- Creating a connection with Zoho Docs is mandatory for this message action to work. Take a look at how to create a connection.
- Before getting started, make sure to go through the Zoho Docs APIs to get a better understanding of the mandatory headers and the parameters.
Take a look at the code snippet given below!
- // Upload your file to Zoho Docs
- output = Map();
- docsparams = Map();
- att = attachments.get(0);
- docsparams.put("stringPart","true");
- docsparams.put("paramName","filename");
- docsparams.put("content","" + att);
- fileslist = List();
- fileslist.add(docsparams);
- att.setParamName("content");
- fileslist.add(att);
- response1 = invokeurl
- [
- url :"https://apidocs.zoho.com/files/v1/upload"
- type :POST
- files:fileslist
- connection:"insert_your_connection_link_name"
- ];
- info response1;
- output.put("text","Uploaded to your ZOHO Docs! (y)");
- return output;
The gif shown below illustrates how easy it is to upload a file to your Zoho Docs with a message action.
It is indeed this easy to create integrations in Cliq using Cliq's platform! Why wait then? Get started with creating message actions. Please leave your comments and suggestions for us in the section below.
Best,
Manasa
Cliq