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 

      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
          • Accelerate Github code reviews with Zoho Cliq Platform's link handlers

            Code reviews are critical, and they can get buried in conversations or lost when using multiple tools. With the Cliq Platform's link handlers, let's transform shared Github pull request links into interactive, real-time code reviews on channels. Share
          • App Spotlight : PagerDuty for Zoho Cliq

            App Spotlight brings you hand-picked apps to enhance the power of your Zoho apps and tools. Visit the Zoho Marketplace to explore all of our apps, integrations, and extensions. In today's fast-paced world, seizing every moment is essential for operational
          • 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

          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

                                  • How to Initiate WhatsApp Message on SalesIQ?

                                    I've just activated a Business WhatsApp phone number through SalesIQ because of its touted omnichannel chat approach. Sounds exciting. I understand that when a customer sends me a WA message, I can reply to it on SalesIQ and keep the chat going, perfect.
                                  • Episode IV:Handling User Inputs in custom functions

                                    Hi Everyone, We've been exploring custom functions which help in performing advanced automation tasks. Custom functions enable you to achieve possibilities based on your organization's requirements. Custom functions require user inputs that allow the
                                  • Set a lead as non-marketing if they opt out of email marketing

                                    I'm gathering Lead data via an enquiry form and wish to give them the option to opt out of marketing emails (which we send from Marketing Automation) whilst retaining the ability to send them non-marketing emails - so the email opt-out field doesn't work.
                                  • Set up multiple IMAP email addresses

                                    Hi, I just started using CRM and its great, but I just found out I can only add one imap email address for incoming mail in the included salesinbox ...this is ridiculous. All companies have different email such as sales@domain, info@domain , personal@domain
                                  • Zoho Recruit to Zoho People integration

                                    In the mapping of field from Zoho Recruit to Zoho People i am unable to map all fields What can i do
                                  • Zoho Recruit > Career Site > Customisation

                                    Hi All I have created multiple career site to represent my different organization In my Quanta Media career site > I set it with the with Quanta Malta view In my job opening : Quanta Malta view 2 job opening In my URL for quanta media https://lri.zohorecruit.eu/jobs/Quanta-Malta
                                  • Formatting Blueprint Stages (buttons)

                                    Is there a way to format Blueprint transition buttons in Creator like background colour, text colour etc.
                                  • Disable Default Value in Multi-Select field

                                    Hello, Is there a way to disable the default value feature when setting up a custom Multi-Select field? When creating tickets I would like it so there isn't a value pre-selected in the multi-select custom field that was created.
                                  • How to set custom business hours for different teams in Zoho Desk?

                                    Hi Zoho Team and Community, I’m trying to set different business hours for multiple departments in Zoho Desk. For example, our tech support team works 24/7, while our billing team is only available from 9 AM to 5 PM (Mon–Fri). Is there a way to assign
                                  • Zia Auto Tag Keyword Clusters

                                    Is there a way to remove a keyword from a keyword cluster? We're finding that Zia auto-tag is tagging things incorrectly based on some words that don't really make sense.
                                  • Centralized Domain Verification in Zoho CRM Plus

                                    Hi Team, I have a suggestion regarding Zoho CRM Plus. It's quite frustrating to verify the same domain separately for each application within the suite. It would be really helpful if you could introduce a centralized admin console—similar to what's available
                                  • HOw do I make a refund?

                                    I have a client that needs a refund. I see a refund history in the Report area... but where do I go to make a refund?
                                  • Creating a work order for dispatch

                                    We currently uses ZOHO for CRM and Intuit Field Service for creating Work orders and dispatching. This is causing double entry and is not efficient use of time.  I would like to use ZOHO for all customer related activities so can you tell me if you can :  Create a work order that we could manipulate to meet our needs.  Also if you could then dispatch that would be ideal. Thank you
                                  • "code": "500","description": "Account not exists", mail api

                                    I have been through all the steps and have a functioning Oath access_token etc etc... I then GET https://mail.zoho.com/api/organization And get my zoid then GET http://mail.zoho.com/api/organization/<hidden>/accounts and get the account details, which
                                  • Residual Formatting in Text Boxes After Undoing Pasting of Formatted Text

                                    Hi, guys! I have another problem to report. Actually, I have been aware of this for many months, possibly years, but I have been too lazy to report it to you. My apologies! Let's say you've pasted a formatted string into a text box. You change your mind
                                  • Feature Request: Stripe Terminal Integration

                                    I would like to request the addition of Stripe Terminal integration to Zoho Books, which will help process in-person payments. While Zoho Books already supports online payments through Stripe, extending this functionality to include Stripe Terminal would
                                  • 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
                                  • Improved Security in SAML/OIDC Sign-in Redirection Flow

                                    To enhance the security of our authentication system, we’ve made a change to how SAML and OIDC sign-in redirections are handled. This update resolves a potential open redirection vulnerability and adds an extra layer of protection during the sign-in process.
                                  • GA4 data

                                    Hi, I have data being pulled from GA4 into numerous tables. There are a few major errors in the source data. Eg for a period of time GA4 reported ecommerce sales that were $98 as $9,800 and $42 as $4,200. It's not happening now but my historical data
                                  • Ask the Experts: Five-hour live Q&A session with Zoho WorkDrive product experts

                                    Have questions about WorkDrive 5.0? Let’s talk! We recently launched Zoho WorkDrive 5.0, packed with powerful updates to help your team work smarter, stay secure, and get more value from your business content. From content-centric workflows and AI-powered
                                  • Allow the usage of Multi-Select fields as the primary field on "Layout Rules"

                                    We want to force our users to enter some explanation strings when a multi-select field has been utilized. I can't understand the reason for the usage restriction of Multi-Select fields as a primary field. This is a simple "Display hidden mandatory field
                                  • Lost Search Box with new UI Design

                                    I would like to suggest bringing back the Search Box in the new Zoho Project UI.  I use the search feature a lot and having to click the magnifying glass to type for a search is one extra click that we did not have with the old UI.
                                  • Adaptación de zoho books a la nueva regulación de facturación electrónica

                                    La facturación electrónica será obligatoria para todas las empresa en España en 2025, en Francia probablemente también e imagino pronto en todos los países europeos. Ya en 2024 todas las empresa grandes tienen que utilizar el sistema de facturación electrónica.
                                  • ZOHOBOOK Sales_QUOTE: To Add Discount At Each Line Item Table

                                    Hi, Our quote need to display with discount at each line item level as well. Try to edit template, >CUSTOMISE>EDIT TEMPLATE> Table, I can see template view with discount column, but when hit SAVE the template, view in PDF the discount column not shown.
                                  • How to account for vat with postponed VAT accounting

                                    Hi everyone, looking for some help with postponed VAT accounting, I use DHL express for my imports and they used to pay the VAT for me and then invoice me. I could then log this as a bill and the VAT element from import was recorded as input VAT, all
                                  • Weekly Automation Trigger for Equipment Calibration Reminder

                                    Dear Team, I’m currently working on an automation in the Equipment module. The goal is to track calibration schedules for tools — all of which require regular calibration. I’ve created an automation that sends email reminders for tools that are due for
                                  • Want to use Zoho Books in Switzerland. CHF support planned?

                                    Hi, We're a Swiss company using other Zoho suite software and I discovered Zoho Books and other accounting SaaS when looking for an accounting tool. Do you intend to cover Switzerland and CHF based accounting anytime soon? Roy
                                  • ADDDATE formula using 2 calculations

                                    Hello, I want to create an ADDDATE formula using 2 calculations, add 1 month and deduct 1 day. the formula that I need should look like this: ADDDATE(due_date, 1, "Months")+ ADDDATE(due_date, -1, "Days") Each row itself works fine, but when I'm trying
                                  • Upgrading from Zoho Invoice to Books was a major downgrade in functionality for me

                                    I have been a user for many years of a free plan on Zoho Invoice for my personal consulting business. I recent upgraded my organization to Books since some of the additional functionality looked useful to me, and played around with the free trial for
                                  • 🎉 Dynamic Org Chart for Zoho CRM Extension Published [2025]

                                    Hey Zoho CRM Community! We're thrilled to unveil our latest Zoho extension:🥁 Dynamic Org Chart for Zoho CRM 🎊 This extension is now available to transform the way your teams visualize, manage, and interact with org chart directly inside any Zoho CRM's
                                  • Detailed General Ledger has problem of exporting out to excel and missing ledger details for some accounts

                                    I have been encountering some problems generating Detailed General Ledger report with Zoho books. Firstly, I cannot export out the report of Detailed General Ledger to Excel. It will show this error message "invalid value passed for sort column", and
                                  • Upload a file to a File Upload Field through API

                                    Hello, Is there any way to upload a file to a custom file upload field in a module when doing an Update using the Record API? I've found and I am able to upload files to attachments but I don't know how to upload them to a field. I've checked the documentation at  https://www.zoho.com/crm/help/api/v2/#update-specify-records but the File Upload field type does not appear in the examples. Thanks
                                  • Kaizen #131 - Bulk Write for parent-child records using Scala SDK

                                    Hello and welcome back to this week's Kaizen! Last week, we discussed how to configure and initialize the Zoho CRM Scala SDK. This week, we will be exploring the Bulk Write API and its capabilities. Specifically, we will focus on executing bulk write
                                  • Automatic pricing feature for sales orders

                                    I am currently setting up my Zoho Inventory system and would like to implement an automatic pricing feature for sales orders. We have created a custom field called "brandline" for our items. All products with the same brandline value should have the same
                                  • Ability to access VAT returns and submit them has disappeared.

                                    I have been using Zoho books successfully to submit quarterly VAT returns. Without reason I have lost that facility. I have followed all available instructions eg going into settings, taxes, VAT etc. without success. My registration number is there and
                                  • How to automatically schedule a meeting After Blueprint Transition

                                    As part of our sales process, we require a technician to go to the customer's site and perform an installation prior to advancing to the next stage of the blueprint.  So this will require (a) scheduling a meeting for the technician to visit the customer's site and (b) a reminder phone call the day before the scheduled meeting. As I'm designing the Deal Blueprint, I see that I can automatically add a Task to the deal, but I can't add a Meeting or a Call. What am I missing?  There seem to be 3 types
                                  • Zoho Recruit > Workflow

                                    I have created a workflow for my application module Whenever a record is created The condition , application status is 1st call invitation I have set this OI do not receive the email that was suppose to be send out
                                  • [Webinar] Zoho Writer for SCM and logistics

                                    Creating, sharing, and distributing complex documents are constant challenges in the SCM and logistics industry. That's why our next webinar is focused on how to simplify these document workflows. Join us on Jul 10, 2025 for a Zoho Writer webinar designed
                                  • 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.   
                                  • Stock Count History in Product Details – Zoho Inventory

                                    Hello Zoho Team, When I perform a Stock Count for a product in Zoho Inventory, I would like to view the history of those stock counts later — especially from the product details page. Currently, I can perform the count and update the quantity, but I’m
                                  • Next Page