Cliq Bots - Post message to a bot using the command line!

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 to send a message to your bot and broadcast it to all your bot subscribers through a simple command. 

We'll be looking at how to post a message to the bot using cURL, Wget and PowerShell. The steps are pretty straight forward. You'll need the following:
  1. Create a bot
  2. Generate a webhook token
  3. Form your message as a JSON
  4. Post your message to the bot's messaging endpoint
  5. And done
Get started by creating a bot 
 
Get started with creating your bot, if you haven't already! You can refer our help page on bot creation. Once you've created the bot, take note of the bot's endpoint URL in the bot preview page. You can find the bot preview page by following the below steps:
  1. Click on Settings and choose Integrations.
  2. Select Bots in the Integrations page. 
  3. Select which ever bot you would like to send a message to and click on the bot's name. The bot's preview page is displayed. 
The example here is for the Zylker Help Bot. The bot's API End Point URL is https://cliq.zoho.com/api/v2/bots/cliqhelpbot/message



Webhook tokens

Webhook tokens are unique authentication keys specific to a user. These tokens can be used to connect with third party applications through webhooks, in order to post messages to a channel or chat.
      To use the Messaging API you'll need Cliq's webhook tokens.These tokens will provide you with authentication to access the message APIs. Follow the given steps to generate your own webhook:
  1. In Cliq, click on your profile in the top right corner and choose -> Bots & tools 
  2. Now, in the integrations page click on Webhook tokens at the bottom left
  3. Click on the button Generate new token to generate your webhook token

To know more about webhooks click on the following link:

Structure your message as a JSON

We have an easy way to build cool message card templates. The message structure shown below is built using our Message Builder. Here, we're trying to notify all the bot's subscribers. This can be done using the broadcast parameter. When broadcast is true, message is posted to all subscribers of the bot! More details about this parameter and the other parameters are explained in our How to post message to a bot section. 
  1. {

  2. "text": "This seems to be the easiest way to post a message to a bot! ",
  3. // The broadcast param is used to send message to all the bot subscribers. 
  4. "broadcast" :"true",

  5. "card": {

  6. "title": "Hi Guys!",

  7. "thumbnail": "https://media.giphy.com/media/3o6ZtpxSZbQRRnwCKQ/giphy.gif",

  8. "theme": "prompt"

  9. }

  10. }

And finally, posting the message! 

We'll be sending the message through a standard POST request. 

Take a look at how to make the request via curl :
  1. curl -X POST -H "Content-type:application/json"https://cliq.zoho.com/api/v2/bots/zylkerhelpbot/message?zapikey=1001.2798931fdf4905dc5d37806b47d8253a.2d73063dae2ccf4a04810ddxxxxxxxxxx-d '{
  2. "text": "This seems to be the easiest way to post a message to a bot! ",
  3. "broadcast" :"true",
  4. "card": {
  5. "title": "Hi Guys!",
  6. "thumbnail": "https://media.giphy.com/media/3o6ZtpxSZbQRRnwCKQ/giphy.gif",
  7. "theme": "prompt"
  8. }
  9. }'

Similarly, the same request using Wget :
  1. wget --post-data="{
  2. 'text': 'This seems to be the easiest way to post a message to a bot!',
  3. 'broadcast' :'true',
  4. 'card': {
  5. 'title': 'Hi Guys!',
  6. 'thumbnail': 'https://media.giphy.com/media/3o6ZtpxSZbQRRnwCKQ/giphy.gif',
  7. 'theme': 'prompt'
  8. }
  9. }" --header="Content-type:application/json" https://cliq.zoho.com/api/v2/bots/zylkerhelpbot/message?zapikey=1001.2798931fdf4905dc5d37806b47d8253a.2d73063dae2ccf4a04810ddxxxxxxxxx

Finally, PowerShell for all you Windows people out there!
  1. Invoke-RestMethod -Uri https://cliq.zoho.com/api/v2/bots/zylkerhelpbot/message?zapikey=1001.2798931fdf4905dc5d37806b47d8253a.2d73063dae2ccf4a04810ddxxxxxxxxxx -Method Post -ContentType 'application/json' -Body '{
  2. "text": "This seems to be the easiest way to post a message to a bot! ",
  3. "broadcast" :"true",
  4. "card": {
  5. "title": "Hi Guys!",
  6. "thumbnail": "https://media.giphy.com/media/3o6ZtpxSZbQRRnwCKQ/giphy.gif",
  7. "theme": "prompt"
  8. }
  9. }'
The message posted will look like the message card shown in the image below. 




How about trying these right away? All you've to do is replace the webhook token with yours and give your bot's unique name in the script. Get started now and tell the world how easy it indeed is! Comments and suggestions are welcome.

Best,
Manasa
Cliq 
    • Sticky Posts

    • 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
    • Automate a CRM workflow with Zoho Cliq

      Imagine having a virtual assistant that provides rapid updates to your team through Zoho Cliq, helping you stay on top of your sales processes. After returning from a client meeting filled with updates and action items, managing this information together
    • Automating leave alerts in Zoho Cliq

      The constant ebb and flow of employee absences can disrupt projects and hinder productivity. With Zoho Cliq's leave alert automation, you can easily keep your team informed. Real-time notifications can be sent to team chats, ensuring that everyone stays
    • 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
    • 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
    • Recent Topics

    • Google Maps API integration into Forms

      I looked around a good bit and could  not find anything on this topic. I was curious about using the Google Maps API on a Zoho Form. Specifically an order form for a product that we will only deliver within certain City Limits. We currently use the API to call the exact address (as dictated by Google) and if the City name does not match where we service it is very evident. (Using FormCraft Form in Word Press) The "exact address" name is also used later in the process as well.  I do not see a way
    • WorkDrive TrueSync taking up local storage

      I've recently started using workdrive TS because my Local storage is really limited, and the virtual drive seemed like a really good solution to that, but after the sync process my Local drive is full, did I do something wrong? Really need to work online
    • Solicitud de asistencia para migración de Unidades Compartidas de Google Drive a Zoho WorkDrive

      Estimado equipo de soporte de Zoho, Nos gustaría solicitar asistencia para realizar la migración de nuestras "Unidades Compartidas" de Google Drive a Zoho WorkDrive. Actualmente, tenemos varias unidades compartidas en Google Drive que necesitamos transferir
    • Zoho marketing hub integration with WordPress WooCommerce

      Hello All,  I am a Zoho One User and we are using Zoho Marketing Hub we also have a website on Wordpress and we use Woo Commerce as our store.  im looking to find out if Zoho Marketing Hub Integrates with WooCommerce   ideally we would like to create Journeys or campaigns series based on customer behavior such as buying or already have purchased specific products. or if they go to the store but don't buy (abandon cart follow)  i saw that there is a wordpress plugin for Zoho Campaigns https://wordpress.org/plugins/zoho-campaigns/ but
    • Disable Subform Actions using Client Script Add Row, Edit, Delete

      Currently we cannot disable subform actions such as Add Row, edit row using client script It will be really beneficial if we can disable these actions from Client Script
    • Offline for Maintenance Option

      Making changes to a live application can cause problems. I'm suggesting a new application settings option to temporary disable all access to an app so the admin or developer can make changes without any user interference. Additionally, while the app is offline, there should be some ability to present the users with a customized notification page (perhaps a view within the app itself). For example, "This application is undergoing maintenance and will be back online Sunday at 5 PM. Please email smith@net.com
    • Join Zoho Meeting only via Web browser and not with Zoho Meeting App

      Dear Zoho team, according to the documentation [1], Zoho Meeting only offers web view for Chrome and Firefox on a desktop. For other browsers and devices, participants can only join a Zoho Meaning with the Zoho Meeting App installed. This is a big hurdle
    • Recurring Events Not Appearing in "My Events" and therefore not syncing with Google Apps

      We use the Google Sync functionality for our events, and it appears to have been working fine except: I've created a set of recurring events that I noticed were missing from my Google Apps calendar. Upon further research, it appears this is occurring
    • web page becomes flickering after being made into WebTab

      I create a webtab in Zoho CRM like this it uses this URL below: https://blueraycargo.id/kalkulator-berat-volume/ as you can see, if you open the bare URL then it will have no problem, but after it becomes a WebTab then it is flickering constatly. what
    • Kaizen #182 - Queries in Canvas List View

      Hello everyone! Welcome to another week of Kaizen! We're back with another post in this series on Queries in Canvas List View. Queries in Zoho CRM allow you to dynamically retrieve data from CRM as well as third-party services directly within the CRM
    • Facing issue when sent mail using zeptomail SMTP - Hard bounces || webscreenscraping.com

      Hi Support, User ID: 706899850 We are facing an error when send and email using Zeptomail SMTP especially from sales@webscreenscraping.com to sales@xbyte.io Reason: policy-related Message: 5.2.3 MailPolicy violation Error delivering to mailboxes Remote-MTA:
    • Dynamic Date Filtering for KPI Widgets – Need Help with Query Table

      Hello, I'm seeking help with setting up dynamic date filtering for my KPI widgets in Zoho Analytics. Below is an overview of my setup and the issues I'm facing: Why: I need my KPI widgets to update dynamically based on a date range selected via a dashboard
    • ZOHO DESK ヘルプセンターの言語選択メニューの表示方法

      ZOHO DESK のヘルプセンターを構築し、多言語化設定をしました。 顧客のヘルプセンター画面右上に言語選択メニューが表示されないため、弊社の契約先会社に問い合わせましたが、「通常は多言語化をオンにすると表示するためCSS を触り過ぎではないか」 という指摘のみでした。 試行中ですが表示できません。 何か要因となる情報をお持ちの方がいましたらご教授いただけますと幸いです。 ↓の赤枠を表示したいのですが、表示できません。
    • Zoho Sign up forms on Wordpress website not working smoothly

      We have set up the forms on the website and linked them to respective email journeys. But when wesubmit the form the email generated/sent to user is not consistent. Sometimes the journey email is sent, sometimes a email verification message is sent ,
    • Windows Security Alert

      Hi, I'm using Zoho Assist with feature remote support session. I'm inviting a end user to a remote support session. When a user connects to a Zoho Assist remote support session we’re seeing Windows Security Alert pop up requesting changes to the firewall.
    • field is not saving on lead

      Hi, Not sure what i changed but on edit in a lead, i am inputting details and its not saving. just highlights it in yellow with no error message.
    • Creating Layout Rule With Formula Field

      By The Grace Of G-D. Hi, I see that i cannot use Layout Rules to show/hide Formula Fields. Is that something you plan on adding sometime soon?
    • Activity or History Log User Login

      Hi Everyone, I have Zoho Customer Portal, which has pages and reports. Is it possible to create 1 field such as true/false to find out users who have opened the customer portal? Like a kind of user activity log. Thank you so much.
    • TeamInbox Rules Not Working

      I have set up very basic rules, both at a team and personal level, but nothing works. E.G. Trigger: Inbound Message From: [sender email address] Has Attachments Apply Tag: [tag selected] The above ruleset is very broad and should automatically tag all
    • New Customization options in the module builder: Quick Create and Detail view

      Hello everyone, We have introduced two new components to the module builder: Quick create and Detail view. The Quick Create Component It is a mini form used to create a record and associate it to the parent record from a lookup field. For example, if you have a Deals lookup in the Contacts module, then you can associate existing deals or create a deal and associate it with the contact. You can customize this Quick Create form by adding standard as well as custom fields. There is no limit to the number
    • Set Approval for particular Reporting managers in zoho creator

      i am creating a leave management system in zoho creator.I want to create a approval workflow.There are various employees each employee has different reporting manager when employee apply for a leave then the leave should be able to approved by the manager
    • Function to check frequency of customer ordering patterns

      Hi, I'm no coder, so I thought I could make use of Chat GPT to generate some Deluge script to create a function that would check order frequency of our customers so that I could send an email if they go beyond their usual order pattern. Chat GPT and Claude
    • Possibly a stupid question: When I sync from Zoho CRM to Campaign, should I see those contacts in the Contacts list on Campaign?

      I have just initiated and completed a sync of my existing Zoho CRM contacts over to Zoho Campaign. It seems to have completed and synced around 500 contacts. However, those contacts do not appear in the All Contacts list (or any other list that I can
    • Pin multiple columns and adjust column widths in CRM subforms

      Hello all, Subforms act as secondary forms or tables in which you can associate multiple line items to a primary record and thereby ensure more structured and comprehensive data organization. We've made some recent enhancements to subforms. Here's what's
    • IN BIGIN MOBILE APP ZOHO INVOICE IS NOT VISIBLE

      I HAVE INTEGRATED ZOHO BIGIN WITH ZOHO INVOICE IN WEB IT IS WORKING VERY FINE WITH ZOHO INVOICE VISIBLE , HOWEVER IN MOBILE APP ZOHO INVOICE IS NOT VISIBLE IN THE TABS , IT IS VERY DIFFICULT TO CHECK THE PIPELINE WITHOUT THE INVOICE , I HAVE TO DOWNLOAD
    • Conexão de Meta Ads - A busca pelo Cálculo do ROI

      A empresa onde trabalho está em busca de calcular melhor o retorno sobre o investimento de das suas campanhas do Meta Ads. A zoho junto com a Google fez um excelente trabalho e disponibilizou o cálculo desse retorno de forma maestral com o dashboard abaixo.
    • Update Client Record based on creation of custom module record

      Hi! Hoping for someone's help with this one. I have a custom module called 'Agreement History. Whenever a deal is won, it creates a new record in this module with associated 'Products' and 'Clients' to track rental history and contracts. What I'm trying
    • Automatic bundling with sales orders

      What I do is I make products to order. Some of my products share same part. So sometimes one product sells better then the other one. When I create a bundle now I might sell out one product but then I cannot make it anymore because I already use the part
    • Flow based on New Deal - layout field problems

      Hi. I've built a Flow to create a Deal-specific folder within WorkDrive. It works except for referencing the Deal's layout. In my Zoho CRM, there are two types of Deals (separated by layout). For my Flow: Trigger on New Deal Then, I call 'Fetch module
    • How to associate a document sent in Zoho Sign with an deal in the CRM?

      Hi, often documents are loaded in Zoho sign and sent for signature. These sometimes are linked to a deal in the Zoho CRM and would be nice to see the status of the document within the CRM. I am aware of the integration, but that assumes that the document
    • How to install Widget in inventory module

      Hi, I am trying to install a app into Sales Order Module related list, however there is no button allow me to do that. May I ask how to install widget to inventory module related list?
    • Zoho Sheet view has two way sync or one way? Sheet view to CRM and what about CRM to Sheet view?

      I created a zoho sheet view. I can make changes and these changes are saved back to CRM. I have copied the link of this zoho sheet view for future easy access. Now I go to CRM, and update a single record in CRM. Now if I use the zoho sheet view link that
    • Enable Filtering by Notes in Accounts & Other Modules

      I noticed that we have the option to filter by notes in the Contacts module, which is great. However, in our company, we add notes specific to an Account, and currently, there's no option to filter Accounts with notes. Can this be enabled? It would also
    • Whats App Automation

      It would be nice to be able to send out an automated whats app message template on moving stages or creation of a ticket (same as you can do for automated emails). Currently only automated emails can be sent. Also, if whats app could be used more effectively
    • A fresh interface and functionality improvements for Zoho CRM's data sharing settings

      Data sharing is essential for maintaining proper access controls in your CRM. Whether you're setting default permissions or defining custom sharing rules, these settings determine how records are shared among users, roles, and groups. Previously, navigating
    • Capture GPS location field

      When using a mobile phone to complete the form, I need to capture the GPS location. When this field going to be available? Same question for taking pictures with mobile phone and capturing that picture automatically. Thanks
    • I can't auto-scheduling calls down - the code does not change anything

      Hi, I was trying to set a function that auto-schedules calls based on their call result; i.e "Requested more info". I had also included a reminder to send an email in the code. I logged a test call and nothing changed. Is there anything wrong with the
    • How can I ensure that emails sent and received in my Policy module also appear in the associated Account module under "Emails" ?

      I'm working with ZOHO CRM and I have separate Policy and Account modules. Currently, when I send or receive emails related to a policy, they are stored within the Policy module. However, I want these emails to also appear in the corresponding Account
    • How can I create a deal with multiple payment milestones in Zoho CRM?

      Hi. We are a services based company and most of our deals involve monthly invoicing for T&M work or payment milestones for fixed price projects. How can I create a Deal in CRM that shows monthly (or multiple) payment milestones, rather than just the total
    • CRM

      I have a portal set up where a contact can see other contacts within an account automatically. When a contact in the portal enters a deal, how do I make sure that deal is assigned to the account so other contacts in the account can see the deal was generated?
    • Next Page