Automation#28 Notify Agents on Article Expiry

Automation#28 Notify Agents on Article Expiry



Hello Everyone!
This week, we’re bringing you a feature that notifies your team when articles in the Knowledge Base are set to expire to keep your content relevant and helpful for customers.

The Zoho Desk's Knowledge Base is an asset for customers to gain knowledge and help themselves navigate through the product or process of the firm or industry. Zoho Desk allows you to set expiry dates for articles to maintain up-to-date information. However, once an article expires, it’s removed from the Help Center, and notifications are only sent to the article owner by default. 

But, what if they miss it?

This solution integrates with a scheduler to notify team members on the same day an article expires. 
Here’s how you can implement the custom function within the schedule to notify your team when an article expires.

Prerequisites
I. 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 deskconnection.
  1.5 Disable the toggle for User Credentials of Login User.
  1.6 Under Scope, choose the below scope values:
Desk.articles.READ
  1.7 Click Create and Connect.
  1.8 Click Connect and click Accept.
Connection is created successfully.

II. Create a Schedule
1. Go to Setup, choose Schedules under Automation
2. Under Schedules, click New Schedule.
3. Under Add Schedule, enter a Schedule Name and Description for the rule.
4. In the Execute on tab, set the Date and Time for the schedule to begin execution. 
5. In the Repeat tab, select 'Every Day,' then choose 'Every [1] Days.' Select the days based on your preferences and set 'Ends' to 'Never'. Click Done.  This will ensure the schedule runs on the selected days. 



6. In the Functions section, click on Create Function.
7. Enter a Name and Description for the custom function.                                           
8. In the script window, insert the Custom Function given below:
  1. // ----<<<< User Inputs >>>>----
  2. subjectOfNotificationEmail = "Zoho Desk - Article Expiry Notification"; // provide subject based on your preference
  3. commaSeperatedToAddresses = "email address1, email address2";//provide email addreses of team members
  4. currentDateString = zoho.currentdate.toString("yyyy-MM-dd");
  5. //Expiring/Expired Today
  6. fromString = currentDateString + "T00:00:00.000Z";
  7. toString = currentDateString + "T23:59:59.999Z";
  8. info "final url " + "https://desk.zoho.com/api/v1/articles?expiryTimeRange=" + fromString + "," + toString;  
  9. //change .com based on your DC
  10. getArticle = invokeurl
  11. [
  12. url :"https://desk.zoho.com/api/v1/articles?expiryTimeRange=" + fromString + "," + toString
  13. //change .com based on your DC
  14. type :GET
  15. connection:"deskconnection"
  16. ];
  17. emailBody = "";
  18. if(getArticle != null && getArticle != "" && getArticle.get("data").size() > 0)
  19. {
  20. articlesList = getArticle.get("data");
  21. emailBody = emailBody + "<div> <b> List of articles expiring/expired today </b>";
  22. for each  article in articlesList
  23. {
  24. webUrl = article.get("webUrl");
  25. title = article.get("title");
  26. emailBody = emailBody + "<div><br><a href='" + webUrl + "'>" + title + "</div>";
  27. }
  28. emailBody = emailBody + "</div> <br> <br>";
  29. }
  30. //Expiring Tomorrow
  31. currentDateString = zoho.currentdate.addDay(1).toString("yyyy-MM-dd");
  32. fromString = currentDateString + "T00:00:00.000Z";
  33. toString = currentDateString + "T23:59:59.999Z";
  34. info "final url " + "https://desk.zoho.com/api/v1/articles?expiryTimeRange=" + fromString + "," + toString;
  35. //change .com based on your DC
  36. getArticle = invokeurl
  37. [
  38. url:"https://desk.zoho.com/api/v1/articles?expiryTimeRange=" + fromString + "," + toString
  39. //change .com based on your DC
  40. type :GET
  41. connection:"deskconnection"
  42. ];
  43. if(getArticle != null && getArticle != "" && getArticle.get("data").size() > 0)
  44. {
  45. articlesList = getArticle.get("data");
  46. emailBody = emailBody + "<div> <b>List of articles expiring tomorrow </b>";
  47. for each  article in articlesList
  48. {
  49. webUrl = article.get("webUrl");
  50. title = article.get("title");
  51. emailBody = emailBody + "<div><br><a href='" + webUrl + "'>" + title + "</div>";
  52. }
  53. emailBody = emailBody + "</div> <br> <br>";
  54. }
  55. //Expiring in 7 days
  56. currentDateString = zoho.currentdate.addDay(7).toString("yyyy-MM-dd");
  57. fromString = currentDateString + "T00:00:00.000Z";
  58. toString = currentDateString + "T23:59:59.999Z";
  59. info "final url " + "https://desk.zoho.com/api/v1/articles?expiryTimeRange=" + fromString + "," + toString;
  60. //change .com based on your DC
  61. getArticle = invokeurl
  62. [
  63. url :"https://desk.zoho.com/api/v1/articles?expiryTimeRange=" + fromString + "," + toString
  64. //change .com based on your DC
  65. type :GET
  66. connection:"deskconnection"
  67. ];    
  68. if(getArticle != null && getArticle != "" && getArticle.get("data").size() > 0)
  69. {
  70. articlesList = getArticle.get("data");
  71. emailBody = emailBody + "<div><b> List of articles expiring in 7 days </b> ";
  72. for each  article in articlesList
  73. {
  74. webUrl = article.get("webUrl");
  75. title = article.get("title");
  76. emailBody = emailBody + "<div><br><a href='" + webUrl + "'>" + title + "</div>";
  77. }
  78. emailBody = emailBody + "</div> <br> <br>";
  79. }
  80. info "emailBody" + emailBody;
  81. if(emailBody != "")
  82. {
  83. sendmail
  84. [
  85. from :zoho.adminuserid
  86. to :commaSeperatedToAddresses
  87. subject :subjectOfNotificationEmail
  88. message :emailBody
  89. ]
  90. info "mail sent";
  91. }
Notes
NOTE
In Line 2, Enter the Email Subject for the Notification.
In Line 3, Enter the email addresses of the team members you would like to notify. 
In Lines 8,12,34,38,59,63,  Replace ".com" with the domain extension based on your Data Center.
9. Click Save Script.  
10. Click Save to save the custom function.
11. Click Save again to save the Schedule.

By this, you can ensure quick updates and seamless publishing, keeping your Knowledge Base relevant and your customers updated with the latest resources. 
Stay tuned for more learnings on this forum. 
Regards,
Lydia | Zoho Desk 

    Access your files securely from anywhere


            Zoho Developer Community





                                      • Desk Community Learning Series


                                      • Digest


                                      • Functions


                                      • Meetups


                                      • Kbase


                                      • Resources


                                      • Glossary


                                      • Desk Marketplace


                                      • MVP Corner


                                      • Word of the Day


                                      • Ask the Experts



                                          Zoho Marketing Automation
                                                  • Sticky Posts

                                                  • Zoho Desk Virtual Meetup: US Central, October 5 - 7, 2021

                                                    After the interactive Virtual Meetups in the other regions, we are starting with the US Central and Midwest regions from October 5 to October 7, 2021. The dates for other regions will be announced soon.  At this event, we will explore the topics which
                                                  • 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. 
                                                  • Zoho Desk Community Meetups 2019 - Canada

                                                    Hey there!  ​ Are you making the best use of Zoho Desk? Do you think meeting and learning from other Zoho users in your city would help? If yes, then Zoho User Group Meetups is the right place for you! We're happy to announce our first Zoho Desk User Group meetups in Toronto, Montreal, Quebec City, Calgary, and Vancouver. These meetups are a great place to meet local Zoho users, Zoho Desk product experts and partners, all under one roof.    Join us as we discuss some key Zoho Desk features and share
                                                  • 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. 


                                                  Manage your brands on social media



                                                        Zoho TeamInbox Resources

                                                          Zoho DataPrep Resources



                                                            Zoho CRM Plus Resources

                                                              Zoho Books Resources


                                                                Zoho Subscriptions Resources

                                                                  Zoho Projects Resources


                                                                    Zoho Sprints Resources


                                                                      Qntrl Resources


                                                                        Zoho Creator Resources



                                                                            Zoho CRM Resources

                                                                            • CRM Community Learning Series

                                                                              CRM Community Learning Series


                                                                            • Kaizen

                                                                              Kaizen

                                                                            • Functions

                                                                              Functions

                                                                            • Meetups

                                                                              Meetups

                                                                            • Kbase

                                                                              Kbase

                                                                            • Resources

                                                                              Resources

                                                                            • Digest

                                                                              Digest

                                                                            • CRM Marketplace

                                                                              CRM Marketplace

                                                                            • MVP Corner

                                                                              MVP Corner





                                                                                Design. Discuss. Deliver.

                                                                                Create visually engaging stories with Zoho Show.

                                                                                Get Started Now


                                                                                  Zoho Show Resources


                                                                                    Zoho Writer Writer

                                                                                    Get Started. Write Away!

                                                                                    Writer is a powerful online word processor, designed for collaborative work.

                                                                                      Zoho CRM コンテンツ






                                                                                        Nederlandse Hulpbronnen


                                                                                            ご検討中の方





                                                                                                  • Recent Topics

                                                                                                  • New in WorkDrive: WorkDrive Genie, a quick-editing app for desktop (Beta)

                                                                                                    The WorkDrive Genie app lets you open and edit any of your WorkDrive files on the web with your default desktop applications. For example, you can open and edit files such as documents, images, and videos with Microsoft Word, CorelDRAW, and Adobe Premiere
                                                                                                  • This domain is not allowed to add. Please contact support-as@zohocorp.com for further details

                                                                                                    I am trying to setup the free version of Zoho Mail. When I tried to add my domain, theselfreunion.com I got the error message that is the subject of this Topic. I've read your other community forum topics, and this is NOT a free domain. So what is the
                                                                                                  • Kaizen #78 : How to disable clone record?

                                                                                                    Hello everyone! Welcome back to another interesting Kaizen post. In this post, let us discuss a workaround solution for the use case - How to disable clone record for a user. Requirement Consider that you want to disable the clone option for the Deals
                                                                                                  • Client Script | Update - Introducing Subform Events and Actions

                                                                                                    Are you making the most of your subforms in Zoho CRM? Do you wish you could automate subform interactions and enhance user experience effortlessly? What if you had Client APIs and events specifically designed for subforms? We are thrilled to introduce
                                                                                                  • Add Serial Number Zoho CRM Subform

                                                                                                    Hi Guys, I need to add Serial Number in Zoho CRM Subform table. In addition of an row we can easily create in Zoho Creator. But in Zoho CRM how we can do that? Any suggestion would be very helpful.
                                                                                                  • Suddenly Can't Send Outgoing Mail (SMTP)

                                                                                                    Suddenly I can't send mail anymore from my phone mail app. I have Zoho OneAuth MFA set up and an app specific password set up. It has been working correctly for a while. Has something changed with your servers or setup for SMTP? No settings have changed
                                                                                                  • Sent emails not going and showing "Processing"

                                                                                                    Hello Team, Could you please assist with sent emails showing "processing" and not actually going through? Many thanks and regards, Cycology
                                                                                                  • Shared Mailbox - Mark as read for all users

                                                                                                    Hi all, Maybe someone can help me out. At the moment we have a shared mailbox without streams. When a users reads an mail or marks it as read other users will not see this. How can we resolve this? We now archive the mails when read and followed up. However
                                                                                                  • Domain verification is in progress... (How long do I need to wait?)

                                                                                                    Trying to setup my first email domain by connecting with GoDaddy. Have been here for quite some time and the screen is not changing. How long should this take?Send DataSend Data
                                                                                                  • Multiple workflows based on stage?

                                                                                                    I am trying to have multiple things happen when I close a deal. First, I would like to send a thank you/coupon email to all deals that are closed. Second, I would like to create connected records in a separate pipeline for certain projects that qualify.
                                                                                                  • discount on total amount

                                                                                                    i want to add discount on total value of my purchase order instead of applying line by line.my customer will not accept the discount on line by line.
                                                                                                  • Important update in Zoho Forms: Enhancements for improved email deliverability

                                                                                                    Hello, form builders! We would like to inform you about some changes we're making in Zoho Forms to ensure the deliverability of your outbound emails. Changes to Gmail policies Gmail has updated its DMARC policy which quarantines emails sent with gmail.com
                                                                                                  • payment voucher, receipt printing feature

                                                                                                    Why dont ZOHO add the voucher printing feature in zoho book with authorised signatory and receiver's signature
                                                                                                  • Inventory asset or cost of goods sold ?

                                                                                                    We can only choose inventory asset for items but lots of bills for items are posted with cost of goods sold - is this all balanced correctly or should it be entered differently ?
                                                                                                  • Stock reservation in zoho for upcoming delivery

                                                                                                    Hi, Is there any option available in zoho for reserve item for a upcoming delivery. So that we can avoid the item should duplicated on another order. Means needs to deduct the item from zoho before making invoice.
                                                                                                  • Banking: Transfer from another account without base currency

                                                                                                    Scenario: A banking line item shall be categorised as an "internal transfer" from another bank account. This is a USD to EUR transfer. Our base currency is CHF. What we tried: Category: "Transfer from another account" From: Our USD account To: Our EUR
                                                                                                  • How to search records in integration task in creator?

                                                                                                    How to search using integration task in creator searchString = {"zcrm_account_id:4050082000001001499"}; contactData = zoho.books.getRecords("Contacts","xxxxxx",searchString); I get an error that third argument needs to be string, I tried to convert it
                                                                                                  • Show my cost or profit while creating estimate

                                                                                                    Hi, While creating estimate it becomes very important to know exact profit or purchased price of the products at one side just for our reference so we can decide whether we can offer better disc or not .
                                                                                                  • Outgoing emails to btinternet blocked.

                                                                                                    ERROR_CODE :421, ERROR_CODE :Too many messages (1.5.6.1) from 74.201.84.163I have been having problems sending to btinternet.com and btopenworld.com for the past week.  First 'email delayed' message, and then 'delivery failed', as above. Looks as though someone is spamming from the ZOHO email server 'sender163-mail.zoho.com' Surely this is abuse of your system, and you should be able to trace who it is (if it is a registered user of Zoho mail?) and block their account. An email system is really no
                                                                                                  • single user access to the CRM suits

                                                                                                    I am currently using Zoho CRM Plus, where the pricing for a single user is ₹3,500 INR, and it includes access to multiple applications. However, I would like to add an additional user but restrict their access to only two specific applications within
                                                                                                  • Mixed order: stock item and business purchase

                                                                                                    Hi, I'm just getting started with Inventory, and I haven't been able to find an answer to this. I am a small service business, and am just starting to sell products (in very low numbers). From my vendor, I purchase both items that I will on-sell, which
                                                                                                  • Facebook Professional Account

                                                                                                    Zoho social says there is nothing to be added when I try to add my Facebook and Instagram accounts. Both are Professional profiles. How do I go about adding them? They are not Pages or Groups, they are simply Professional accounts.
                                                                                                  • This user is not allowed to add in Zoho. Please contact support-as@zohocorp.com for further details

                                                                                                    Hello, Just signed up to ZOHO on a friend's recommendation. Got the TXT part (verified my domain), but whenever I try to add ANY user, I get the error: This user is not allowed to add in Zoho. Please contact support-as@zohocorp.com for further details I have emailed as well and writing here as well because when I searched, I saw many people faced the same issue and instead of email, they got a faster response here. My domain is: raisingreaderspk . com Hope this can be resolved.  Thank you
                                                                                                  • How do you apply field validation to a date field?

                                                                                                    We are using Sign for remote e-signature of liability waivers. The signer must enter a date of birth, and if they are a minor their legal guardian must sign for them. However we have had numerous problems with signers returning an invalid date of birth
                                                                                                  • Zoho Forms Submission URL

                                                                                                    Hi Zoho, It would be great to have a URL which can take us to specific form entries. For example: https://forms.zoho.eu/ACCOUNTNAME/report/FORMNAME/records/UNIQUE-REF I currently have a use case where I want to use Zoho Flow to create a module entry in
                                                                                                  • How to disable clone record for a user?

                                                                                                    Hi, I'd like to disable clone records for some of my users in zoho crm. How can I go about doing that? Regards, CRM
                                                                                                  • How to provide recommended KB articles in the welcome message

                                                                                                    I'm new to Zoho and am looking to replicate something I did for a previous employer. I want all newly created tickets to receive an automated welcome message that includes a few recommended articles from our knowledge base. Ideally there would be a way
                                                                                                  • Dynamic integration of ZOHO CRM Data into ZOHO SHOW

                                                                                                    Hello, We are making offering with good design on ZOHO Show. A lot of data in those offerings are filled with Data present in ZOHO CRM (Account name, Name of the deal, Amount of the deal...etc). Thus could we push (in API ?) specific data from those fields
                                                                                                  • Building a form with Categories and multiple sub-categories

                                                                                                    Hello, I am completely new to Zoho and the Deluge programming language. I would like to build an easy way to lookup a set of previous orders from my order tracking sheet. What I have done so far is import my Excel order list into Zoho so it shows all
                                                                                                  • Zoho IP blocked by SpamCop 136.143.188.16

                                                                                                    Hello, I am unble to send any single email during the whole time due to the Zoho IP 136.143.188.16 being blolced by SpamCop.net Please help on this. RROR CODE :550 - spamcop.mimecast.org Blocked - see https://www.spamcop.net/bl.shtml?136.143.188.16. -
                                                                                                  • Can't sign in to Zoho using Google account

                                                                                                    Just checking if anyone else has an issue signing into Zoho with a Google account at the moment? (Have tried Zoho Books in the app on mobile and Chrome and Firefox on Windows 10 - doesn't work for the forums either). Error message appears as attache
                                                                                                  • unable to send message email outgoing blocked 554.5.1.8

                                                                                                    Hi good day to you, After migrating to a new hosting, I cannot send outgoing email, with an error message as below : unable to send message email outgoing blocked 554.5.1.8 Please kindly unblock my account, as I am in a rush to use it to work & communicate
                                                                                                  • Zoho CRM - COQL query failing with no reason

                                                                                                    Hi I'm trying to execute a COQL query but it's returning an error. Unfortunately I cannot understand where I'm wrong The query is the following;: URL: POST https://www.zohoapis.com/crm/v2.1/coql Body: { "select_query": "select id,Adjustment,Billing_City,Billing_Code,Billing_State,Billing_Street,Buyer_PO_Number,Delivery_Date,Delivery_Method,Due_Date,Grand_Total,Invoice_
                                                                                                  • SMTP Authentication error with django backend

                                                                                                    Hello I have e zoho mail id info@mindbrewers.in But when i use it for smtp it gives 535 authentication error in django website . EMAIL_USE_SSL = False EMAIL_USE_TLS = True EMAIL_HOST = "smtp.zoho.com" EMAIL_PORT = 587 EMAIL_HOST_USER = "info@mindbrewers.in"
                                                                                                  • Separate Triggers and Enhanced Information for Zoho One Departments and Groups in Zoho Flow

                                                                                                    Dear Zoho Flow Team, I hope this message finds you well. Currently, there seems to be a mix-up between zoho one departments and groups in Zoho Flow, which causes some challenges in handling triggers effectively. For instance, when using the "User added
                                                                                                  • Zoho Mail Search Engine Sucks

                                                                                                    Hello There! I really like all the features of Zoho Mail and I believe is way better than Gmail except for the Search Function. I believe Zoho Mail has a very poor search function, if you misspelled a word in the search box, Zoho Mail won't display any
                                                                                                  • No recibo correo en en mi bandeja de entrada

                                                                                                    Hola, no puedo recibir correos en mi bandeja, tengo una pagina web y puse el correo en un formulario y cuando meto los datos y los envio no me llegan , pero si pongo otra ya sea gmail, outlook si los recibo, tiene que ver con mis dns?
                                                                                                  • The sending IP (136.143.188.15) is listed on spamrl.com as a source of spam.

                                                                                                    Hi, it just two day when i am using zoho mail for my business domain, today i was sending email and found that message "The sending IP (136.143.188.15) is listed on https://spamrl.com as a source of spam" I hope to know how this will affect the delivery
                                                                                                  • desbloquear cuenta

                                                                                                    Buenos dias  Cordial saludo Tengo una cuenta libre en zoho mail asociado a un dominio, pero uno de los usuarios se bloquea el correo porque dice que ha excedido el límite de correo, por favor podrian desbloquearla y como hago para que esta persona debe enviar sus correos sin ningun probleama. Gracias de antemano
                                                                                                  • Zoho SMTP IP Addresses

                                                                                                    We are using Zoho Mail for a domain and need to whitelist some STMP IP from your service for a redirection. You can provide IP address list for Zohomail SMTP servers?
                                                                                                  • Next Page