How can I capture the Cliq channel name from Deluge Script?
I am working on a chat automation with a third party tool called Make.com. Using a webhook I am relaying information from the Bot I have created in Zoho Cliq to Make.com Webhook.
I am using the Mention Handler of the bot in Cliq to relay information like firstName, lastName, userID, esrEmail, chatID but I am not able to get the deluge script to get me the channel name. I am hoping if someone can help me figure out the identifier that I can use to capture channel name.
For reference here is my Deluge code for mention handler:
- // Get the user's message
- user_message = message;
- // Create the payload with the actual message and user info
- make_payload = Map();
- make_payload.put("userMessage",user_message);
- // Add user information - these ARE available in the Mention Handler
- make_payload.put("userFirstName",user.get("first_name"));
- make_payload.put("userLastName",user.get("last_name"));
- make_payload.put("userId",user.get("id"));
- // This is the ZUID you need for Reply To
- make_payload.put("userEmail",user.get("email"));
- // Add chat context information
- make_payload.put("chatId",chat.get("id"));
- make_payload.put("chatName",chat.get("name"));
- // Add message ID for reply feature
- if(!message_details.isNull())
- {
- make_payload.put("messageId",message_details.get("message").get("id"));
- }
- // Make.com webhook URL
- make_webhook_url = "(Webhook URL)";
- // Send the data to Make.com
- webhook_response = invokeurl
- [
- url :make_webhook_url
- type :POST
- parameters:make_payload.toString()
- content-type:"application/json"
- ];
- // Optional - provide feedback that the bot received the message
- response = Map();
- return response;