Power of Automation: Automatically send an email to all portal users with today's list of Open tasks.

Power of Automation: Automatically send an email to all portal users with today's list of Open tasks.

Hello Everyone,


A Custom Function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as to when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it.


Requirement:-


One of our customers wanted to email all the portal users with their list of daily Tasks which are in open status along with details like Project name, Task name, Task URL, start date, due date, status. Sample email notification screenshot is attached for reference.

All you need to do is schedule the frequency for how often the below custom function should be executed. Here is the help document to know more about Schedule Functions.


Custom function code:-


projectParam = Map();

projectParam.put("status", "active");

getAllProjects = invokeurl
[

url : projectsEndpoint +portalId+"/projects/"

type : GET

parameters : projectParam

connection : "XXXXXXX"

];

if(getAllProjects.containKey("projects"))
{

projects = getAllProjects.get("projects");

usersParam = Map();

usersParam.put("user_type", "active");

getAllUsers = invokeurl
[

url : projectsEndpoint+portalId+"/users/"

type : GET

parameters : usersParam

connection : "XXXXXXX"

];

if(getAllUsers.containKey("users"))
{

users = getAllUsers.get("users");

for each user in users

{

userId = user.get("id");

taskParam = Map();

taskParam.put("status", "open");

taskParam.put("owner", userId);

taskParam.put("time", "today");

getAllTasks = invokeurl
[

url : projectsEndpoint + portalId+"/mytasks/"

type : GET

parameters : taskParam

connection : "XXXXXXX"

];

if(getAllTasks!="")

{

tasks = getAllTasks.get("tasks");

taskRow = "";

for each  task in tasks

{

taskRow = taskRow + "<tr> <td>" + task.get("project").get("name") + "</td> <td>" + task.get("name") + "</td> <td>" + task.get("link").get("self").get("url") + "</td>  <td>" + task.get("start_date") + "</td> <td>" + task.get("end_date") + "</td> <td>" + task.get("status").get("name") + "</td> </tr>";

}

sendmail

[

from :zoho.loginuserid

to : user.get("email")

subject :"Today's tasks"

message :"<html> <style> table, th, td { border:1px solid black; border-collapse: collapse; } </style> <body> <h2>Today's Tasks</h2> <table style=\"width:100%\"> <tr> <th>Project Name</th> <th>Task Name</th> <th>Task URL</th>  <th>Start date</th><th>Due date</th>  <th>Status</th></tr> " + taskRow + " </table> </body> </html>"

]

info taskRow;

}

}

}

}


Make sure to replace XXXXXXX with the Zoho Projects connection link name with scope ZohoProjects.Tasks.READ, ZohoProjects.portal.READ, ZohoProjects.Users.READ. Check this link to learn how to create the connection.  Please find the screenshot of sample schedule function attached for reference. 


We hope you found this post useful. If you have any questions, feel free to share them in the comments below.


    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      • Sticky Posts

      • Zoho Projects Roadshow, USA - 2024

        Dear Users, We are happy to announce the Zoho Projects Roadshows 2024 in USA. This is an excellent opportunity to learn more about Zoho Projects and gain in-depth knowledge of the advanced features. Our team will also discuss industry specific solutions
      • Project Billing with the Staff Hours Method in Zoho Projects

        The Staff Hours Billing Method in Zoho Projects allows you to bill your clients based on the actual time spent by each team member on a project, at the rate set for each user. This is useful for projects where different skill sets are needed and service
      • Tip 37: Time Log Restriction in Zoho Projects

        Timesheet in Zoho Projects helps you big time in entering log hours for the tasks and issues and approving them. Now, with the new Time Log Restriction option, you can set daily and weekly log hour limits. You can restrict users from entering extra log hours than the permissible limit. The limits are restricted to 24 hours per day and 168 hours per week by default based on business hours. To customize, navigate to Task & Timesheet settings under Portal Configuration in Zoho Projects setup and enable
      • Organize and Track Phases with Phase Custom Views

        Phase Custom Views let you filter and display phases based on specific criteria. This helps you focus on what’s most relevant for you and your team. Filter phases using criteria such as budget, status, and more. Share views with specific users or teams
      • Create Your Own Issue Management System

        Effective issue management is a cornerstone of project success. Every bug or issue, no matter how small, needs to be tracked and resolved in time to maintain project momentum. In this post, we’ll explore how an issue management system in Zoho Projects

      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 Campaigns 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

                                • Every morning an Employee's line manager gets an email saying they have not checked in even though they have

                                  Hello, We have an employee who's line manager received an email ever morning to say they are late checking in even though they have checked in on time?
                                • Out of Office

                                  Hi, I'm trying to setup a out of office reply for Monday through Friday from 17:00-8:00 and Saturday and Sunday all day long. So basically I want to send back a out of office message when I'm not in the office. Is this possible ? I can make the Monday
                                • UI Enhancements in list view for Zoho CRM

                                  Dear All, We hope you're well! We are here with a few UI updates to the list view in Zoho CRM. As you all know, list view is a simple tabulation of your records. To have ease of access and navigation, the list view is armed with options like quick actions,
                                • Clone a Module??

                                  I am giong to repurpose the Vendors module but would like to have a separate but very similar module for another group of contacts called Buyers. I have already repurposed Contacts to Sellers. Is it possible to clone (make a duplicate) module of Vendors
                                • Add home page or dashboard in CRM customer portal

                                  is it possible to add home page or dashboard in CRM customer portal?
                                • email association with CRM

                                  Why is it 2024 (almost 2025) and Zoho has not figured out how to integrate email with CRM? It is so inconsistent at associating emails within CRM. I am an attorney. I have clients and work with other attorneys. Attorney John Doe is associated with multiple
                                • Standard Operating Procedures System in Zoho?

                                  Hi, I've been in business for over 18 years, with 6 employees.  We have over 300 policies and procedures that have been written and rewritten.  They have always been stored on our Sharepoint server in a file folder structure.  Because of it, nobody uses
                                • Zoho Forms - Setup

                                  Hi, Is it possible to share the ownership or let more than one person see the settings in a Zoho Form? Currently we use Zoho forms but everytime there is an issue we have to transfer the ownership between Admin people so they can investigate.
                                • Delete organization's contacts

                                  Hi, since some days it's impossible to delete organization's contacts from Zoho mail browser web and desktop application. There is no more the "Delete" button in the single contact and also "Resete contacts" in the main screen. I'm the administrator's
                                • Can't access email.

                                  I am unable to get into my emails. Can't get anything from server.
                                • Filters not working

                                  A couple of weeks ago, my filters stopped working. I tried redoing each of them, but still they don't work as they used to. I had made no changes before the time they stopped working. If you apply the filter manually, it works, but not for incoming email.
                                • Subform Layout

                                  Hello.. I have a situation in Zoho forms where I am collecting data of family members and their health conditions. So, I think a sub form is the right choice where a person can add family members count of which can vary person to person. Now, I have almost
                                • Zoho mail badge won't go away after mail is read

                                  The zoho email app on my imac displays a red badge with a one constantly. The number never changes even when there are unread emails and when they are all read it still says a one.
                                • Issue with Fetching and Mapping Multiple Products in Line Items to Zoho CRM Leads

                                  I am currently facing an issue with fetching and mapping products in line items to the Zoho CRM leads. Here's the situation: 1. When there is a single product in the line items, the system works as expected. It fetches the product name, matches it, and
                                • How to recover deleted email account.

                                  Gyanendra Singh  gyanendra.singh@stellaranalytics.co How to recover it ?  Please help. Its urgent.
                                • Workdrive Integrations - API not working

                                  Hello, Zoho Workdrive integrations (APIs, Connections, etc). are not working. The first discovery of this was in Zoho Projects connection with Workdrive, which was showing error "Error due to - Internal exception".
                                • 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.
                                • Function #8: Add additional charges to invoices

                                  Here goes one of the highly sought-after custom functions in Zoho Books. If you find yourself needing to apply additional charges to customers on their invoices (say credit card surcharges, or fuel charges applicable to customers from a certain region,
                                • Booking outside of scheduled availability

                                  Is there a way for staff (such as the secretary) to book appointments outside of the scheduled availability? Right now to do this special hours must be set each time. There should be a quicker way. Am I missing something?
                                • A consultant with different working hours for each workspace

                                  As of now, it doesn't seem to be possible to set different working hours for a single consultant in two (or more) different workspaces. For example: A  consultant is going to work 2 weeks/month at workspace A and 2 weeks/month at workspace B. Yet, right
                                • is there a way to add the products i created in zoho books to zoho crm

                                  I started using zoho books last week and put in several of our products.. now i signed up for zoho crm and i would like to import the products and streamline the sales process so i don't have to create the products twice.  i read that you can import products after you create a new client in crm but it seems like it will be double work since i won't have products / inventory items in crm to take my lead from contact/lead to client/potential client. how in the world do i integrate these pieces and
                                • Cannnot find criteria tab

                                  We need to be able to segment contacts based on an account view or field. The online help shows a screen with three options: Under Sync Details there is All Contacts; Custom view; Criteria.  The latter is missing from my screen.  I need it. I also want to know if I delete contacts from campaigns, will they still remain in CRM? 
                                • Why Are Arrays Not Allowed in Webhook Payloads?

                                  Hello Support, I would like to understand the reasoning behind the limitation where arrays are not accepted in API payloads. Could you please clarify why this restriction exists? It seems like arrays would be a natural and efficient way to handle multiple
                                • What are your best practices for using client scripting?

                                  I'm beginning to leverage client script, and getting myself a little confounded with dealing with scripts for both in-line edit and full edit mode. Though my users like in-line edit, I can migrate us to full-page edit IF that is the more versatile mode
                                • Total number of External Call Statements exceeded

                                  Hi, In a Zoho Creator application yesterday we started getting this error: Total number of External Call Statements exceeded. Line:(8) The line referenced looks like this: contact = zoho.crm.getRecordById("Contacts",contact_ID); Can anyone tell me where
                                • A new UI for distraction-free engagement in online meetings and webinars that scale up for 3000 attendees

                                  Hello all, We're excited to share our new, refined UI for online meetings.  Here's how the new UI will improve your experience during online meetings: We've re-designed Zoho Meeting's online meeting UI to enable users to fully engage in conversations
                                • Exporting Records from an Embedded View ...

                                  @support: In one of my Applications for a Customer, I have an HTML View  ... part of whose content looks like ... //variables in iframe tag iframeName = "zoho-Case_Law_View"; iframeSrc = ((("http://creator.zoho.com/" + zoho.adminuser) + "/") + zoho.appname) + "/view-embed/Case_Law_View/";%> <p class="zc-viewtitle"><%=Current_Expert_Info%></p> <iframe height='800px' width='100%' name='<%=iframeName%>' frameborder='0' scrolling='auto' src='<%=iframeSrc%>/Expert_Info=<%=Encoded_Expert_Info%>'></iframe>...
                                • How to deal with multiple people requesting to order parts, then auto send and email to the customer at the end of the week

                                  Hi there , so I like to be able to send an e mail once a week to order parts that the guys over ordered over the week, also we need to maybe order parts from an other customer there and have an the email ready to go once its been approved. What would
                                • Unable to verify account information - zoho on iPhone

                                  Hello I have followed the instructions as described on http://zsync.zohosites.com/iPhone.html and repeatedly receive the message "Unable to verify account information". I would like to set  up zoho mail on my iPhone and would greatly appreciate some assistance with this. Thank You
                                • ZOHO Meetups Deutschland und weitere Veranstaltungen!

                                  Die ZOHO Meetups gehen in die nächste Runde! natürlich kostenfrei! Treffen Sie ZOHO Nutzer, Interessierte und Experten powered by söll.vertrieb der ZOHO Premium Partner in Deutschland. Wann: Februar 2024 Thema: ZOHO CRM - Wie organisiere ich meinen Vertriebsalltag?
                                • Multiple Clicks on a Single Open

                                  I have sent out several campaigns and experienced this issue on multiple occasions. When an email is opened, all of the links in that email are reported as having been clicked. I have tested this and found this to be happening. When a single click is
                                • Clarification on Lead Score Breakdown in Zoho Marketing Automation

                                  Hello I have a question regarding the lead scoring system in Zoho Marketing Automation. Specifically, I want to understand the breakdown of how a lead's score is accumulated. For instance, if Person A has a lead score of 50, I would like to see the detailed
                                • Can't select Leave type while applying a leave

                                  Hello, while trying to apply a leave, I can't find any leave type among the options in the Leave type select: Here are my leave settings. Daily: Hourly: Tried to clear cache and to navigate from another browser, but the problem persists. Any hint? Thank
                                • Is and Is Not Empty option in Workflow Conditions

                                  I noticed today that there is no "Is Empty" or "Is Not Empty" option on workflow conditions in Zoho Projects. I wanted to prevent a webhook from firing if a specific field is empty as it is required in the webhook parameters. It would be great to see
                                • How do i change the user without reduce of the liscence

                                  We have 6 user in our company, 1 of them we dont use anymore, but when we pay for 6 users the account have actived . and now i can turn on deactived.
                                • List of past retainer invoice inside the last invoice

                                  Hello, We are sending retainer invoice to our customers. The last invoice has the last amount to be paid. However we need to have attached to this invoice, the list of all retainer invoice, with date and paid amount. How can I achieve this using Zoho
                                • Automatic Signature Populated Incorrectly

                                  To whom it may concern, The problem is as follows: When creating a new email, the automatically included signature is populated incorrectly. Disregarding a lot of the formatting such as padding and margins. (see image below) YET when manually selecting
                                • Zoho CRM's Copy Customization functionality now works across DCs, for customized accounts, and more

                                  Availability This feature is available in Standard, Professional, Enterprise, and Ultimate editions. These changes have been rolled out to all users in all DCs. For more information, please refer to these help documents: Overview | Instructions Hello
                                • How to get value from html element using deluge?

                                  I am trying to capture the value entered in an HTML <input> tag of type "date" and store it in a variable using Deluge scripting. Here's the snippet of my code <%{ date_value = // Here I want to store the value entered in the below HTML tag %> <input
                                • ....should be an easy one

                                  I have a form that includes a radio selection field with three options: - Board Chair - Executive Director - Other I then have an "Other" text field. I have a workflow set up so the "Other" field is hidden when the form loads. What I want to have happen
                                • Next Page