Get your emails from Zoho Mail delivered in Cliq

Get your emails from Zoho Mail delivered in Cliq

With a major part of communication happening over emails, it becomes quite a task to keep up with a large amount of email threads. But when a huge portion of your everyday conversation happens in a messaging platform like Zoho Cliq, why not bring in important email notifications into your chats as well? 
This forum post will walk you through on connecting your Zoho Mail with Cliq so you can get your emails straight away through your chats. 

First, let's see how bringing in an email from Zoho Mail to Cliq can be useful. 


Scenarios:

  • The support team in every organization receives a substantial amount of emails on a daily basis. There are chances that a high priority email might slip through. So, to overcome this you can create a filter and funnel the high priority email to your team's support channel in Cliq or have a dedicated support bot that will bring in your highly important email.
  • Similarly, you can keep a track of all the payments made by your customers and also track down specific emails from your partners and vendors directly from Cliq chat.

Steps:

Follow the simple steps given below to bring in your emails from Zoho Mail to Cliq and centralize them.

1. Log in to your Zoho Mail and click on the settings icon, which is located at the top of the right hand panel. 



2. The second step involves creating a new incoming filter.
  • Go to the filters card and click on create a new filter.
  • Give your filter a name - (this is the name the filter will be identifed with).
  • Condition Type - Specifies the combination of various conditions that needs to be checked for (OR, AND and All Incoming emails)
  • Conditions - The parameters that needs to be satisfied by the emails
  • Actions- Actions that will be performed on the emails that match the conditions
  1. In the actions, select Custom function(creator) from the drop down.



  2. Select Function to view the deluge script editor pop up.
  3. Go to the DRE Connectors tab and in My Connections, click on the Create Connection button.
  4. Select the Zoho OAuth service and enter your preferred connection and connection link name.
  5. For scopes, select the checkboxes for ZohoCliq.Webhooks.CREATE and ZohoMail.messages.READ .
  6. Now go back to the custom functions tab and paste the following code in the scipt editor :

  1. messageDetails = zoho.mail.getMessage(mail_messageId,"CONNECTION LINK NAME");
  2. mailContent = messageDetails.get("CONTENT").replaceAll("<br />","\n").replaceAll("<.*?>","").trim();
  3. if(mailContent.trim().length() == 0)

  4. {

  5. mailContent = "-";

  6. }

  7. mailSubject = messageDetails.get("SUBJECT");

  8. if(mailSubject.isNull())

  9. {

  10. mailSubject = "-";

  11. }

  12. fromAddress = messageDetails.get("FROM");

  13. senderName = messageDetails.get("SENDER");

  14. messageContent = {"text":"### " + mailSubject + "\n\n*Details*\nFrom: " + senderName + "\nEmail: " + fromAddress + "\nContent: " + mailContent,"card":{"theme":"7"},"bot":{"name":"Mail Notifier"}};

  15. zoho.cliq.postToChannel("CHANNEL UNIQUE NAME",messageContent,"CONNECTION LINK NAME");


(NOTE : Replace "CONNECTION LINK NAME" with the name of the connection link that you have created, and "CHANNEL UNIQUE NAME" with the unique name of the channel in which you want the mail posted as a chat).
3. Give your custom function a name and click on the Save button to save it.
You can also check if the function works by selecting the Test Run button to execute the code. You will be prompted to enter a message ID for the check which can be retrieved from the URL. Open any mail you want to test it on and copy the last digits in the URL, paste it in the message ID text box and proceed.

 Sample Response 




Note: In case you want to post a response to a bot use the following syntax: 
https://cliq.zoho.com/api/v2/bots/{BOT_UNIQUE_NAME}/message
Also you can post the response in a channel (organizational, personal, team or external) using the following syntax:

Retrieving a channel's unique name :

You can retrieve the unique name of a channel by the follwing steps :
    1. Hover over to the channel in the left hand side panel and select more info.
    2. Click on the connectors tab 
    3. The API Endpoint URL contains the channel's unique name in block letters.




There you go! We hope this brief example helped you understand in bringing an email from Zoho Mail to Zoho Cliq. 
In case of any queries please comment below. We'd be happy to assist you.
 
Regards
Divya P
Zoho Cliq
 






    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation
                                              • Sticky Posts

                                              • 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
                                              • Cliq Bots - Post message to a bot using the command line!

                                                If you had read our post on how to post a message to a channel in a simple one-line command, then this sure is a piece of cake for you guys! For those of you, who are reading this for the first time, don't worry! Just read on. This post is all about how
                                              • 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
                                              • Cliq Bots - Get notifications about any action on an application with the incoming webhook handler!

                                                Webhooks can be used to get notified about events happening in other applications inside Cliq. All bots in Cliq have their own incoming webhook endpoint. This makes it simple to post messages to the bot from external applications. Unlike the send message
                                              • The Slash Command Series - Types of Command Suggestions

                                                Hi Everybody! I hope you guys tried the /zdocs command and now have an idea of how command suggestions with click to execute work. If you have no clue of what command suggestion is, I recommend you to take a look at all the Slash Command Series posts, especially the one on Command Suggestions ! This post is all about the different types of command suggestions.  Customise your command suggestions  Did you know you could customise your command suggestion list with a title, description, image? Well,


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now