Most often we find ourselves in a quintessential position where we're looking for a file or a folder packed away in a corner! Think about situations where your Manager and your Mentor ask you to share two different files? Oh! how easy will it be when you get the list of files you've stored in your online cloud storage. Now, think of a way where you can get and share these files directly from your chat window. Oh yes! You read that right.
The /zdocs command gives you the list of folders you've created in your Zoho Docs Account. Select the folder you need and done! The files which are not saved in any folder will be added in the default folder. The command is executed to give you a list of files in that folder, with a share button. Select the file you wish and share and click share.
/zdocs Command Workflow
Invoke URL : Invoke operations from Cliq to Zoho Docs by using the Invoke URL task. Plays an integral part throughout the command list suggestion and execution. ( Learn More )
Command Suggestion Handler : The handler is triggered to show a list of folders from your Zoho Docs account as and when you type the folder name .
Click to Execute : Enabling the click to execute option triggers the command execution when you choose a folder from the list.
Command Execution : Click to Execute option, prompts this handler to post the list of files in that particular folder.
Button Function : Clicking on the 'Share' button next to a file, shares the file with the users in a chat!
Now that we're familiar with the workflow, let's have a look at each fragment. Our slide deck conveys briefs the whole post to you in just 2 minutes!
Invoke URL
A connection with Zoho Docs is necessary to invoke operations from Cliq. We use the invoke URL function code generated by creating a connection. For step by step details on creating a connection and the invoke URL task, refer our help guide on Connections .
Sample Invoke URL task
Substitute the Get Folders API from Zoho Docs, mention the HTTP Method, and connection name to use it in the command suggestion handler.
Similarly, this invoke URL task is used in the command execution handler and the function execution code.
Command Suggestion Handler
This handler is responsible for listing out the folders as suggestions. Take a look at the code snippet below!
Command Execution Handler
The command is executed to display a list of files present under the selected folder. Enabling the Click to Execute option directly triggers command execution.
Function Execution Code
Our aim for the button function here is to share the file when the user clicks the 'Share' button!
The command execution and function execution codes are attached below. Download them and let us know how this command helped you.
Oh and also, check this post on how Zoho Creator and Cliq come together to make the /poll command work!
Links to Refer:
Help guide: Commands Suggestions
Zoho Docs APIs: Zoho Docs API List
Suggestions and discussions are welcome!
Best,
Writer is a powerful online word processor, designed for collaborative work.