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 PR links in any reviewer groups or channels to get approval or receive review comments instantly.
Pre-requisites:
Before beginning to script the code below, we must create a connection with Github. Once a connection is created and connected, you can use it in Deluge integration tasks and invoke URL scripts to access data from the required service.
Create a Github default connection with any unique name ( “githubforcliq” for this example) and the scopes - repo.
Refer to the below links to learn more:
Step 1: Create an extension and add a link handler
- After successfully logging into Cliq, hover over the top right corner and click on your profile. Then navigate to Bots & Tools > My Extensions.
- On the right side, click the Create Extension button.
- To learn more about extensions and their purposes, refer to the Introduction to Extensions.
- Create an extension using your preferred name. Please specify the following details: the extension name, a description (to help users understand the extension's purpose), and an image to identify it.
- Under the link handlers section, enter github.com to configure the extension to preview links for that domain.
- Bundle the newly created form function - addCommentPullRequest, as it is mandatory to include at least one component to an extension, and then click Create.
Step 2: Configuring the preview handler
- After creating an extension, a popup will appear that provides an overview, which includes information about the extension. It will also list the connectors, showing the components bundled with the extension and their associated app keys.
- Additionally, handlers will allow you to configure access, customize settings, and manage links within the extension.
- Navigate to handlers, scroll down, and under link handlers, hover over to preview handler.
- The Preview Handler expands a rich response when a URL is shared in a conversation. Click edit code and copy and paste the script below.
Script
- pullRequest_url = url;
- owner = pullRequest_url.getSuffix(".com/").getPrefix("/");
- pullRequest_ID = pullRequest_url.substring(pullRequest_url.lastIndexOf("/pull/") + 6);
- repositoryName = pullRequest_url.substring(pullRequest_url.indexOf("github.com/") + 11,pullRequest_url.lastIndexOf("/pull/"));
- // Fetch PR details from GitHub API
- getPRDetails = invokeurl
- [
- url :"https://api.github.com/repos/" + repositoryName + "/pulls/" + pullRequest_ID
- type :GET
- connection:"githubforcliq"
- ];
- // Parse API response
- pr_title = getPRDetails.get("title");
- pr_author = getPRDetails.get("user").get("login");
- changed_files = getPRDetails.get("changed_files");
- arguments = Map();
- arguments.put("pullRequest_ID",pullRequest_ID);
- arguments.put("repositoryName",repositoryName);
- arguments.put("owner",owner);
- arguments.put("pr_title",pr_title);
- arguments.put("pr_author",pr_author);
- arguments.put("changed_files",changed_files);
- // Build preview response
- response = {"title":"Pull Request -" + pr_title,"type":"link","provider_url":pullRequest_url,"faviconlink":"https://zoho.com/sites/default/files/cliq/images/githubmark.png","thumbnail_url":"https://zoho.com/sites/default/files/cliq/images/githubmark.png","fields":{"data":{{"label":"Author","value":pr_author},{"label":"Files Changed","value":changed_files}}},"actions":{{"hint":"Approve a pull request instantly","style":"+","label":"Approve","type":"button","params":arguments},{"hint":"Add review comments to the pull request","label":"Add a comment","type":"button","params":arguments}}};
- return response;
Step 3: Configuring the action handler
- We have refined the response of the pull request URL when it is shared in a Cliq conversation. Now, we need to define the actions to be performed when the buttons in the unfurled response are clicked.
- This can be configured in the action handler. To locate it, navigate to the extension handlers. Scroll down to find the link handlers section, then hover over to the action handler.
- The action handler executes actions when the buttons in the unfurled card are clicked. Click "Edit Code" and copy and paste the script below.
Script
- label = target.get("label");
- pullRequest_ID = target.get("params").get("pullRequest_ID");
- repositoryName = target.get("params").get("repositoryName");
- owner = target.get("params").get("owner");
- response = Map();
- if(label.equals("Approve"))
- {
- params = Map();
- params.put("event","APPROVE");
- headers = Map();
- headers.put("Content-Type","application/json");
- approvePullRequest = invokeurl
- [
- url :"https://api.github.com/repos/" + owner + "/" + repositoryName.getSuffix("/") + "/pulls/" + pullRequest_ID + "/reviews"
- type :POST
- parameters:params + ""
- headers:headers
- detailed:true
- connection:"githubforcliq"
- ];
- info approvePullRequest;
- responseCode = approvePullRequest.get("responseCode");
- if(responseCode == 200)
- {
- pull_request_url = approvePullRequest.get("responseText").get("pull_request_url");
- pr_title = target.get("params").get("pr_title");
- pr_author = target.get("params").get("pr_author");
- changed_files = target.get("params").get("changed_files");
- response = {"card":{"title":"✅ Pull Request Approved","theme":"modern-inline"},"buttons":{{"label":"View Pull Request","hint":"","type":"+","action":{"type":"open.url","data":{"web":pull_request_url}}}},"text":"*Pull Request* :" + pr_title + "\n*Author* : " + pr_author + "\n*Files changed*:" + changed_files};
- return response;
- }
- else
- {
- banner = {"text":"Pull request approval failed!","status":"failure","type":"banner"};
- return banner;
- }
- }
- else
- {
- return {"type":"form","title":"Add Review Comment","name":"addComment","button_label":"Add","inputs":{{"label":"Review Comment","name":"comment","placeholder":"Leave a note for the author or your team","min_length":"0","max_length":"500","mandatory":true,"type":"textarea"},{"name":"pullRequest_ID","value":pullRequest_ID,"type":"hidden"},{"name":"repositoryName","value":repositoryName,"type":"hidden"},{"name":"owner","value":owner,"type":"hidden"}},"action":{"type":"invoke.function","name":"addCommentPullRequest"}};
- }
- return Map();
Step 4: Handling the form submit handler to add comments to a pull request
- When clicking the "Add a comment" button, a form will be triggered to allow users to add comments in the specified multi-line input text field. This form should be submitted using the form functions in Cliq.
- To create this function, navigate to Bots & Tools > Functions. On the right side, click "Create Function" and name the function "addCommentPullRequest." Choose the Function Type as "Form."
- After that, click "Save & Edit Code" and paste the script provided below.
Script : addCommentPullRequest - Form Submit Handler
- response = Map();
- formValues = form.get("values");
- pullRequest_ID = formValues.get("pullRequest_ID");
- repositoryName = formValues.get("repositoryName");
- owner = formValues.get("owner");
- comment = formValues.get("comment");
- params = Map();
- params.put("body",comment);
- params.put("event","COMMENT");
- headers = Map();
- headers.put("Content-Type","application/json");
- addComment = invokeurl
- [
- url :"https://api.github.com/repos/" + owner + "/" + repositoryName.getSuffix("/") + "/pulls/" + pullRequest_ID + "/reviews"
- type :POST
- parameters:params + ""
- headers:headers
- detailed:true
- connection:"githubforcliq"
- ];
- info addComment;
- responseCode = addComment.get("responseCode");
- if(responseCode == 200)
- {
- banner = {"text":"Comment added to the pull request","status":"success","type":"banner"};
- return banner;
- }
- else
- {
- banner = {"text":"Unable to add review comments!","status":"failure","type":"banner"};
- return banner;
- }
- return Map();
Note :
You need to configure the app link to get a rich, unfurled response for the GitHub PR links posted in any chat. Refer to the link below to configure the unfurl link in Zoho Cliq.
🔄 Workflow explanation
With this custom solution, GitHub Pull Requests can be shared instantly in any chat, group, or channel to get them reviewed by designated reviewers or top collaborators of the repository.
💼 Business benefits
- Faster review cycles – Reduces turnaround time by bringing PRs directly into team conversations.
- Improved code quality – Promotes timely feedback from key collaborators and senior reviewers.
- Increased developer visibility – Ensures pull requests don’t go unnoticed or remain idle.
- Streamlined collaboration – Centralizes communication around code changes, reducing context-switching.
No more gaps between the coding lifecycle and collaboration. Implementing rich previews for GitHub pull requests speeds up the development process, leading to better visibility, quicker feedback, and more substantial code ownership.
We're here to help, so don't hesitate to reach out to support@zohocliq.com with any questions or if you need assistance in crafting even more tailored workflows.
Recent Topics
Making digital signatures accessible to all: Introducing accessibility controls in Zoho Sign
Hi there! At Zoho Sign, we are committed to building an inclusive digital experience for all our users. As part of our ongoing efforts to align with Web Content Accessibility Guidelines (WCAG), we’re updating the application with support that will go
Super Admin Access to All Courses and Spaces in Zoho Learn
Dear Zoho Learn Team, We hope this message finds you well. We are using Zoho Learn extensively for internal and agent training. While managing our courses and spaces, we encountered a significant limitation regarding admin access and course management.
Print checks for owner's draw
Hi. Can I use Zoho check printing for draws to Owner's Equity? This may be a specific case of the missing Pay expenses via Check feature. If it's not available, are there plans to add this feature?
[New Release 2024] Create and embed custom capabilities across CRM with Kiosk Studio, our latest no-code tool
[Update | New series] We've started publishing a series of posts on Kiosk Studio. It's called Kiosk Studio Sessions and you can check out the first one here! [Update | 15 Oct} Session #2 is live! This one will look at how to create a kiosk for your call
Revenue Management: #10 Common Mistakes while Recognizing Revenue
We are at the end of the series on Revenue Management, covering how different businesses recognise revenue. Even with clear standards like ASC 606 and IFRS 15 in practice, businesses often struggle with the nuances of revenue recognition. Especially growing
Windows Desktop App - request to add minimization/startup options
Support Team, Can you submit the following request to your development team? Here is what would be optimal in my opinion from UX perspective: 1) In the "Application Menu", add a menu item to Exit the app, as well as an alt-key shortcut for these menus
integarting attachments from crm to creator
when i tried to integrate pdf attachments from crm to creator via deluge i am getting this error {"code":2945,"description":"UPLOAD_RULE_NOT_CONFIGURED"} the code i used is attachments = zoho.crm.getRelatedRecords("Attachments","Sales_Orders",203489100020279XXX8);
Search Option
🚫 Current Limitation: As of now (September 2025), Zoho FSM lacks a global search functionality, which makes it difficult to quickly: Find specific Work Orders by number or keyword Search for customer records or contact info Locate assets, jobs, or service
Mobile Chat Window - Full Screen
Hello, The mobile chat window takes up the full screen, which is highly confusing for most customers! Using a desktop machine, I see the same happens when reducing the browser width to 800px or below. This suggests that it responsive web design, causing the switch to full screen. Can we fix this very annoying behaviour ourselves using a custom css file? If so, can you please let me know how? Thanks
Is it possible to customize ZC Themes?
I understand you can choose a layout and customize Brand Color, App Header, Menu, and Sub-Menu components, but can you override some of the default theme settings with CSS or a config file? For example, - Table highlight color - Listview auto filter highlight
Is it possible to create Custom function-based Lookup field in Zoho CRM
Is it possible to create a custom function-based lookup field in Zoho CRM? If so, how? Use case: Need to fetch users from Zoho Projects into a dropdown field in Zoho CRM.
@mention in comments no notification
Hi, hope someone can help. When we @mention someone in the comments in Zoho Creator, how is that user notifed as we don't get anything on email or in the app notifications.
Add "Running Balance" column to Account Transaction Reports
Hello, Currently Zoho Account Transaction Reports give you the opening balance, then lists the transactions, then provides the closing balance. It would be great if you could add a column on the far right that shows the "Running Balance" on the account after each transaction. There are many times when analyzing or tie-ing out transactions that this would be very helpful. I currently have to frequently run a tape on my adding machine to get balance totals after a specific transaction on the list.
Unified customer portal login
As I'm a Zoho One subscriber I can provide my customers with portal access to many of the Zoho apps. However, the customer must have a separate login for each app, which may be difficult for them to manage and frustrating as all they understand is that
WhatsApp Channels in Zoho Campaigns
Now that Meta has opened WhatsApp Channels globally, will you add it to Zoho Campaigns? It's another top channel for marketing communications as email and SMS. Thanks.
error : Object code : 6500
b3 = map(); b3.put("name", "Test Project Name"); updateprojects2 = invokeurl [ url :"https://projectsapi.zoho.eu/restapi/portal/era0130/projects/169495000000928007/" type :PUT parameters: b3 connection:"in2" ]; info b3 ; info updateprojects2; ------------
How to book GST paid in zoho books
hi, i am a new user to Zoho books and not able to book GST paid in books, kindly suggest how i can book it in books. thanks, siddharth
I got unknown charge from Zoho
Good day, I need help disputing a charge I don't know from, zoho. I have ZohoMail and ZeptoMail. I purchase credits for ZeptoMail, and for ZohoMail I am not subcribed.
How can I see content of system generated mails from zBooks?
System generated mails for offers or invices appear in the mail tab of the designated customer. How can I view the content? It also doesn't appear in zMail sent folder.
Function 56: Automatically enable the option for customers to pay via bank account
Hello everyone and welcome back to our series! One of the key features of Zoho Books is its integration with multiple payment gateways, allowing you to receive online payments for your invoices. This ensures faster payments, automates payment tracking
Attach Files to Your Notecards and share them on the go!
Hey everyone! We’re excited to share a feature many of you have been asking for — you can now attach files directly to your text notecards and share with ease! 🙌 This update was built with your feedback in mind, especially for those who wanted a simple
Can i connect 2 instagram accounts to 1 brand?
Can i connect 2 instagram accounts to 1 brand? Or Do i need to create 2 brands for that? also under what subscription package will this apply?
Workdrive on Android - Gallery Photo Backups
Hello, Is there any way of backing up the photos on my android phone directly to a specific folder on Workdrive? Assuming i have the workdrive app installed on the phone in question. Emma
Integración Books para cumplir la ley Crea y Crece y Ley Antifraude (VeriFactu)
Hola: En principio, en julio de 2025, entra en vigor la ley Crea y Crece y Ley Antifraude (VeriFactu). ¿Sabéis si Zoho va a cumplir con la ley para cumplir con la facturación electrónica conectada a Hacienda? Gracias
How to add a % Growth column for year-over-year comparison (2024 vs 2025)
Hello, I am trying to build a monthly revenue comparison between 2024 and 2025 in Zoho CRM Analytics. My current setup is: Module: Deals (Affaires) Filter: Stage = Closed Won Date field: Closing Date Grouping: By Month Metrics: Sum of Amount for 2024,
How to searchByCriteria records that are under approval?
I need to search for both approved and pending approval records Is that possible with this method? Or I need to a different method? var priceReqID = $Page.record_id; log(priceReqID); var records = ZDK.Apps.CRM.Price_List_Item.searchByCriteria("Price_Request:equals:"
How to add Simple Analytics to Zoho Pages?
I have a website with Zoho Pages, how do I add Simple Analytics on it? They seem to have code they need to be embedded https://docs.simpleanalytics.com/script
End Date in Zoho Bookings
When I give my appointments a 30 minutes time I would expect the software not to even show the End Time. But it actually makes the user pick an End Time. Did I just miss a setting?
Cant seem to delete an email account
Hello, I have researching for 4 days how to delete an email account and I am absolutely without a clue. The email account I am trying to delete is support<AT>fyshoes<dot>com. It's the first email account I made and it (is???) was associated with the super user (me). I have since changed it to adming<AT>fychoes<dot>com and I see the support email in my list but I just cant seem to get rid of it. Ultimately I want to associate that email account with another user that I want to add. This is really
Commerce Order as Invoice instead of Sales Order?
I need a purchase made on my Commerce Site to result in an Invoice for services instead of a Sales Order that will be pushed to Books. My customers don't pay until I after I add some details to their transaction. Can I change the settings to make this
Import data into Multi-Select lookup field from CSV/Excel
How to import data into a multi-select lookup field from the CSV/Excel Sheet? Let's say I have an Accounts multi-select lookup field in the Deals module and I want to import the Deals with Accounts field. Steps:- 1. Create/edit a multi-select lookup field
Sync desktop folders instantly with WorkDrive TrueSync (Beta)
Keeping your important files backed up and accessible has never been easier! With WorkDrive desktop app (TrueSync), you can now automatically sync specific desktop folders to WorkDrive Web, ensuring seamless, real-time updates across devices. Important:
Script that deletes a record?
We're using WP Plugin "Integration for WooCommerce and Zoho Pro", and have created a couple of Feeds to send data to Zoho. We are trying to create Contact records, but only based upon condition. Tried to make it with small Deluge function and Workflow,
A formula that capitalises the first letter of each word
Hi all, is there a zoho formula that can capitalise the first letter of each word in a string? INITCAP only capitalises the first letter of the first word.
Quotes in Commerce?
In Zoho Ecommerce, I need to be able to generate quotes, negotiate with customers, and then generate invoices. Currently, I plan to integrate Zoho CRM to generate quotes. After negotiation and confirmation, I will push the details to Zoho Ecommerce to
Zoho Commerce - Mobile Application
Does Zoho Commerce have a mobile application for customers to place an order?
Register user through Phone Number by Generating OTP
In zoho commerce , I am developing website on online food store Inilialy the user get verification code to their email for registering there account for login. But I need to login using phone number by generating OTP automatically rather than verification
Unable to change sales_order status form "not_invoiced" to "invoiced"
I am automating process of creating of invoice from sales_orders by consolidated sales_orders of each customer and creating a single invoice per customer every month. I am doing this in workflow schedule custom function where i create invoice by getting
Custom Buttons for Mass Actions
Hello everyone, We’ve just made Custom Buttons in Zoho Recruit even more powerful! You can now create Bulk Action Buttons that let you perform actions on multiple records at once, directly from the List View. What’s new? Until now, custom buttons were
Zoho Vault Passwords
Is there a way to consume Zoho Vault Manager passwords using the API? Thanks in advance.
Next Page