Automation#32:Auto Add New Portal Users to the Help Center User Groups

Automation#32:Auto Add New Portal Users to the Help Center User Groups

Hello Everyone,
Introducing a custom function that automates the process of adding new portal users to Help Center user groups, making user management effortless!
By default, Zoho Desk allows you to assign new portal users to groups manually. But with this custom function, the process is completely automated, ensuring seamless categorization.


Why User Groups?

Zylker Techfix was dedicated to helping customers through their Help Center. While they actively supported users, there was one challenge: everyone received the announcements, irrespective of their requirements.
Zylker Techfix wanted a smarter way to engage their users by sending targeted announcements based on individual interests, such as gadgets, office equipment, and operations.
To make this happen, they created user groups and assigned new users accordingly. But manually adding users to the right groups was time-consuming.
So, they automated the process! With a custom function, they streamlined operations, ensuring every new portal user was automatically assigned to the right Help Center user group. More relevance, better engagement, zero manual effort.
Let’s walk through the steps to incorporate this custom function into your workflow.

Prerequisites

1. Create a connection
  1.1 Go to Setup(S) and choose Connections under Developer Space.
  1.2 Click Create Connection.
  1.3 Select Zoho OAuth under Default Connection.
  1.4 Set the connection name as zohodesk.
  1.5 Disable the toggle for User Credentials of Login User. 
  1.6 Under Scope, choose the below scope values:
Desk.contacts.READ
Desk.contacts.UPDATE
  1.7 Click Create and Connect.
  1.8 Click Connect and click Accept.
Connection is created successfully.

Create a Workflow Rule

1. Go to Setup, choose Workflows under Automation. 
2. Under Workflows, click Create Rule.

In the Basic Information section,
3. Select Contacts from the drop-down menu under Module.
4. Enter a Rule Name and Description for the rule.
5. If you want to activate the rule right away, select the Active checkbox. Else, create the rule and activate it later.
6. Click Next

In the Execute on section, follow these steps:
7. Select Field Update. Select field isPortalUser. 
8. Click Next.
9. In the Criteria section, add isPortalUser is and select the checkbox. click Next. 
10. In the Actions section, click the + icon and select New next to Custom Functions.
11. Enter a Name and Description for the custom function. Choose Contacts under Module.
12. Under Argument Mapping, give a desired Method Name. Map the arguments as below:
      12.1 In the Argument Name field, type contactId and select Contact ID under the Contacts Section.
13. In the script window, insert the Custom Function given below:
  1. // ---------------User inputs------------------------------------------
  2. deskUrl = "https://desk.zoho.com/api/v1/"; // replace based on user dc
  3. groupId = "<<GROUP ID>>"; // replace the group id in your desk portal
  4. //---------------------------------
  5. logs = Map();
  6. try 
  7. {
  8. getContactStatus = invokeurl
  9. [
  10. url :deskUrl + "contacts/" + contactId + "/helpCenters"
  11. type :GET
  12. connection:"zohodesk"
  13. ];
  14. contactUserId = getContactStatus.get("data").get(0).get("userId");
  15. if(contactUserId != null)
  16. {
  17. addUserToGroup = invokeurl
  18. [
  19. url : deskUrl + "groups/" + groupId + "/users/add"
  20. type :POST
  21. parameters:"" + {"users":{{"id":contactUserId}}}
  22. headers:{"Content-Type":"application/json"}
  23. detailed:true
  24. connection:"zohodesk"
  25. ];
  26. info "addUserToGroup" + addUserToGroup;
  27. }
  28. }
  29. catch (errorInfo)
  30. {
  31. logs.insert("errorInfo":errorInfo);
  32. }
  33. info "logs: \n" + logs;
  34. if(logs.containKey("errorInfo"))
  35. {
  36. throws "Error happen in the CF execution";
  37. }
User Inputs
a. In Line 2, replace .com in the URL based on your DC. 
b. In Line 3, enter the group ID to which you would like to add your new portal users. To access group ID, go to Setup >> Help Center >> Select the Department having your preferred User group >> choose User Groups on the left panel >> Select the user group >> The Id in the address bar is the required Group ID. 
Notes
Note: Configure the Workflow for the contacts module in the respective department where you want to add portal users to be added to the User group. 
14. Click Save to save the custom function.
15. Click Save again to save the workflow.

Share with us how this custom function helps you in your operations! Drop a comment below or reach out to us at support@zohodesk.com, we’re just an email away!

Meet you in the next post!
Regards,
Lydia | Zoho Desk


      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

          • Register for Zoho Desk Beta Community

            With the start of the year, we have decided to take a small step in making the life of our customers a little easier. We now have easy access to all our upcoming features and a faster way to request for beta access. We open betas for some of our features
          • Share your Zoho Desk story with us!

            Tell us how you use Zoho Desk for your business and inspire others with your story. Be it a simple workflow rule that helps you navigate complex processes or a macro that saves your team a lot of time; share it here and help the community learn and grow with shared knowledge. 
          • Tip #1: Learn to pick the right channels

            Mail, live chat, telephony, social media, web forms—there are so many support channels out there. Trying to pick the right channels to offer your customers can get pretty confusing. Emails are most useful when the customer wants to put things on record. However, escalated or complicated issues should not be resolved over email because it's slow and impersonal.  When you need immediate responses, live chat is more suitable. It's also quick and convenient, so it's the go-to channel for small issues. 
          • Welcome to Zoho Desk Community - Say hello here!

            Hello everyone! Though we have been here for a while, it’s time to formally establish the Zoho Desk Community; we’re really happy to have you all here! This can be the place where you take a moment to introduce yourself to the rest of the community. We’d love to hear all about you, what you do, what company or industry you work for, how you use Zoho Desk and anything else that you will like to share! Here’s a little about me. I am Chinmayee. I have been associated with Zoho since 2014. I joined here
          • Webinar 1: Blueprint for Customer Service

            With the launch of a host of new features in Zoho Desk, we thought it’ll be great to have a few webinars to help our customers make the most of them. We’re starting off with our most talked about feature, Blueprint in Zoho Desk. You can register for the Blueprint webinar here: The webinar will be delivered by our in-house product experts. This is a good opportunity to ask questions to our experts and understand how Blueprint can help you automate your service processes. We look forward to seeing

          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

                                  • Download Google Drive Shared Image/File Using Deluge – Complete Guide

                                    Download Google Drive Shared Image/File Using Deluge – Complete Guide When working with Google Drive share links inside Deluge, many developers face a common challenge: 👉 How can we download a Google Drive file directly using Deluge? This article explains
                                  • How to update Acuity appointment fields from Zoho Flow?

                                    Hi, I need help with Zoho Flow → Acuity Scheduling integration. What I’m doing Appointment created in Acuity Zoho Flow creates a Zoho Calendar event I want to send the Zoho Calendar Event UID back into Acuity (into a custom form field) This is so that
                                  • When will Zoho Learn be able to support SCORM files on the mobile app?

                                    When I click the SCORM content, I just get a message saying it's not possible yet. Yet implies that it will be coming soon. All I'm asking for is a realistic timeline so I know whether or not to invest my time in using it. If it will be soon, then I will
                                  • No horizontal scroll bar in reports

                                    Hi support team, I created a pivot table report which contains many columns (in my application about 15). The problem is that there is no bottom scroll bar to display colums that does not fit within the browser page. I saw that it was possible to resize colums, but colums sizes are not saved within the session. So could you add scroll bar, and eventually make colums sizes stored in the user session ? Best regards,
                                  • Zoho Map integration tasks have changed - you need to "Locate all instances of Zoho Map integration tasks in your Deluge scripts by searching for the v1 marker... before 16 January 2026"

                                    Details of an issue specific to Zoho CRM + Deluge Functions (originally posted in this forum) can be found here: https://help.zoho.com/portal/en/community/topic/zoho-map-integration-tasks-have-changed-you-need-to-locate-all-instances-of-zoho-map-integration-tasks-in-your-deluge-scripts-by-searching-for-the-v1-marker
                                  • Ask the Experts 25: Experience the full spectrum of Zoho Desk’s autumn and spring releases for 2025

                                    Hello Everyone, We’re on the 25th episode of our ATE series! It's a true milestone in our live community interactions! It’s been an amazing journey since we started in October 2018. Zoho Desk has come a long way, evolving with the support of a wonderful
                                  • filter broke my data

                                    I uploaded a file recently from Sheets and it has top 2 rows frozen, with table headers in second row and each one is filterable. somehow my first 2 columns became unfiltered and no matter what I do I cannot reapply the filter?? also didn't realize they
                                  • Request to remove domain "greentechcoatings.vn" from previous Zoho account

                                    Hello Zoho Support, I would like to register the domain "greentechcoatings.vn" in my new Zoho Mail account, but I receive the message "This domain is already associated with another account". Please remove the domain from any previous/unknown account
                                  • Introducing Multi-Asset Support in Work Orders, Estimates, and Service Appointments

                                    We’re excited to announce a highly requested enhancement in Zoho FSM — you can now associate multiple assets with Work Orders, Estimates, and Service Appointments. This update brings more clarity, flexibility, and control to your field service operations,
                                  • Trigger actions in third-party apps using Zoho Flow

                                    Greetings, I hope you're all doing well. We're excited to share an enhancement to Bigin's workflow capabilities. Zoho Flow Actions are now available in Bigin, enabling you to automate tasks across third-party applications directly from your workflow and
                                  • Enroll, Script, Win: Hackathon 2025!

                                    Hello CRM Developers! Are you ready to create some magic with Client Script, Widgets and Functions in Zoho CRM? Let’s make Hackathon 2025 an unforgettable adventure! The Zoho Developer Community Hackathon 2025 is here, and it’s your time to shine! REGISTER
                                  • Reupload and rename from one field to another field (file upload)

                                    Hi Everyone, Sorry, i have question to use invoke url for rename and reupload attachments file to another field. Tested on development mode. Zoho C6. Refer to https://www.zoho.com/creator/help/api/v2/upload-file.html look my error notification. Does anyone
                                  • Zoho Help Desk - Not receiving emails

                                    Hello… I am on your trial version of help desk… and I am having trouble getting emails from Zoho Help Desk to my MS Outlook Exchange Server… So when a customer sends ticket request I am not getting an email with a notification? I have read your articles
                                  • Export History timeline

                                    Hi, I have an idea, bout zoho desk history of the ticket it would be great if the agent or admin of the zoho desk can export the timeline of the ticket history for agent report or on other matter.
                                  • Almost all Flows are being queued

                                    A few days ago I saw one of my Flows status was Queued. This was the first time this had ever happened. Now, almost every Flow that triggers is Queued for at least a few minutes. If I re-trigger the Flow (which causes separate problems) they sometimes
                                  • Cancellation of written-off invoice

                                    Hi, Can I know when we cancel the write off (write back), in which FY, the reversal is recorded. It doesn't ask as to when the write off should be cancelled to reflect!. It shouldn't reflect in the year in which the invoice was written off since the Year
                                  • How Do I Refund a Customer Directly to Their Credit Card?

                                    Hi, I use books to auto-charge my customers credit card. But when I create a credit note there doesn't seem to be a way to directly refund the amount back to their credit card. Is the only way to refund a credit note by doing it "offline" - or manually-
                                  • How to restrict user/portal user change canvas view

                                    Hi , I would like to restrict user / portal user change their canvas view because I hide some sensitive field for them. I dont want my user switch the canvas view that do not belong to them But seems Zoho do not provide this setting?
                                  • Employment Contract / HRMS Documents - Zoho People

                                    How do I create customized HR documents for disbursal from Zoho People ? Example, say offer letters ? appointment letters ? Memos ? We want to be able to preset these in one or ther other form and issue them to employees who are in Zoho People.
                                  • Custom validation in CRM schema

                                    Validation rules in CRM layouts work nicely, good docs by @Kiran Karthik P https://help.zoho.com/portal/en/kb/crm/customize-crm-account/validation-rules/articles/create-validation-rules I'd prefer validating data input 'closer to the schema'
                                  • Send Zoho Forms Link using Zoho CRM Email Templates

                                    I have set up Zoho Forms and CRM integration to pre-populate data from Zoho CRM to Zoho Forms. The setup is working fine. I have also created an email template in the Zoho CRM deals module to send Zoho forms links. So when I send an email using that template
                                  • Live webinar: Craft and deliver impactful slides with Show’s desktop apps

                                    If you love the comfort of working on your desktop and want a setup that keeps you focused and uninterrupted, this session is made for you. We’re excited to invite you to our upcoming live webinar: "Craft and deliver impactful slides with Show's desktop
                                  • Enhancements to Bigin's forms

                                    Greetings, I hope all of you are doing well. We're happy to announce a few recent enhancements we've made to Bigin's forms. We'll go over each one in detail. Merge field support in auto-filled forms The auto-fill option in Bigin's forms lets you predefine
                                  • Table dimensions

                                    I try changing the dimensions of the table on my computer but it doesn't change. Do I have to be a premium member or does it only work on the app?
                                  • Direct link to Record Summary

                                    Hi everyone, In one of my reports, I have built a Record Summary template to display the details of one record. I would like to be able to link directly to this Record Summary once I submit a new record, without having to go to the list of records first and click on View. Is there a possibility to do so ?  Should I use the URL by passing some parameters ? Thank you very much for your help ! Guillaume
                                  • Amendment effective date

                                    Hi everyone, I noticed that the amendment effective date mentionned in my amendment is not right. Indeed, when a contract is amended several times, it states the previous amendment and their effective date. However, the effective date stated is always
                                  • STOCK history in zohosheets

                                    is it possible to get historical stock value using stock function in zoho sheets? i could not see from and to period in the helper document.
                                  • Auto sync Photo storage

                                    Hello I am new to Zoho Workdrive and was wondering if the is a way of automatically syncing photos on my Android phone to my workdrive as want to move away from Google? Thanks
                                  • Can't add a sender adress from zoho campaigns

                                    hi, I need to change the sender address for a campaign.  When i try to add it i get a message to say 'duplicated email address found while adding your sender address'.  This is the first campaign i'm sending so I don't understand why this message is displayed? Thanks Jane 
                                  • Zoho Webinar custom registration fields into Zoho CRM

                                    I am pushing webinar registrations into zoho crm as leads and this is working fine. I have added a few custom fields to my webinar registration and I wish for these fields values to get mapped into the resulting CRM lead record. I am not seeing anywhere
                                  • Condition based aggregate fields in subforms

                                    Hello everyone, We're excited to inform you about the latest enhancements made to our aggregate field capabilities in subforms; create aggregate fields based on conditions! An aggregate field is a column on which a mathematical function has been applied.
                                  • Zoho Desk Training

                                    Hello, We've had Zoho desk for a while now, but we run into issues occasionally, and I was wondering if there was a customer who currently uses it and really enjoys the functionality, that would be wiling to chat with us?
                                  • Introducing parent-child ticketing in Zoho Desk [Early access]

                                    Hello Zoho Desk users! We have introduced the parent-child ticketing system to help customer service teams ensure efficient resolution of issues involving multiple, related tickets. You can now combine repetitive and interconnected tickets into parent-child
                                  • Text/SMS With Zoho Desk

                                    Hi Guys- Considering using SMS to get faster responses from customers that we are helping.  Have a bunch of questions; 1) Which provider is better ClickaTell or Screen Magic.  Screen Magic seems easier to setup, but appears to be 2x as expensive for United States.  I cannot find the sender id for Clickatell to even complete the configuration. 2) Can customer's reply to text messages?  If so are responses linked back to the zoho ticket?  If not, how are you handling this, a simple "DO NOT REPLY" as
                                  • Agent password reset

                                    Hi Zoho support, I would like to ask if there is a way the admin can reset a password of an agent? Regards
                                  • Group Calendar as Default for adding new events, etc?

                                    Hi, I want to make the group calendar (that I created, if that makes a difference) the default for anything new I add to the calendar. How can I do that? thanks.
                                  • Can receive but not send messages in Zoho Mail

                                    Hello! I was able to configure my email client successfully in that I can receive messages just fine. However, when I send messages out, they seem to go out fine (I don't receive any errors or anything), but the recipient does NOT receive those messages.
                                  • Why is Zoho Meeting quality so poor?

                                    I've just moved from Office 365 to Zoho Workplace and have been generally really positive about the new platform -- nicely integrated, nice GUI, good and easy-to-understand control and customisation, and at a reasonable price. However, what is going on
                                  • Mail is sent twice!

                                    Been using Zoho for a while now. Installed Zoho for someone else and some weird things are happening. Mails are being sent twice. He is using Thunderbird as an email client. I already read about email being duplicated in the sent folder. But in my case
                                  • Can't login IMAP suddenly

                                    Since this evening I'm getting the error: You are yet to enable IMAP for your account. Please contact your administrator... IMAP always been enabled in my account and was workign fine for the past 7 years. Already tried turning IMAP off and on again.
                                  • Next Page