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
Elevate your CX delivery using CommandCenter 2.0: Simplified builder; seamless orchestration
Most businesses want to create memorable customer experiences—but they often find it hard to keep them smooth, especially as they grow. To achieve a state of flow across their processes, teams often stitch together a series of automations using Workflow
To Zoho customers and partners: how do you use Linked Workspaces?
Hello, I'm exploring how we can set up and use Linked Workspaces and would like to hear from customers and partners about your use cases and experience with them. I have a Zoho ticket open, because my workspace creation fails. In the meantime, how is
[Webinar] Automate sales and presales workflows with Writer
Sales involves sharing a wide range of documents with customers across the presales, sales, and post-sales stages: NDAs, quotes, invoices, sales orders, and delivery paperwork. Generating and managing these documents manually slows down the overall sales
Can't change form's original name in URL
Hi all, I have been duplicating + editing forms for jobs regarding the same department to maintain formatting + styling. The issue I've not run into is because I've duplicated it from an existing form, the URL doesn't seem to want to update with the new
Need Inactive accounts to be visible in Reports in Zoho Books
I N=need Inactive accounts to be visible in Reports in Zoho Books to do recons of the accounts but when i see the same they are not visible in the Accountant - Account Transactions report
unblock e-mail
please unblock my e-mails info@meatnews.gr and myrtokaterini@meatnews.gr
Add Zoho Mail for users who do not need Zoho One
We have licenses for ZOho One for teams that need to use the suite of products that Zoho One offers. We have 8 more people who only need email access and we would like to add just a Zoho Mail. They do not need the Zoho One license. We are currently
Zoho Projects - Q2 Updates | 2025
Hello Users, With this year's second quarter behind us, Zoho Projects is marching towards expanding its usability with a user-centered, more collaborative, customizable, and automated attribute. But before we chart out plans for what’s next, it’s worth
ZML vs HTML Snippet - which is better?
Are there certain use cases where one is better than the other?
Auto CheckOut Based On Shift.
This Deluge script runs on a scheduled basis to automatically set the 'Actual_Check_Out' time for employees who haven't manually checked out. If the current time is past their scheduled 'Shift_End_Time', the script updates the check-out time to match
How to remove some users in zoho accounts
How to remove some users in Zoho accounts.
how to differentiate if whatsapp comes from certain landing page?
I create a Zobot in SalesIQ to create a Whatsapp bot to capture the lead. I have 2 landing pages, one is SEO optimized and the other want is optimized for leads comes from Google Ads. I want to know from which landing page this lead came through WhatsApp
Customizing Form Questions per Recipient Group in Zoho Campaigns/Forms
Hello everyone, I would like to ask if it’s possible in Zoho Campaigns or Zoho Forms to send out a campaign where the form questions can be customized based on the group of recipients. Use case example: I have prepared 20 questionnaire questions. For
Infinite loop of account verification
Hi I can't do anything on my zoho account. I always get this message Hi Sheriffo Ceesay As a security measure, you need to link your phone number with this account and verify it to proceed further. When ever I supply the details, it displays that the number is associated with another account. I don't have any other account on zoho so this is really annoying.
Load PO_Date field (Purchase Order) with current date in Deluge
Hi, I'm not a full time developer, just helping to customize our CRM, in the small company I work for. There must be something wrong with me, because I can't do something so simple as complete a field with the current date in a function using Deluge.
Zoho CRM in Microsoft Power Automate Custom Connector
Hi everyone, I’m building a Power Automate flow that integrates Microsoft Bookings with Zoho CRM. The goal is to automatically create a meeting (event) in Zoho CRM whenever a new appointment is booked via Microsoft Bookings. To achieve this, I created
Spell check sucks
Come on guys, it's 2024 and your spell check is completely retarded. You gotta fix it.
How to include total km for multiple trips in expense report.
Whenever I create a mileage report it only shows the total dollar amount to be reimbursed. The mileage for each individual trip is included but I also need to see the total distance for all trips in a report? How do I do this?
New in Cadences: Option to Resume or Restart follow-ups when re-enrolling records into a Cadence, and specify custom un-enrollment criteria
Managing follow-ups effectively involves understanding the appropriate timing for reaching out, as well as knowing when to take a break and resume later, or deciding if it's necessary to start the follow-up process anew. With two significant enhancements
Outgoing blocked: Unusual activity detected.
I just made payment for my Zohomail Today and have been debited so i will like to be Unblocked because this is what it says (Outgoing blocked: Unusual activity detected) Thank you i await your swift responses
Zoho One Login Issue - Unable to receive OTP
Hi Support Team, I am experiencing a unique login issue with Zoho One. I am attempting to log in from India using Zoho Login credentials provided by a USA-based client. Their Zoho account is hosted on a US data center. After entering the username and
Question Regarding Managing Sale Items in Zoho Books
Good day, I was wondering about something. Right now, Zoho Books doesn’t seem to have a way to flag certain items as being on sale. For example, if I want a list of specific items to be on sale from October 1 to October 12, the user would have to export
In the Zoho Creator Customer Payment form i Have customer field on select of the field Data want to fetch from the invoice from based on the customer name In the Customer Payment form i Have subf
In the Zoho Creator Customer Payment form i Have customer field on select of the field Data want to fetch from the invoice from based on the customer name In the Customer Payment form i Have subform update Invoice , there i have date field,Invoice number
Problem of Import Client Users From CRM and or Expense
I am premium plan user on Projects. I have about 500 customers on Expense and CRM that integrated with each other. According to at below link, I am trying to import clients from CRM, system not allowed to select any customer. If I import from Expense,
Unable to see free plan option
Hello Zoho Support Team, I hope you are doing well. I am trying to sign up for Zoho Mail, but I am unable to see the option for the free plan. Could you please guide me on how I can access or activate the free plan? Thank you for your assistance.
unblock my zoho mail account. outlines@zoho.com
please unblock my zoho mail account, outlines@zoho.com
domain not verified error
Hi when i try to upload a video from zoho creator widget to zoho work drive iam getting domain not verified error.I don't know what to do .In zoho api console this is my home page url https://creatorapp.zoho.com/ and this is my redirect url:www.google.com.Iam
equest to Disassociate Bigin from Zoho One and Migrate to Standalone (Upgrade to Bigin Premier – 3 Seats, Annual)
Dear Zoho One Support Team, I’m writing to request your assistance to disassociate (remove) the Bigin application from our Zoho One organization while preserving all existing Bigin data. After the disconnection is successfully completed, we intend to
SMTP email sending problem
Hello, I've sent emails before, but you haven't responded. Please respond. My work is being disrupted. I can't send emails via SMTP. Initially, there were no problems, but now I'm constantly receiving 550 bounce errors. I can't use the service I paid
billing
hi, I am being billed $12/year, and I can't remember why. My User ID is 691273115 Thanks for your help, --Kitty Pearl
Syncing Zoho Forms with Bigin - Embedding issue?
Hello everyone, I created a Zoho Form for a page on my GoDaddy website to collect leads, which then transfers the data to Bigin. However, I'm facing an issue where it doesn't seem to work properly. I've integrated Zoho Forms with Bigin and tried embedding
How to add receipts
How to add receipts
Unable to enable tax checkboxes
Hi Zoho Commerce Support, I'm writing to report an issue I'm having with the tax settings in my Zoho Commerce store. I've created several tax rates under Settings > Taxes, but all of them appear with the checkbox disabled. When I try to enable a checkbox,
Does Zoho Learn integrate with Zoho Connect,People,Workdrive,Project,Desk?
Can we propose Zoho LEarn as a centralised Knowledge Portal tool that can get synched with the other Zoho products and serve as a central Knowledge repository?
Zoho Commerce - Enable Company Name and Tax Number collection for B2B orders in Global Edition
Please enable Company Name and Tax Details option on checkout settings in Zoho Commerce Global Edition. It is still important to collect Company Name and Tax Number for B2B sales in many countries. My business is based in Ireland (in the EU) and I have
Zoho CRM: how can I control which contacts to sync with Outlook?
I was just playing around syncing contacts from Zoho to MS Outlook (MS365 account.) The problem is our firm has hundreds of thousands of contacts and I don't want to bury my contacts list in outlook. Any help with this is greatly appreciated.
ZohoSign and ZohoBooks Integration/Workflow
Hello All, We utilize ZohoSign for signatures on tax eFiles. We utilize Dynamic KBA. Additionally, we use ZohoBooks for invoicing for these services. Is there a way to accomplish the following: Send a copy of the Tax Return, Invoice and eFiles in one
Manage monthly tasks with projectsf
Hi All I run a finance and operations team where we need both teams to complete monthly tasks to ensure we hit our deadlines. Can Zoho projects be used for this. There many finance focused tools but we have Zoho one so want to explore Thanks Will
Zoho Suite is very slow
Since today Zoho is incredibly slow over all applications! What's going on?
How can I track which zoho users are actively using Zoho CRM
I have several licenses of Zoho CRM. We now need to add a new user. I could purchase a new license, but before I do, I would like to see if any of our existing users are not actively using the license assigned to them. How can I determine the activity
Next Page